Difference between revisions of "CSC270 Homework 10"
(→Problem #1) |
(→Problem #1) |
||
Line 12: | Line 12: | ||
</center> | </center> | ||
− | This picture is taken from the following Web site: http://www.sbprojects.com/knowledge/ir/nec.htm | + | This picture is taken from the following Web site: http://www.sbprojects.com/knowledge/ir/nec.htm . |
+ | |||
+ | It depicts part of a broader protocol for sending commands over infrared communication between a remote device and a receiver (consumer electronics device). | ||
+ | |||
+ | You will notice that to send a '1', the remot actually sends a burst (about 21 cycles) of a signal with a frequency of 38 KHz, followed by a gap with no activity with a duration of 2.25 ms - 560 us. Similarly, to send a '0', the remote sends the same burst of 38KHz (about 26 cycles), followed by a shorter gap of 1.12 ms - 560 us. | ||
+ | |||
+ | Write the assembly function that can be called to send a '1'. In other words, if we replaced your LED by an infrared LED, what is the program that the 6811 would have to execute to generate the first part of the waveform shown above? | ||
+ | |||
+ | Same question, but this time for sending a '0'. | ||
+ | |||
+ | If you put an RTS instruction at the end of your function, and call the first function SendOne, and the second function SendZero... |
Revision as of 11:36, 15 April 2009
--D. Thiebaut 18:51, 14 April 2009 (UTC)
Problem #1
This picture is taken from the following Web site: http://www.sbprojects.com/knowledge/ir/nec.htm .
It depicts part of a broader protocol for sending commands over infrared communication between a remote device and a receiver (consumer electronics device).
You will notice that to send a '1', the remot actually sends a burst (about 21 cycles) of a signal with a frequency of 38 KHz, followed by a gap with no activity with a duration of 2.25 ms - 560 us. Similarly, to send a '0', the remote sends the same burst of 38KHz (about 26 cycles), followed by a shorter gap of 1.12 ms - 560 us.
Write the assembly function that can be called to send a '1'. In other words, if we replaced your LED by an infrared LED, what is the program that the 6811 would have to execute to generate the first part of the waveform shown above?
Same question, but this time for sending a '0'.
If you put an RTS instruction at the end of your function, and call the first function SendOne, and the second function SendZero...