#milkymist IRC log for Tuesday, 2011-06-07

wolfspraullekernel: the vishay infrared receiver we use is for 38kHz carrier frequency, but Wikipedia RC-5 seems to indicate that it should actually be 36 kHz?05:04
wolfspraulwill this still work? Wikipedia is a little unclear there, it says "The command data is a Manchester coded bitstream modulating a 36 kHz carrier. (Often the carrier used is 38 kHz or 40 kHz, apparently due to misinformation about the actual protocol.)"05:05
wolfspraulso any of those 3 will work? If the remote control sends with a 36 khz carrier, can our receiver with a 38khz carrier still pick it up?05:05
larsci think the carrier wave mostly only matters for the IR-filter05:07
wolfsprauldon't understand05:09
wolfspraulthe receiver is available in different part numbers, 30, 33, 36, 38, 40 and 56 khz05:09
wolfspraulwhy that? what does it mean if you have the 'wrong one'?05:10
larscthe signal won't go through the filter i guess05:10
wolfspraulso if the remote control uses a 38 khz carrier, and the receiver is a 36 khz type (part number), will it receive or not?05:12
wolfspraulsorry same question as before :-)05:12
wolfspraulwhat if the distance is bigger, say a control sending on a 56khz carrier, and the receiver being a 30 khz part number?05:13
larscmaybe ;)05:13
larscit all depends on how narrow the filter is. if you wnat to be sure, use the 38khz receiver05:19
wolfspraulwe use a 38khz receiver right now05:21
wolfsprauloh you mean because it is in the middle from 36 to 40?05:21
wolfspraulso our vishay part with 38 khz part number will be able to receive correct codes from remote controls sending on a 36, 38 or 40 khz carrier?05:21
larscdepends on how narrow the filter is. take a look at the datasheet05:23
wolfsprauldatasheet only says "should be close to the band-pass center frequency", cannot find more details05:29
wolfspraulnot sure whether 2khz distance is 'close' or not :-)05:30
wolfspraulit's probably obvious, but not to me...05:31
rohhm. i think it will work even if its off a bit05:33
wolfspraulyes but what is 'a bit'?05:33
wolfspraulwikipedia seems to say rc-5 is often found on 36, 38 or 40 khz. ok, I got that.05:33
rohthere is a bandpass curve for f+-5%05:33
wolfspraulnow, our vishay part is of 38 khz type. did we choose that because it's in the middle of 36-40?05:34
rohbut i guess it will work best with 38, and maybe with a few percent less range also with 36 and 40khz ones05:35
rohatleast thats what that graph tells me05:35
rohf=f0 +-5%05:36
rohdelta f(3dB)=f0/1005:37
rohits half as sensitive at 3.8khz up and down05:38
rohmeans at 36khz (2 khz down, 5% f0 off down) its something like 0.6 to 0.8 times as sensitive as on 38khz05:40
wolfspraulthat doesn't explain why we see so many different/random values then, when doing controlled tests with the sending remote control essentially directly in front of the receiver05:40
rohit works less well, but maybe one only notices when using it on long distance05:40
wolfspraulso maybe we did choose 38 to be in the middle of 36-4005:41
wolfspraulalthough you could also make the same argument about 36 being more in the middle of 30-40 (since 30 and 33 exist as well)05:41
wolfspraulbut then, it looks like sensitivity goes down quite a lot, even with 5% off05:42
wolfspraulI'm trying to find the root cause of the 'different values' problem me, Adam and Xiangfu have, but can't be related to carrier frequency then, it looks like05:44
Action: larsc needs coffee...05:44
larscha! coffee!06:08
wolfspraulroh: is it possible that the infrared goes through the wood case you made once?06:19
wolfspraulI was just trying that and even when I hold the control immediately in front of the wood (so the light cannot go anywhere else but through it), I do receive a value (albeit wrong, as always)06:20
lekernelhave you looked at the waveform from a DSO or logic analyzer?!??06:25
lekernelbtw: https://github.com/milkymist/llvm-lm3206:26
wolfspraullekernel: aw will be looking at it, I think06:29
wolfsprauland xiangfu will improve the test in tests_ir.c to be more strict and log more06:29
lekernelok but please do not delay the rc3 because of this minor problem...06:29
lekernelcapturing that waveform should take less than 5 minutes06:30
wolfspraulwell we need to be able to test whether ir works06:31
wolfspraulyes I agree, most likely all is good, but we (not you, me/Adam/Xiangfu) have fooled ourselves a little the last months06:31
wolfspraulwe clean that up now :-)06:31
wolfspraulit also turns out that Adam had to press standby 'multiple times' to get it to pass in December, in the rc2 run06:31
wolfspraulthat's all wrong, even if we assume/know that the underlying stuff is ok06:31
wolfspraulotherwise why test at all...06:31
wolfspraullekernel: is that correct that we chose a 38 khz carrier frequency receiver because it is in the middle of 36-40?06:32
wolfspraulor because for some reason we specifically wanted 38?06:33
lekernelaccording to the lirc website most remotes are 38, furthermore the receiver has some tolerance as roh said06:33
wolfspraulwhich control are you using?06:35
wolfsprauldo you know whether you control uses 38 khz?06:35
lekernelsome philips one06:38
lekernelI don't know06:38
lekernelwhy don't you have a look at that waveform? it's going to help a lot more than those time sinking wild guesses06:38
wolfspraulI have no scope or logic analyzer, and wouldn't even know how to use one if I had. Adam will do that.06:39
wolfspraulyes it sounds like 38 is good, it's all written up here (from lirc data as you said) http://en.wikipedia.org/wiki/Consumer_IR#Technical_information06:39
xiangfuwolfspraul:  lekernel  http://dpaste.com/551388/06:42
awlekernel, xiangfu http://downloads.qi-hardware.com/people/adam/m1/pic/button1_0x0c.JPG06:42
xiangfuthe tests_ir patch06:42
awthis is the one gui shows "0x0c" and i probed it.06:43
lekernelfor first it seems that the signal is clean, so there is little doubt the decoder works at the remote's frequency06:43
awyes, very much clean on signal level06:44
lekernelthen have a look at http://users.telenet.be/davshomepage/rc5.htm06:44
awum...good stuff my toggle bit is strange...checking that protocol...06:45
xiangfuI bought another controller. it do give only one value when press one button. but the value is not correct.06:46
xiangfu(the two phillips brand remote controller is on the way to me)06:47
awlekernel, my button 1 is the same as that one in web page. i need to probe more. I don't see what else is wrong from tsop34838's output.06:49
wolfspraulxiangfu: i<sizeof(rc5_code), can remove while(1) and break I think, can return TEST_STATUS_FAILED right away since you also return a few lines higher.06:49
wolfspraulwhy do we do rx&0x3F? Is that needed? are some of the high bits on/different? there is one bit that toggles but we mask out a whole bunch of them, don't know why06:50
wolfspraulwe are not trying to 'find/extract' the right value, we are trying to test the transmission :-)06:51
lekernelif the fpga receives a correct rc5 signal but does not decodes it correctly, then the fpga design is buggy06:52
awhmm..the toggle bit is correct from read it without doubting. :-)06:53
wolfspraulxiangfu: ah wait, sizeof is not correct :-) just write 5, it's easier...06:53
awchecking for others buttons though. :-)06:53
xiangfuoh. yes. some define arraysize.. should be ok. let's just use 5,06:54
lekerneluse sizeof(rc5_code)/sizeof(rc5_code[0])06:54
wolfspraulI don't see the return PASSED now, but anyway, looks better now06:55
wolfspraulwe will not be able to fool ourselves with this test :-)06:55
wolfspraulcheck whether we need the &0x3F06:55
wolfspraulI would like to only mask out bits that we know can differ, like the toggle bit06:55
wolfspraulthis is a test routine, it's supposed to catch suspicious stuff06:56
lekernelxiangfu, as wolfgang said, the return "passed" is missing06:58
wolfspraulyes, good. except for 3F, but let's see what values you get06:58
wolfspraulnow you can try to run this and see whether you can make it pass :-)06:59
wolfspraulso you say you bought a universal remote now and at least it gives unique (and always the same) values for each key?06:59
xiangfulekernel: http://dpaste.com/551393/ line 3807:00
xiangfuwolfspraul: yes.07:00
xiangfubut the value is not correct. VolumeUp is 0x1E, not 0x1007:01
lekernelok, we got that07:01
wolfspraulxiangfu: ok but that's a start07:02
wolfspraulthere's a huge difference between 'sometimes not working', or 'different values', and 'the values do not correspond to the rc-5 standard'07:02
wolfspraulso it's unique now, and every time you press you reliably get that same number?07:03
wolfsprauljust asking again so we are clear :-)07:03
wolfspraulyou can press 20 times, it should reliably give you the same number 20 times07:04
xiangfuwolfspraul: yes.07:04
awhmm...my ir transmitter transmits different codes, see another probed code i got on button 1. http://downloads.qi-hardware.com/people/adam/m1/pic/button1_0x1c.JPG07:04
xiangfuI got reliably value when press same button07:04
xiangfuwolfspraul: (20 times) yes.07:05
awso now the problems is that our ir transmitter is not sending correct one since second start bit is wrong07:06
wolfspraulsecond start bit is a toggle bit I think07:08
awxiangfu, but how do you know that your remoter is rc5 format? since if used my other not rc5 remoter, the gui still can detect with the same value.07:08
wolfspraulto tell the difference between two button presses versus someone walking through the signal07:08
awwolfspraul, NO, start bit have two bits with "1"07:09
awso this is surely my remoter is not sending a good code when i press the same button "1" key07:09
xiangfu"transmitter" what is that? one component on m1 pcb? the TSOP34838?07:10
awxiangfu, sorry, i said transmitter is your remoter. :-)07:10
xiangfuaw: I don't know that. I just configure it as phillips remote controller. it's a universal controller, very cheap.07:11
xiangfuaw: transmitter ok. get it.07:11
xiangfuback online in 10 Mins07:11
awxiangfu, hmm..got it.07:12
awwolfspraul, i think now the results is clear? test s/w is strictly more and he has a universal controller, so i need to get the same as phillips remoter controller.07:13
awxiangfu, pls take picture of your universal remoter so that i can find if it exists here i can buy.07:37
xiangfuaw:hmm.. I think let's wait the 'phillips branch remote controller' in next two days.07:38
xiangfuaw: I just bought them at small shop, you know in China. it's only 10RMB.07:38
xiangfuI mean I just bought this one at small shop.07:39
awhmm..okay..bad asia not just China. :-)07:39
awokay..let's stick on a real philips remote controller.07:39
xiangfuI meet another problem. I get different value in Flicernoise and Test image.07:48
awxiangfu, hup? what's difference in flickernoise when you press the same button 1?07:49
awxiangfu, what value the gui read for button 1? 0x0c? 0x1c?07:50
xiangfuI test with button 'standy/power'07:50
xiangfuthe flickernoise give me 0x2607:50
xiangfuthe test image give me : http://pastebin.com/T58QBQkR, it like totally random.07:51
awxiangfu, before you used the new bin image, your flickernoise reads all good?07:54
xiangfuaw:I guess the IR code in test is not as good as in flicerknoise.08:00
awxiangfu, but you used universal remoter to test 20 times and always got the same value, didn't you? by flickernoise?08:08
wolfspraulxiangfu: "ir code in test not as good as flickernoise"?08:33
xiangfuwolfspraul: the test image give me : http://pastebin.com/T58QBQkR, it like random08:46
xiangfu1. I change the rc5_code to {0x26, 0x3c, 0x38, 0x34, 0x1e};08:47
xiangfu(I got those values in flickernoise with my cheap universal controller)08:48
xiangfu2. boot to test image. then it give me http://pastebin.com/T58QBQkR,08:48
xiangfu(anyway I still not sure this controller is RC5.),08:49
wolfspraulxiangfu: why does the test image give you values that are different from the ones you see in flickernoise?08:51
xiangfuwolfspraul: I am not sure. the test image not link to rtems. so maybe there is some different.08:59
Action: lekernel just compiled the first milkymist c source file with llvm09:08
lekernelclang -ccc-host-triple mico32-generic-generic -o blah -c memstats.c  -I../include/base -I../include -ccc-gcc-name lm32-rtems4.11-gcc09:13
lekernelnow trying the integrated assembler...09:13
xiangfuwolfspraul: ok. the values is same(value & 0x003f), check here http://pastebin.com/xTDzvxkW, the first colume is and 0x003f, the second colume is without 0x003f09:17
xiangfuwolfspraul: but there is another problem. you have to press the button very fast then you can get only one time value.09:18
xiangfuwolfspraul: I will change code that handle the repeat values.09:18
awi finally realized that toggle bit10:14
aw1 toggle bit (change everytime when a new button is pressed on the ir transmitter)10:16
wolfspraulyes. that's a bit we need to mask out when comparing against the value we expect for a particular button.10:17
awyes so xiangfu needs to mask it when repeating code coming.10:18
wolfspraulaw: I'm looking at the two scope pics you uploaded earlier10:30
wolfspraulI don't get it10:31
wolfspraulthe 0x0c one looks like 111000000000011 to me10:31
wolfspraulthe 0x1c one looks like 110000000000011, so no difference other than the toggle bit10:32
wolfspraulthe 11 at the end should come out as 0x03, neither 0x0c nor 0x1c10:32
wolfspraulso obviously I misunderstand something :-)10:32
wolfspraulam I misreading the scope output?10:33
awit's 1111111111110110:33
wolfspraulwhich one is that? 0c or 1c?10:34
awplease forget about the first two bits on those two waveforms, the remaining rightest bits is all the same **11111111110110:40
awi need to probe in a suitable time slot again.10:40
wolfspraulwell OK, I cannot make sense of the scope pics then.10:41
wolfspraulwhy should I forget the first two bits?10:41
awthe picture file name show 0x0c and 0x1c were read by gui not i read from waveforms.10:41
wolfsprauland why are all 1 - inverted? that doesn't look right10:41
wolfspraulyes sure, I understood that10:41
wolfspraulso I tried to find out why one came out as 0x0c in the GUI, one as 0x1C10:41
wolfspraulbut I read the bits very different from you already, of course I start at the very left, assuming that's the first start bit10:42
wolfspraul2 start bits, 1 toggle bit, 5 address bits, 6 command bits (last bit almost not on the picture)10:43
wolfspraulanyway, I cannot make sense reading those pics, so I cannot help :-)10:43
wolfspraulthey look like 0x03 to me, both of them, differ only in toggle bit10:43
awfrom http://users.telenet.be/davshomepage/rc5.htm  shows, the rightest bit is read as the same big status though, me either. I don't know why gui reads it as 0x0c and 0x1c though.10:43
wolfspraullet's focus on reading the scope bits correctly first10:44
lekernelaw, btw, have you ordered the RC3 PCBs already?10:45
awlekernel, no10:45
lekernelwhat's missing?10:45
wolfspraullekernel: you looked at adam's pics earlier - what is the value of those bits? http://downloads.qi-hardware.com/people/adam/m1/pic/button1_0x0c.JPG10:47
wolfspraulyou looked only at the cleanliness, or also the bit values?10:47
awgerber file on zener I realized it's not good to insert through hole part, so we changed the footprint again to meet suitable zener diode with two pins length.10:49
lekerneljust cleanliness, but hey... that simple analogue receiver isn't going to switch bits10:49
lekernelif it doesn't work with such a signal, either the remote isn't rc5 or the fpga design needs fixing10:49
awafter this done, I'll gerber out.10:49
lekernelaw, can you get that done, and only then play with the remotes?10:49
awlekernel, whe i get the final gerber, I'll gerber out. right now I've receive final yet. No related about this remote.10:51
lekernelyou're waiting for the layout house? or do you still have something to do on your side?10:51
awjust waiting only.10:52
wolfspraullekernel: yes but in order to find this out, one would need to read those bits. because if it's 0x03 there, but 0x0c/0x1C in the gui, then the problem is in the fpga10:52
wolfspraulthat's why I read it, and even though I cannot clearly see the start bit and last bit, it look like 0x03 to my untrained eyes10:52
wolfspraulbut it looks like 11111111101 to Adam, so whatever :-)10:52
wolfspraulI'll wait :-)10:52
lekernelthe pattern isn't complete10:52
awwolfspraul, wait..i do probe again. :-)10:53
lekernelcapture for a longer time10:53
wolfspraulyes it's cut off a little10:53
lekernelaw, how much work is needed by the layout house? any idea when this will be done?10:55
lekernelomg... the rc3 run is incredibly slow10:55
wolfspraulat least it's almost done. we should plan for rc4 already :-)10:57
lekerneli'm doing it, I ordered samples of adv7180 yesterday10:59
lekernelthat should be the only change...10:59
wolfspraulI still see, without an Ethernet cable connected, both my green and yellow led at the Ethernet connector on sometimes10:59
wolfspraulthat was some hardware bug, right? that's fixed in rc3?11:00
lekernelit's not fixed in the PCB11:00
lekernelI had it once, even with the new bitstream11:00
lekernelthe software is able to recover from this condition by resetting the PHY11:00
lekernelso it's fixable in software on all boards no matter what11:01
awwolfspraul, http://downloads.qi-hardware.com/people/adam/m1/pic/button1_0x0c_wide.JPG11:01
lekerneli'd guess this has to do with the FPGA sending it a clock it doesn't like during startup phases11:01
awwolfspraul, http://downloads.qi-hardware.com/people/adam/m1/pic/button1_0x1c_wide.JPG11:02
awwith wider view, should be easily read it although it's narrow.11:03
lekernelbtw, the IR sensor output is inverted11:05
lekernelso IR signal present = 0 level11:05
wolfspraulI read this as 1100000000000111:05
wolfspraulmaybe I get it wrong though :-)11:05
lekernelno IR signal present = 1 level11:05
kristianpaulwhat? clang-lm3211:12
kristianpauldoes it works?11:13
lekernelthere's no difference between the two pictures... is there?11:13
lekernelkristianpaul, partly, see email on list11:13
kristianpaulsure sure, just waking up here :-)11:13
lekernelthis looks like RC5, but with 0x01 code, not 0x0c or 0x1c11:14
wolfspraulthat's good because he pressed the '1' button11:15
wolfspraulno difference? the signal looks different to me at the beginning (third bit), but I probably misread the whole thing...11:15
wolfspraulbut if you read it as 0x01, even better11:16
lekernelah, yeah, but that's the toggle bit I gues11:16
lekernelso that one is RC511:16
lekernelbut the fpga core doesn't decode it correctly11:16
wolfspraulor we do something wrong in how we read 0x0c/0x1c11:17
lekernelit should be just a read of a memory mapped register in the FPGA11:17
lekernelyou can try with the mr command in BIOS11:18
wolfspraulxiangfu said he got different values when running the test software vs. the flickernoise gui :-) he's looking into that now11:18
lekernelget it to work with "mr" in BIOS first11:18
lekernelmore layers = more sources of problems11:18
wolfspraulso we agree that the scope pic looks like a clean 0x01, that's a start :-)11:19
wolfspraulroh: when you laser the button pieces, can you take the protective films off before you laser?12:16
wolfspraulI think it's crazy work to take off all the film from those little pieces...12:16
wolfspraulI hope you can ship the buttons pre-assembled anyway, but that may we one way to take out some work...12:17
xiangfui just try button1 in bios. read it by [mr 0xe000e000 4]12:36
xiangfuI got 00001000, 0000100c 0000181c, inconsistent values12:37
wolfspraulxiangfu: looks like your first change to fix a bug in Verilog :-)12:38
xiangfuI tried ~30 times. I also get 0000101c, 00001804, 000010fc12:39
xiangfuseems all random.12:39
wolfspraulis that with the same remote control like Adam's?12:39
xiangfuyes. I am use the same remote control Adam sent to me.12:39
wolfspraulso for now let's assume it sends a proper rc-5 code to your m112:39
wolfspraulwhich key are you pressing?12:39
wolfspraulok. I think you look in Verilog to see why it's coming in as 11x00000000001 on one side (we assume that now), and out as all sorts of numbers, instead of 0x0112:42
rohwolfspraul: the button spacers are already lasered.13:15
rohpre assembling them will delay everything massively. i will need to build rigs and manually glue them all.13:16
aw_wolfspraul xiangfu from my two waveforms (button1_0x1c_wide.JPG and button1_0x0c.wide.JPG) which we extracted from ir receiver's output is both the same 000-11111-111110, after inverted code (by visua) is 111-00000-00000114:08
aw_please ignore left 3rd bit which is for repeat mode.14:08
aw_thus this approves my current remoter and xiangfu's is totally correct and good remoter. so there's no such "different codes" from remoter at all.14:10
wolfspraulroh: who should glue them together?14:11
wolfspraulif 'pre assembling' them delays everything massively, I'm wondering whether post-assembling them will not delay 'everything' massively? don't understand14:12
wolfspraulI need about 20-30 minutes for 3 buttons, and after that there is glue everywhere, and the buttons look horrible, and don't fit/work well14:14
wolfspraulmaybe we can replace the middle piece with some gluing mass/rubber?14:18
wolfspraulwe can take the thickest two-sided glue film we can find, and then lay them over each other until it's thick enough to replace the middle piece14:19
wolfspraulthen we laser small round pieces out of this and voila, we only have to glue this between the bigger button piece and the colored front piece :-)14:20
wolfspraulroh: the buttons are my biggest concern right now14:33
wolfspraulI am not aware of any controlled way to assemble them in good quality14:33
wolfspraulwhen I do it, it ends up in a big mess, and not very functional either14:33
wolfspraulxiangfu has been a little better, but also far from polished look14:34
wolfspraulfrom my perspective, the biggest need is to remove the glue14:38
wolfspraulI think we have no chance to get it under control as long as we use glue14:39
wolfspraulmy m1 froze twice rendering over the last 3 hours or so...14:55
wolfsprauldidn't see this before, so it looks like a regression14:56
kristianpaultoo bad, what you did exactly?15:06
wolfsprauljust froze a third time15:07
wolfspraulsimply running a patch, nothing but power and vga connected, it was Aderassi - Variants of Eternity (shaking mix)15:07
wolfspraulkristianpaul: do you have a remote control?15:08
kristianpaulyes i do have some15:08
wolfspraulahh - froze again15:08
wolfspraulwell I can definitely reproduce the freeze right now, which is good :-)15:08
wolfspraulkristianpaul: have you ever tried one successfully with m1?15:08
kristianpaulno luck last time and lekernel point me to buy another brand of remote control..15:09
wolfspraulit turns out nobody but lekernel seems to have ever had IR remote working15:09
wolfspraulthe test routine we ran in rc2 was very, let's say 'generous'15:10
wolfspraulso it masked everything that was wrong successfully15:10
wolfspraulAdam has no working remote, neither does Xiangfu or me15:10
kristianpaulyeah i was rading backlog15:10
wolfsprauldid you try to get that remote Sebastien was suggesting?15:11
wolfspraulso all the ones you have don't work, oh well15:11
kristianpaulactually last thing i cared about mm1 was remote control..15:12
wolfspraulmaybe but that logic doesn't work with me. we have IR so it has to work.15:13
wolfspraulwe are quite generous in calling other people's stuff 'crap'15:13
wolfspraulI'm wondering whether Sebastien's remote is actually rc5 :-)15:14
wolfspraulor when he last used it...15:14
wolfspraulsomething is strange15:14
kristianpaulsure sure, not saying is not important, just i dint look it at it yet15:15
wolfspraulyes same here15:15
wolfspraulbut now that I do look at it it's quite an surprise :-)15:15
kristianpauli bet is not used too much..15:33
kristianpaulhi mumptai15:38
wolfspraulkristianpaul: yes, definitely not used much :-)16:20
--- Wed Jun 8 201100:00

Generated by irclog2html.py 2.9.2 by Marius Gedminas - find it at mg.pov.lt!