Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Nigel Goodwin in his tutorials
This is the way the bits are actually sent, a bit 1 is a transition from 0 to 1, and a bit 0 is a transition from 1 to 0.
I think overall result will be the same... but i want to know which is the right way... Any Standered???Melanie in web (ericgibbs posted the link)
8 bit byte becomes 16 bits to transmit... zero's become "01" and ones become "10".
program RRX
dim error, ErrorCount, temp as byte
main:
ErrorCount = 0
TRISB = 0
CMCON = 7
' VRCON = 0 ' Uncomment the line for PIC16
Lcd_Init(PortB) ' Initialize LCD on PORTB
Lcd_Cmd(LCD_CLEAR)
Man_Receive_Config(PORTA,3) ' Configure and synchronize receiver
while true
Lcd_Cmd(LCD_FIRST_ROW)
while true ' Wait for the start marker
temp = Man_Receive(error)
if temp = $0B then
break
end if ' We got the starting sequence
if error then ' Exit so we do not loop forever
break
end if
wend
do
temp = Man_Receive(error) ' Attempt byte receive
if error = true then
Lcd_Chr_Cp(63) ' ASCII for "?"
Inc(ErrorCount)
if ErrorCount > 20 then
Man_Receive_Init(PORTA)
' alternative:
' temp = Man_Synchro
ErrorCount = 0
end if
else
if temp <> $0E then ' Don't write the end marker on LCD
Lcd_Chr_Cp(temp)
end if
Delay_ms(20)
end if
loop until temp = $0E ' Wait for the end marker
wend
end.