Just the nice and simple chassis.            

11.1 MSP430F2011 as an IR coder, with 38kHz carrier, for RC set RX/TX2.

  This is exactly the same as described on this page, only the IR version. The main difference, we added 38kHz carrier, which is necessary for IR receiver to work.

  The schematic diagram has changed slightly. Added IR LED and driver (2n7000) to provide additional current.

    


11.2 Software for MSP430F2011.

   In addition to the comment with which the program was poured, you should know:

1. We can have any MCLK (main processor clock speed or frequency) while playing with DCOCTL & BCSCTL1. At real: 60kHz to 22MHz;

2. In MSP430F2011, we are able to output internal clock frequency (SMCLK) to P1.4, only. And SMCLK=MCLK/1,2,4,8.

  Therefore, we lower main clock frequency to 304kHz, divide it by 8 to get SMCLK = 38kHz, and output this frequency to P1.4 (if necessary).

  Below is a program. If you are a programming teacher, you can show it to students as an example of “how not to program”. But I want to upset you - 99% of the programs are written that way, fast & simple. And it works so you don't doubt it.


  Finally, to move this program (txt) into a microcontroller you do not have to buy an expensive programmer. LaunchPad makes it better and faster. It has been described in "LaunchPad as programmer & debugger", and you can be sure of it.



11.3 Let's look at the result.
/*you could compare this with the diagrams on the previous page*/

  11.3.1   Average performance when a command, containing 10 pulses, is transmitted.



  11.3.2   And an accuracy of filling pulses with a carrier's frequency of 38kHz.

  

  11.3.3   As a result, we are in the accuracy range of 10%, even taking into account the fact that we lowered the voltage from +3.6V to +3 Volts when we measured. It is enough that the toy understands the code without errors. The toy (RX2 decoder) will not feel the difference vs original remote : )

  If greater accuracy is needed, then  timing's constants what needs to be corrected (tuned) is visible in the code. 


Enjoy.



*** Any inaccuracies on this page will be corrected if you let me know (e-mail is highlighted next :)  ***

27.12.2019 SKootS

Make a free website with Yola