Hi, hopefully a simple one this time. i want my chips to startup and wait for a serial command. the serial data is (250),lineid then a string of bytes. the chip needs to send out the whole string on another pin but add 1 to the lineid. my code so far is this.
Code:
serin2 porta.2,n9600,[WAIT(250),lineid,str tinput\8\0]
lineid=lineid+1
serout2 portb.4,n9600,[250,lineid,str tinput\8]
this works fine aslong as i send 8 bytes after the line id. is there a way i can make it wait for 250 and the lineID then take whatever it can after that and pass it on?
the chips will be linked to each other but they dont know how many chips there are and the string of bytes is (4 * number of chips) long
also, how do i tell how many characters came in? is there a len() function like VB or ubound()? if not then i know a way i can work round it
Bookmarks