Resolved! How to collect ir pulse streams in asm?
ratronic
Posts: 1,451
The code that is attached does work , but the seven bit·data stream, the way I am collecting it, is inverted and I have to·xor it for proper display. I have been looking in the prop manuel but I can't see any thing there that would let me·collect them non inverted in the first place.·Am I missing something? Could one of you look at the code and tell me if there is a better way to collect the stream? And also if there is something that I should be doing different? This is just for personal education!! Thanks Dave.·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Ratcliff· N6YEE
Post Edited (ratronic) : 9/18/2007 3:11:05 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
D RatFix it if ain't broke·
Dave Ratcliff· N6YEE
Post Edited (ratronic) : 9/18/2007 3:11:05 PM GMT
spin
2K
Comments
(1) All special registers are zero when a COG starts, so you need not clear pin0.
If complex I/O settings must be used just define a LONG and move it onto DIRA. I suspect you do not want to disturb other COGs... Never mind! DIRA is your own personal copy! only a "1" is valid and "written through"
(2) You should write sub t2, t1 rather than subs t2, t1 to be more clear in what you do; however SUBS performs the same computation as SUB, just the carry is set differently and you do not use it...
(3) For the same reason CMPS is more confusing than CMP in this context, but will work of course..
(4)
is generally coded as:
(4) This looks very strange:
(5) You shift a bit (=carry) whenever a pulse is between 32_000 and 64_000 ticks. When you change the parameters of CMPS the carry will be set, when the pulse is >64_000 ticks - that simple! So just:
will do the trick - I think
Post Edited (deSilva) : 9/17/2007 8:29:33 PM GMT
Dave.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ D Rat
Dave Ratcliff· N6YEE
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ D Rat
Dave Ratcliff· N6YEE