Thanks, but your code lacks some commands as I can see, like:
OSCCON = %01110111
to set OSC clock to 8mhz
Thanks, but your code lacks some commands as I can see, like:
OSCCON = %01110111
to set OSC clock to 8mhz
And it is quite interesting, if it's possible to decode air conditioner remote codes? they are very long and very weird![]()
You cannot assume that just by see "DEFINE OSC 8", because he can be using an external osc. You can only assume that, it he had post the config fuses.
One more thing, about this
What's the reference of your IR receiver? Because some need a pull up resistor, when your are not using it.There's nothing much to post in schematic, the receiver is hooked as it should, GND goes to GND, VDD goes to VDD, and OUT is connected to PORTC.4
Thanks and Regards;
Gadelhas
I've solved the problem, but code is quite weird
Code looks like this:
Code:MAIN: PULSIN FLASH,1,SOMEVAR IF SOMEVAR<50 AND SOMEVAR >20 THEN GOTO KOUNT GOTO MAIN KOUNT: INCREMENT=INCREMENT+1 IF FLASH=1 THEN POS=POS+1 ELSE NEG=NEG+1 IF INCREMENT>1000 THEN GOTO COMPLETE GOTO KOUNT COMPLETE: IF POS>100 AND POS<300 AND NEG>1000 AND NEG<3000 THEN GOSUB JOB: POS=0:NEG=0:INCREMENT=0 GOTO MAIN JOB: TOGGLE RELAY1 RETURN END
Last edited by CuriousOne; - 22nd December 2013 at 18:52.
Bookmarks