Shop OBEX P1 Docs P2 Docs Learn Events
a baudrate question about Parallax Servo Controller — Parallax Forums

a baudrate question about Parallax Servo Controller

hsiaochunghsiaochung Posts: 17
edited 2009-05-19 14:47 in BASIC Stamp
Colud anyone explain
what is the difference between the two case

baud con 396 'for bs2
Sdat con 15

serout Sdat,baud,[noparse][[/noparse]"!SC",r,c,position.LOWBYTE,position.HIGHBYTE,CR]
serout Sdat,baud+$8000 ,[noparse][[/noparse]"!SC",r,c,position.LOWBYTE,position.HIGHBYTE,CR]


In the pbasic manual

· select driven or open output
····
··· driven = 0
··· open· = $8000

·what is the difference between driven and open

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-05-19 14:35
    Driven means that the Stamp switches the I/O pin between 0V (ground) and +5V (Vdd) to produce the serial signal.

    Open means here that the Stamp switches the I/O pin between 0V (ground) and a high impedance state. This is used when several devices are connected in parallel and there's always a pullup resistor somewhere connected to +5V (Vdd) to "pull up" the signal to +5V when none of the devices are actively pulling the signal line low (to 0V).

    You can't connect devices in parallel when they're "driven". If, for some reason, one device has switched the signal to ground and another has switched the signal to Vdd, you'll have a short circuit between Vdd and ground which can damage one or more of the devices.
  • hsiaochunghsiaochung Posts: 17
    edited 2009-05-19 14:47
    Thanks for Mike
    I appreciate your help
Sign In or Register to comment.