I have wasted countless hours writing "test" programs to try and figure out why seemingly simple tasks don't work properly with a Picaxe.
In this case it involves the high speed serial commands. I have tried a dozen different ways to parse incoming 9600 baud data looking for a particular string.
I tried both background and hserin. I was using sertxd to send some data to the terminal but figured that was slowing things down. So I went with blinking an led when the string was found in the data stream. Even at 16Mhz, the absolute smallest simplest loop doesn't catch all the occurrences of the string. ("FA")
setfreq m16
HSERSETUP B9600_16,%110
top:
hserin 0,14,("F")
get 0,b5
if b5=65 then pulsout d.1,5000
endif
goto top
A fun fact I found while working on this: The ptr for the scratchpad goes all the way to 1023.
P.S. The data stream is blocks of data with short pauses between blocks.
Your thoughts?
Thanks, Al
In this case it involves the high speed serial commands. I have tried a dozen different ways to parse incoming 9600 baud data looking for a particular string.
I tried both background and hserin. I was using sertxd to send some data to the terminal but figured that was slowing things down. So I went with blinking an led when the string was found in the data stream. Even at 16Mhz, the absolute smallest simplest loop doesn't catch all the occurrences of the string. ("FA")
setfreq m16
HSERSETUP B9600_16,%110
top:
hserin 0,14,("F")
get 0,b5
if b5=65 then pulsout d.1,5000
endif
goto top
A fun fact I found while working on this: The ptr for the scratchpad goes all the way to 1023.
P.S. The data stream is blocks of data with short pauses between blocks.
Your thoughts?
Thanks, Al