BS1/2 code conversion
Archiver
Posts: 46,084
Hi all,
I know this should be easy, and I'm ashamed to post this here, but I can't
seem to properly convert this code. Here it is:
symbol dat = b2
symbol synch = b3
symbol junk = b4
synch = "A"
junk = 126
start:
pause 1000
for dat = 1 to 255
serout 0,N2400,(junk,synch,dat)
pause 50
next
serout 0,N2400,(junk,synch,0)
goto start
Ok, I must have a mental block. Or I'm just plain stupid.
Thanks!
Jonathan Peakall
I know this should be easy, and I'm ashamed to post this here, but I can't
seem to properly convert this code. Here it is:
symbol dat = b2
symbol synch = b3
symbol junk = b4
synch = "A"
junk = 126
start:
pause 1000
for dat = 1 to 255
serout 0,N2400,(junk,synch,dat)
pause 50
next
serout 0,N2400,(junk,synch,0)
goto start
Ok, I must have a mental block. Or I'm just plain stupid.
Thanks!
Jonathan Peakall
Comments
dat var byte
synch var byte
junk var byte
synch="A"
junk=126
start:
Pause 1000
For dat=1 to 255
Serout 0,XXX,[noparse][[/noparse]junk,synch,dat]
Pause 50
Next
serout 0,XXX,[noparse][[/noparse]junk,synch,0]
goto start
Replace XXX with the baudmode for 2400 baud from the BS2 manual that
corresponds to the type of BS2 you are using (BS2, BS2SX, BS2P, etc).
Al Williams
AWC
* 8 channels of PWM
http://www.al-williams.com/awce/pak5.htm
>
Original Message
> From: Jonathan Peakall [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=ahPaLCQGZKBLJrE66EaFAgArS3AE56N-qf07PvgH2HZjfQFEAFaovFkAlC9i0a4AcFLihAAs7-dhV82an10]jpeakall@m...[/url
> Sent: Saturday, December 07, 2002 1:00 PM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] BS1/2 code conversion
>
>
> Hi all,
>
> I know this should be easy, and I'm ashamed to post this
> here, but I can't seem to properly convert this code. Here it is:
>
> symbol dat = b2
> symbol synch = b3
> symbol junk = b4
> synch = "A"
> junk = 126
> start:
> pause 1000
> for dat = 1 to 255
> serout 0,N2400,(junk,synch,dat)
> pause 50
> next
> serout 0,N2400,(junk,synch,0)
> goto start
>
> Ok, I must have a mental block. Or I'm just plain stupid.
>
> Thanks!
>
> Jonathan Peakall
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the
> Subject and Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
>
>