Dave
Always wear safety glasses while programming.
I'm in a serious bind. Is the original code for the Rentron's TX-IR PIC obtainable? I need the 38kHz PWM code (50%) duty cycle. I'm using an external 4MHz oscillator. I can not seem to duplicate it since I'm still trying to interface to an emulator to debug. I've simply run out of time. Any help would be greatly appreciated! Below is what I think it is.
----------------
PROCESSOR p12f609
#include "p12f609.inc"
__CONFIG _MCLRE_OFF & _CP_OFF & _WDT_OFF & _XT_OSC
#DEFINE PORT B'11111101'
MOVF OSCCAL
MOVLW PORT
TRIS GPIO
BEGIN
BCF GPIO, 1 ;1uS
NOP ;2uS each nop is 1uS long
NOP ;3uS
NOP ;4uS
NOP ;5uS
NOP ;6uS
NOP ;7uS
NOP ;8uS
NOP ;9uS
NOP ;10uS
NOP ;11uS
NOP ;12uS
BSF GPIO, 1 ;1uS Begin HIGH duty cycle
NOP ;2uS
NOP ;3uS
NOP ;4uS
NOP ;5uS
NOP ;6uS
NOP ;7uS
NOP ;8uS
NOP ;9uS
NOP ;10uS
NOP ;11uS
NOP ;12uS
GOTO BEGIN ;2uS (26uS total for 38KHz)
END
Bookmarks