You will build a IR remote key and base-lock. Your project will have to act as both the base-lock and the remote key (but not at the same time, except for testing). The key will lock/unlock someone else's base-lock, if authorized. Their key will lock/unlock your base-lock, if authorized. All IR communication will be encrypted. You will be required to use a multitasking kernel and write your program as tasks within the kernel API.
For this assignment you must write your code for a multitasking kernel called Tiny Real Time (TRT).
Look through the examples on the TRT page to see how to use the API and to download the kernel.
You must edit the trtSettings.h file!
If the kernel continually resets then:
mainbecomes the default task. Don't put any initialization or other code in
mainexcept for the uart init.
(deadline) - (release time)should be greater than the LCD update time so that the kernel can meet all the deadlines. If you give a slow task a release time equal to it's deadline, then it has to execute in zero time to meet deadline, and nothing else can run until the slow task completes. Experiment with this test code by changing the difference in the
spoilertask while watching A.0 on the scope. Generally speaking, the deadline-release time difference should be greater than the execution time of the thread between kernel sleep calls. Mount at least two LEDs and push buttons for testing, as explained in the code.
IR control link
Use this IR packet system which will require that you include the timer0 ISR for full-duplex IR handling.
You will port the transmit and receive routines to TRT.
Write two to four tasks using the TRT kernel API and construct a circuit which will:
pwm=xxwhere the 'xx' is the PWM value in percent.
To test, you can use the TAs reference IR transceiver. You will demo all the features above to your TA. Your program should not need to be reset during the demo.
Your written lab report should include the sections mentioned in the policy page, and :