Shop OBEX P1 Docs P2 Docs Learn Events
Problems with Stamp 2 software code — Parallax Forums

Problems with Stamp 2 software code

Rosalina1011Rosalina1011 Posts: 4
edited 2014-08-08 09:28 in BASIC Stamp
I am using two Parallax stamp 2 chips to go from ....input parallel to serial and then back to parallel. the code I am using is:

SER OUT

1) loop:
2) serout 16,84+$4000,{ins.low byte,ins.high byte}
3) pause 1
4) go to loop


SER IN

1) dirs-$ffff
2) loop:
3) serin 16,84+,{outs.lowbyte,outs.highbyte}
4) pause 1
5) go to loop


My problem is looking at the serial train on a digital scope there is a gap between bit 7 and bit 8. I want a constant serial train counting from 0 to 15 in order. Is this possible?

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-08-08 09:28
    Hello,

    You should never have a PAUSE on your SERIN statement. Also I would slightly increase the PAUSE after the SEROUT to 100 and see if that helps. With those values being equal it increases the chances that the receive side will miss data. I would remove the PAUSE from the receive side completely.
Sign In or Register to comment.