SEROUT 9600 8E2
in BASIC Stamp
Hello
I was wondering if it is possible to do 9600 8E2 with the serial command?
if so how?
it seems to be set to 8N1 or 711
this is what I was sending
SEROUT 10, $8000+240, [$FE,$FE,$FE,$05,$04,$00,$05,$0D,$E5]
regards
Jeff
I was wondering if it is possible to do 9600 8E2 with the serial command?
if so how?
it seems to be set to 8N1 or 711
this is what I was sending
SEROUT 10, $8000+240, [$FE,$FE,$FE,$05,$04,$00,$05,$0D,$E5]
regards
Jeff
Comments
If you are looking for extra time between bytes, you can use the optional pace parameter of SEROUT.
In my BASIC Stamp 2 template I have a conditional section that handles details -- I edited for 9600 baud, even parity
#SELECT $STAMP #CASE BS2, BS2E, BS2PE T1200 CON 813 T2400 CON 396 T4800 CON 188 T9600 CON 84 T19K2 CON 32 T38K4 CON 6 #CASE BS2SX, BS2P T1200 CON 2063 T2400 CON 1021 T4800 CON 500 T9600 CON 240 T19K2 CON 110 T38K4 CON 45 #CASE BS2PX T1200 CON 3313 T2400 CON 1646 T4800 CON 813 T9600 CON 396 T19K2 CON 188 T38K4 CON 84 #ENDSELECT SevenBit CON $2000 Inverted CON $4000 Open CON $8000 Baud CON T9600 | SevenBit
You can add the pacing like this:SEROUT Sio, Baud, 1, [$FE,$FE,$FE,$05,$04,$00,$05,$0D,$E5]
You'll get 1ms between bytes -- hopefully, your device will be okay with this.What are you sending the data to?
I'll add a logic trace of the working signal tomorrow.
Regards
Jeff
EDIT Of course 8E2 would be 12 bits.
regards
jeff
For sure the Propeller can do 12 bits but it would require changing the pasm code to add the parity bit and a second stop bit.
I attached a version of the driver to this post.
The driver can be used from multiple objects and cogs. Just make sure and only call "Init" and "Start" from a single object and cog.
Hello, well I temporally went to another microprocessor to validate the return data from the device, but it is messy, adds to much complexity for the needed result, so I'm back I'll test your suggestions.
thank you for your help, from what I read, it should work fine, regards Jeff