I tried ansel =o all you told me, and remove the boatloader. Dont even know why it was there. There is no change in the system .
If I am sending $aa on the tramsitter pic, shouldn'y I get that also on the LCD on the transmitter?
I have four output on my transmitter. Here is your code to with only four values, the rest I didnot change it. None of the leds are lighting besides the initial feed:
'RECEIVER CODE
DEFINE OSC 20 '20Mhz Oscillator was used
Include "modedefs.bas" ' Include serial modes
ADCON0 = 0 'AD MODULE OFF & CONSUMES NO CURRENT
CMCON = 7 'COMPARATORS OFF
TRISA = $00 : TRISB = $FF 'all porta is outputs, all portb is inputs
B0 var byte
'testing led outputs
porta.0 = 1 : pause 200 : porta.0 = 0
porta.1 = 1 : pause 200 : porta.1 = 0
porta.2 = 1 : pause 200 : porta.2 = 0
porta.3 = 1 : pause 200 : porta.3 = 0
start:
B0 = 0 'empty B0 because the program doesn't
serin PORTB.3,n2400,[B0] 'if n2400 doesn't work, try t2400
if B0 = $AA then ledson 'manchester encoded $f
if B0 = $55 then ledswing 'manchester encoded $0
if B0 = $5a then led1toggle 'manchester encoded $1
if B0 = $65 then led2toggle 'manchester encoded $2
goto start
led1toggle:
if porta.0 = 1 then
porta.0 = 0
else
porta.0 = 1
endif
goto start
led2toggle:
if porta.1 = 1 then
porta.1 = 0
else
porta.1 = 1
endif
goto start
ledson:
porta.0 = 1 : porta.1 = 1 : porta.2 = 1 : porta.3 = 1
goto start
ledsoff:
porta.0 = 0 : porta.1 = 0 : porta.2 = 0 : porta.3 = 0
goto start
ledswing:
porta.0 = 1 : pause 10 : porta.0 = 0
porta.1 = 1 : pause 10 : porta.1 = 0
porta.2 = 1 : pause 10 : porta.2 = 0
porta.3 = 1 : pause 10 : porta.3 = 0
goto start
end
Bookmarks