12f675 IR transmitter

Discussion in 'Embedded Systems and Microcontrollers' started by picme, Oct 27, 2009.

  1. picme

    Thread Starter New Member

    Oct 26, 2009
    2
    0
    Hi, I'm experimenting with a project to send a stored ir command when a switch or sensor is tripped.

    I've found various code examples online showing the timing aspect of the 38khz carrier and sending the input from a pc.

    I'm stuck in how to program in EEPROM an ir code so it isn't lost on power down.

    I'm using a Microchip PICkit 1, so I'm somewhat restricted to the 12F675.

    Any help anyone can provide, or a site with better code samples then those I've found, would be appreciated.

    Thanks,
     
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    I guess I don't quite understand your question.

    Are you talking about a fixed series of IR codes to indicate which input tripped?

    Or are you talking about trying to save the state of what tripped it to begin with in EEPROM?

    There are no Assembler commands for writing to EEPROM in the PIC10/PIC12/PIC16 series uC's during program execution. However, you could store the data in literals that will get programmed in with the program and retained in the EEPROM for retrieval during execution.

    It would help if you could provide some code samples, and explain what kinds of "IR codes" you would like to program/save/send.
     
  3. picme

    Thread Starter New Member

    Oct 26, 2009
    2
    0
    I'm trying to save one or perhaps two ir commands saved in EEPROM. I guess the ir commands would be in a lookup table in memory. A switch would then tx the ir command.
     
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Yep, a lookup table would work just fine.
     
Loading...