Use A PIC12C508 To Emulate An MM53200 Coder/Decoder

Aug. 7, 2000
Depending on the logic state of a single configuration pin, the popular MM53200 can be used either as a remote-control coder or decoder. The coding function, however, is much simpler than the decoding one. Therefore, it lends itself quite well to...

Depending on the logic state of a single configuration pin, the popular MM53200 can be used either as a remote-control coder or decoder. The coding function, however, is much simpler than the decoding one. Therefore, it lends itself quite well to emulation in software.

Using a PIC12C508 for this purpose has several advantages. Among them are a significantly lower price, a smaller footprint, and the opportunity to eliminate the traditional DIP switch. Plus, the PIC12C508 prevents unauthorized individuals from tampering with the program code, or from simply taking any illegal peeks at it. As shown in the listing, the actual 12-bit remote key code is written into the EPROM of the PIC as an integral part of its program.

The ORG 40 directive carefully skips the 64 first memory locations that are known to be excluded from the PIC’s code-protect function.

This sample program makes use of a 100110110001 code. For the 1 state (DIP switch off), programming is executed by calling the hibit routine. To program the 0 state (DIP switch on), the lobit routine is called. While the start routine implements the start pulse, the pause routine times the repetition rate of the code transmissions. All the timings derive from the bit routine. This is specifically calibrated for a clock-resistor (R1) value of 47k and a capacitor (C1) of 270 pF (see the figure).

Please note that the MM53200 used as the corresponding decoder should use 100k and 270 pF to achieve optimal synchronization. Of course, it would be possible to make use of other values with the same ratio between the RC products in the circuits of the coder and decoder. Alternatively, the bit routine could be modified (e.g., by the addition of NOPs) in order to determine a different ratio.

One major benefit of this design is that it leaves room in the PIC’s program memory for additional software. For example, it could accommodate a second MM53200 code segment containing separate on and off functions.

A practical application could be a remote temperature-operated switch, using only a thermistor and simple analog-to-digital converter software (see Microchip’s applications notes at www.microchip.com).

Extra I/O lines and larger program memory may be needed for some applications. In this case, the code can be easily adapted to the PIC12C509 or to other larger PIC processors.

Sponsored Recommendations

Board-Mount DC/DC Converters in Medical Applications

March 27, 2024
AC/DC or board-mount DC/DC converters provide power for medical devices. This article explains why isolation might be needed and which safety standards apply.

Use Rugged Multiband Antennas to Solve the Mobile Connectivity Challenge

March 27, 2024
Selecting and using antennas for mobile applications requires attention to electrical, mechanical, and environmental characteristics: TE modules can help.

Out-of-the-box Cellular and Wi-Fi connectivity with AWS IoT ExpressLink

March 27, 2024
This demo shows how to enroll LTE-M and Wi-Fi evaluation boards with AWS IoT Core, set up a Connected Health Solution as well as AWS AT commands and AWS IoT ExpressLink security...

How to Quickly Leverage Bluetooth AoA and AoD for Indoor Logistics Tracking

March 27, 2024
Real-time asset tracking is an important aspect of Industry 4.0. Various technologies are available for deploying Real-Time Location.

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!