2004-06-25 12:53 AM
remote control receiving failed randomly with Input capture of ST72F324
2004-06-24 03:19 PM
using input capture of ST72F324 to count the receiving signal from a remote control, but a extra bit(0) will be recognized (9th bit of total 16 byte) ,so the receiving is failed,
the strange thing is it seldom happens, average every 20 something times, and press the remote control unit again , the receiving will be Ok again. any idea to debug?2004-06-25 12:53 AM
Hi Kuni,
although I don't know the details of your problem I'll try to give you hint. If you read the Input Compare Register you should read the two bytes in the correct order: first the ICiHR and then the ICiLR. At least the Metrowerks cross-compiler will translate the C-code Int1 = IC1R; to ld A,IC1R:1 ; which is IC1LR ld Int1:1,A ld A,IC1R ; which is IC1HR ld Int1,A Reading the ICiLR first can bring you some problems. More detailes -> Have a look at the special Notes in the manual. The Cosmic Compiler does it in the right order. Hope I could help you woro