I took a picture of both circuit
receiving on the left
http://www3.sympatico.ca/lerameur/
its the exacte code you gave me :
'RECEIVE
INCLUDE "modedefs.bas"
DEFINE OSC 20 'use external 20mhz crystal
CMCON = 7 : ANSEL = 0 : ADCON1 = 7
DEFINE LCD_DREG PORTA ' Set LCD Data port
DEFINE LCD_DBIT 0 ' Set starting Data bit (0 or 4) if 4-bit bus
DEFINE LCD_RSREG PORTB ' Set LCD Register Select port
DEFINE LCD_RSBIT 1 ' Set LCD Register Select bit
DEFINE LCD_EREG PORTB ' Set LCD Enable port
DEFINE LCD_EBIT 0 ' Set LCD Enable bit
DEFINE LCD_BITS 4 ' Set LCD bus size (4 or 8 bits)
DEFINE LCD_LINES 2 ' Set number of lines on LCD
'try1 = count of times waiting for bytes, try2 = count of bytes received
try1 var byte : try2 var byte : temp var word : tempf var word : input portb.3 : pause 2500
loop:
lcdout $fe , $c0 , "Waiting..." , DEC3 try1 , "," , DEC3 try2
try1 = try1 + 1
serin portB.3 , n2400 , 1000 , loop , [ temp.highbyte , temp.lowbyte , tempf.highbyte , tempf.lowbyte ]
try2 = try2 + 2
lcdout $fe , $c0 , "Received.." , DEC3 try1 , "," , DEC3 try2
lcdout $fe , $c0 , "Displaying" , DEC3 try1 , "," , DEC3 try2
lcdout $fe , $80 , "Tc=" , DEC temp , "C,Tf=" , DEC tempf , ".."
lcdout $fe , $c0 , "Displayed." , DEC3 try1 , "," , DEC3 try2
goto loop
End
Bookmarks