I see your code, and I raise you...ok, never mind...
Seems a bit goofy in my mind, but give this a shot:
(yes there is a bunch of colons here, only so I can see more of it on the screen)
Code:DEFINE HSER_RCSTA 90h 'ALWAYS capitalize DEFINEs DEFINE HSER_TXSTA 20h DEFINE HSER_SPBRG 25 ccp1con = 0 : ccp2con = 0 : adcon1 = 6 : trise = 7 : trisc = 191 porte = 0 : trisa = 255 : trisb = 0 : trisd = 255 : portEval var byte portCval var byte : portCfinval var byte : stripBit var bit portDval var byte : portAval var byte : IdNumber var byte OutVal var byte : btvar var byte : oldbtvar var byte : portb = 0 START: portcfinval = portc & $3f if porta <> portaval then portaval = porta : hserout [#porte,"A",#porta,13,10] endif if portd <> portdval then portdval = portd : hserout [#porte,"D",#portd,13,10] endif if (portcfinval <> portcval) then portcval = portcfinval : hserout [#porte, "C", #portcfinval, 13,10] endif hserin ,100,start,[Idnumber] : porteval = porte if idnumber <> porteval then start HSERIn ,500,START,[Btvar] if ( btvar => 48 ) and ( btvar <= 55 ) then oldbtvar = btvar - 48 : HSERIn, 1000 , START , [btvar] if btvar <= 49 then outval.0[ oldbtvar ] = btvar.0 portb = outval : goto start endif goto start




Bookmarks