Electronic Design

  
Reprints     Printer-Friendly    Email this Article    RSS        Font Size     What's This?


[Ideas For Design]
Use A PIC12C508 To Emulate An MM53200 Coder/Decoder

Contributing Author  |   ED Online ID #4602  |   August 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 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.


Reprints   Printer-Friendly  Email this Article  RSS    Font Size   What's This?


  • In EDA, A Year Of Mergers, Failed And Otherwise
  • 2008 BEST Electronic Design Winners
  • Engineers Rely On Internet For Product Info
  • Rochester Electronics Establishes New Design and Technology Group
  • November 17, 2008
  • Custom Sources Light Way To 22-nm IC Lithography
  • Software Turns Scopes Into Vector RF Signal Analyzers
  • Couple’s $15 Million Gift Advances Rice Engineering Education
    1) Behind The Bright Lights, LED Drivers Evolve To Meet New Requirements
    (721 views today)
    2) Build A Smart Battery Charger Using A Single-Transistor Circuit
    (270 views today)
    3) Wi-Fi Chips Stand Out In A Sea Of Wireless Products
    (194 views today)
    4) What's All This "Adjustable Slew Rate Stuff," Anyhow?
    (185 views today)
    5) Ten Top Design Skills For Tough Times
    (184 views today)
    ALL TOP 20



    Reader Comments

    Please, I need de code and circuit to the transmisor. Thank you.

    ALNAJEM -February 21, 2008

    Please, I need de code and circuit to the transmisor. Thank you.

    Sterzender -July 12, 2007   (Article Rating: )

    necesitoel esquematico d un tx y rx pra alarma tipo llaveo

    enrique -December 24, 2006

    solicito informacion remplazo del circuito integrado MM53200N cual integrado lo rempalza? Gracias es urgente

    Atte JUan David R

    JUan David Roncnaio -July 02, 2006

    good project, but how about a decoder? may be somebody has already done the job, any news?

    jonathan -June 03, 2006   (Article Rating: )

    good idea, but how to get the codes of the mm53200?

    Anonymous -May 21, 2006

    Hallo, This is very interesting,i want to try! Can you please give de code so i haven't to type everthing,let you now what the result are.

    Thank you

    Sterzender -April 24, 2006

    Crickey! If you don't want to 'type' anything what's the use of you making anything? Why no just go to the store and buy it? Just some advice; no programmer is just going to hand over his hard-won code over to you, you might get help but YOU have to put in some work too. That means you have to learn how to program - yes it takes a few years to get reasonable at it, but hey that's the fun of it! But from the sounds of you you are just to plain lazy to ever become a good programmer or any sort of programmer. Best you change your attitude or just asking stupid questions instead.

    Beepo -April 16, 2006

    Crickey! If you don't want to 'type' anything what's the use of you making anything? Why no just go to the store and buy it? Just some advice; no programmer is just going to hand over his hard-won code over to you, you might get help but YOU have to put in some work too. That means you have to learn how to program - yes it takes a few years to get reasonable at it, but hey that's the fun of it! But from the sounds of you you are just to plain lazy to ever become a good programmer or any sort of programmer. Best you change your attitude or just stop asking stupid questions.

    Beepo -April 16, 2006

    Hallo,

    That is something very interesting a want to try! Can you please give de code so i haven't to type everthing..Y let you now the result.

    Thanks

    Geert -October 24, 2005   (Article Rating: )

    It is very interesting to use a pic in substitution of the MM53200N as an encoder, Have you made something about the decoder?

    Miguel A. Delgado -September 20, 2005

    Thank you for your collaboration. This site is good and very useful.

    Jorge Cano -February 01, 2005   (Article Rating: )

    This site is well but I need a PIC microcontroller. Can this site send us the supplier info!!!!!!!!!

    Iqramul Hoque -January 15, 2005

    Please, I need de code and circuit to the Transmisor by this system...

    Tanke You for you colaboration...

    Pedro Angel -September 20, 2004

    POST YOUR COMMENTS HERE
    Name:

    Email:
    Your Comments:

    Enter the text from the image below


    Please refresh the page if you have trouble reading this text.

    Search Electronic Design
         
      
     
    Web Seminar
    Sponsored By:
    Title: Read Pacing: A Performance Enhancing Feature of PCI Express Gen 2 Switch Devices
    Speakers: 
    Date: 07/01/08
    Register: 

    Electronic Design Europe Electronic Design China EEPN Power Electronics Auto Electronics Microwaves & RF
    Mobile Dev & Design Schematics Find Power Products Military Electronics EE Events Related Resources