That's because the ASCII code for "S" is 83 which is what you're sending. To display "83", on the receiving end, do:Code:serout2 portc.6,16468,[DEC dta]
That's because the ASCII code for "S" is 83 which is what you're sending. To display "83", on the receiving end, do:Code:serout2 portc.6,16468,[DEC dta]
tq for the sugesstion. one more question, how can i display '83' in LCD? is this code below relevant?
Code:@ device hs_osc define osc 20 define LCD_EBIT 1 DEFINE LCD_RSBIT 0 DEFINE LCD_DBIT 4 DEFINE LCD_DREG PORTC DEFINE LCD_RSREG PORTC DEFINE LCD_EREG PORTC dta var word main: high portb.0 pause 50 serin2 portc.7,84,[wait("A"),dta] pause 50 serout2 portc.6,16468,[dta] LCDOUT $FE,1 lcdout #dta low portb.0 pause 50 goto main
Hi,
I'm sorry, I thought you where using a serial LCD and SEROUT2 to write to that display since there was no LCDOUT in the code in your first post.Have a look at the manual for the various modifiers that can be used.Code:dat VAR BYTE dat = 83 LCDOUT $FE, 1, "dat = ", #dat
Bookmarks