I see I did it again in my reply (for 1 to 12)
trust me -- it's for 0 to 12
jeeez
I see I did it again in my reply (for 1 to 12)
trust me -- it's for 0 to 12
jeeez
Michael, I'm no expert but some of your references to DATAIN include brackets and an array element identifier after them, others don't.
In the serin command does picbasic know to put the received data byte into sequential bytes of the datain array, or should yo be putting that command in a loop and incrementing the array pointer with every pass through ?
Chris --
I've never used array either in picbasic anyway.
You're probably right -- there has to be more to the serin code than what I have shown. ? But all I see with SERIN in the books is how I have it set up.
I do get some action if I use separate byte variables rather than an array --
like [QUAL1,QUAL2],b0,b1,b2,b3,b4 etc
but I really want to use an array -- and to learn how as well.
Everything is setup fine on the breadboard -- I see the data with my scope etc.
Maybe someone can point to the problem, in the mean time I need to study some more on it.
Look at SERIN2.
Dave
Always wear safety glasses while programming.
Working with the condition that you know you will receive 13 bytes of data in advance
For Bytes = 0 to 12
SerIn PORTA.0,N1200,[QUAL1,QUAL2],DATAIN[Bytes]
Next
Does the SerIn command also have a timeout which is similar to how I remember Hserin working, IE if no data is received for a predefined period the command makes a jump to another label in order to escape the loop.
Ok -- I'll try that -- I would have thought it would automatically load all the bytes you declare in the array.
Whatever -- I'll try it. thanks.
still no luck -- 2 days on this.
I think "STR" needs to be in there somewhere but as always the PBP manual is extremely vague and can't google much on it.
Did you see post #10 ?
Dave
Always wear safety glasses while programming.
Bookmarks