I am using the oshonsoft pic basic pro to write the code my Rx and Tx code are as follows:
(Transmit)
Dim a1 As Byte
Dim temp1 As Byte
EEPROM 21, 4
scan:
If PORTA.2 = 0 Then
Gosub loop
Endif
Goto scan
End
loop:
WaitMs 50
Serin PORTC.1, 9600, temp1 'Rx port 8
Serout PORTC.0, 9600, #temp1
'Write 21, a1
If temp1 <> 0 Then
a1 = temp1
Write 21, a1
Gosub menu
temp1 = 0
Endif
Return
(Receive)
main:
Read 21, a1
Lcdcmdout LcdClear
Lcdcmdout 0xc0
Lcdout #a1
If PORTA.3 = 0 Then
PORTC.2 = 1
Serout PORTC.1, 9600, #a1
a1 = a1 + 1
Write 21, a1
PORTC.2 = 0
Endif
WaitMs 1000
Goto main
end
************************************************** ********
i manage to see the output from the simulator for my Tx routine ,i am sure the data is sending out but the receiver site can't receive it.why?




Bookmarks