Jer, this was a little loop I was playing with. The bits commented-out were just things I was playing with.
It doesn't do anything special, just waits for 8 bytes.
<code><pre><font size=2 face='Courier'>
; set picaxe type
#picaxe 28x1
hsersetup B2400_4, %01 ' Set Hardware serial buffer speed,mode (auto)
Symbol Sp1 = b9
Symbol Sp2 = b10
Symbol Sp3 = b11
Symbol Sp4 = b12
Symbol Sp5 = b13
Symbol Sp6 = b14
Symbol Sp7 = b15
Symbol Sp8 = b16
'loop waiting for 8 bytes
main:
sp1=100:sp2=0:sp3=0:sp4=0:sp5=0:sp6=0:sp7=0:sp8=0
'hserin [1500,Giveup],0,8 ‘ receive 8 bytes into s/pad starting address 0
do
Serout 1,T2400_4,(b1) ' Dummy loop just for testing..
loop until Hserptr = 8 ' until ser pointer = 8 (i.e. loop here til 8 bytes)
hserinflag =0
Hserptr = 0
Get 0,sp1
Get 1,sp2
Get 2,sp3
Get 3,sp4
Get 4,sp5
Get 5,sp6
Get 6,sp7
Get 7,sp8
'ptr = 0
'Revvy = @ptr
Giveup:
debug
goto main ‘ loop back to start
</font></pre></code>
A lot of it was just for messing with.
Edited by - dippy on 27/04/2007 17:20:47