Hi all,

I need help with serin2, Im using a pic16F648A to control a parallel 20X4 LCD
with the famous chipset everyone knows and loves. the problem is that when i try to receive serial data (sent from a BS2p) i only seem to get a bytes worth of data tho i have my holding variable set to a word. I PBP alot but never really messed with serin much, I know people dont like treading into the whole parallel to serial LCD conversion waters because someone makes alot of money making these things, but come on, its hobby electronics! i just want to get some serial data in and some words on an LCD out.. no big deal.
I've tried using DEC, not using DEC, in both Pbasic and PBP, i've tried using STR variables in PBP and get gibberish out of the LCD.. i'd like to be able to use all the characters on my display! please, someone help.

my BS2p Code: (for testing, not for my end use)

PAUSE 2000
main:

SEROUT 0,17405, [DEC 0] ' displays on fine as long as DEC is in PBP code
PAUSE 1000 ' in front of variable "holder" both in serin2 and
' LCDOUT

PAUSE 1000
SEROUT 0,17405, ["hello"] ' only get the "h"

SEROUT 0,17405, [DEC 255] ' same as DEC 0, get it just fine

PAUSE 1000
SEROUT 0,17405, [DEC 266] ' displays as 6....

SEROUT 0,17405, [DEC 65535] ' wrap around i guess? 65528 is displayed!
PAUSE 1000
GOTO main

My PBP code: (again.. not final)

CMCON = 7 ' Turn off un-needed PIC hardware
VRCON = 0
CCP1CON = 0
INTCON = 0

holder var word

pause 1000

Main:
PAUSE 1000 ' allow LCD to self-initialize first
LCDOUT $FE, %00110000 ' send wakeup sequence to LCD
PAUSE 5 ' pause required by LCD specs
LCDOUT $FE, %00110000
PAUSE 0 ' pause required by LCD specs
LCDOUT $FE, %00110000
PAUSE 0 ' pause required by LCD specs
LCDOUT $FE, %00100000 ' set data bus to 4-bit mode
LCDOUT $FE, %00001100 ' display on without cursor
LCDOUT $FE, %00000110 ' auto-increment cursor
lcdout $FE, 1
pause 1
lcdout "waiting on BS2p" ' displays on LCD just fine!
goto main2:

main2:
holder = 0

serin2 PORTB.0, 16780, [dec holder] ' required to get decimal numbers out!
' else LCD displays junk, or ASCII?
lcdout $FE, 1

pause 10

lcdout dec holder ' dec needs to be there or junk comes
' out of LCD, never get any more
pause 2000 ' from a word than the first using
' anything!
goto main2: