Editing A Tutorial on PIC interrupts using BoostC including Example Programs

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 144: Line 144:
 
* Issue: How do we know when to start receiving?
 
* Issue: How do we know when to start receiving?
 
Response 1: If the IR signal has been quiet for a period of time over about 0.1 sec then the next transition must be the beginning of the signal.
 
Response 1: If the IR signal has been quiet for a period of time over about 0.1 sec then the next transition must be the beginning of the signal.
 
 
Response 2: If the signal has error checking built in: start receiving wherever and check if the data is good.  If it is then you must have started at the beginning.  In any case you are now at the end and start receiving the next burst at the beginning.
 
Response 2: If the signal has error checking built in: start receiving wherever and check if the data is good.  If it is then you must have started at the beginning.  In any case you are now at the end and start receiving the next burst at the beginning.
  
 
* Issue: How do we know when a received message is finished?
 
* Issue: How do we know when a received message is finished?
 
Response 1:  Count the number of transitions in the received signal; done when we get up to the required count.  But if we miss a transition we could be stuck.
 
Response 1:  Count the number of transitions in the received signal; done when we get up to the required count.  But if we miss a transition we could be stuck.
 
 
Response 2: Wait until a quiet period indicates the end of the signal.
 
Response 2: Wait until a quiet period indicates the end of the signal.
 
 
Response 3: Some protocols have a special “pulse” or something that we can detect at the end.
 
Response 3: Some protocols have a special “pulse” or something that we can detect at the end.
  
 
* Issue:  How do we know the data is good?
 
* Issue:  How do we know the data is good?
 
Response 1: It usually is, hope for the best.
 
Response 1: It usually is, hope for the best.
 
 
Response 2: Many protocols have a fixed number of transition, so count and compare.
 
Response 2: Many protocols have a fixed number of transition, so count and compare.
 
 
Response 3: Some protocols have error checking built in.  For the NEC protocol the data in the third byte is repeated, and inverted in the fourth byte.  If you exclusive-or (XOR) the bytes together, you should get FF or 11111111.
 
Response 3: Some protocols have error checking built in.  For the NEC protocol the data in the third byte is repeated, and inverted in the fourth byte.  If you exclusive-or (XOR) the bytes together, you should get FF or 11111111.
  

Please note that all contributions to OpenCircuits may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see OpenCircuits:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)