Hi all,
just to let you know that it worked. I came across some issues but i managed to fix them.
One of the issues was that i had to use a 10K pull down resistor between my logger and the new receiver.
I kept a simple code and it works and no loss of data was found.
here's the tryout code:
Thanks for the helpCode:'**************************************************************** 'PINS n5 var GPIO.5 n4 var GPIO.4 BUT var GPIO.3 led var GPIO.2 n1 var GPIO.1 IN var GPIO.0 '***************************************************************************** DEFINE OSCCAL_1K 1 define OSC 4 '***************************************************************************** @ DEVICE pic12F675, INTRC_OSC_NOCLKOUT @ DEVICE pic12F675, WDT_OFF @ DEVICE pic12F675, PWRT_OFF @ DEVICE pic12F675, MCLR_OFF @ DEVICE pic12F675, BOD_ON '***************************************************************************** Include "modedefs.bas" ' Include serial modes DEFINE debug_reg gpio DEFINE debug_bit 1 DEFINE debug_baud 9600 DEFINE debug_mode 1 DEFINE DEBUGIN_REG GPIO DEFINE DEBUGIN_BIT 0 DEFINE DEBUGIN_MODE 1 '***************************************************************************** ADCON0=0 ANSEL=0 CMCON=7 trisio=%00111001 GPIO=0 '***************************************************************************** START: led=0 if but=1 then goto rc else goto start endif rc: led=1 DEBUGIN [DEC VALUE] DEBUG dec VALUE,13,10 goto rc end![]()




Bookmarks