Shop OBEX P1 Docs P2 Docs Learn Events
DCM-8 Motor driver circuit — Parallax Forums

DCM-8 Motor driver circuit

RobobuzzRobobuzz Posts: 2
edited 2005-09-29 00:53 in BASIC Stamp
Does anybody know hot to inferace the DCM-8 Motor driver circuit to a stamp. From the specs:

Serial communication with the DCM-8 is done at 9600 baud, 8 data bits, no parity and 1 stop bit (9600-8N1) for TTL seial interfaces.

Command: FF# FF= both motors forward #=(0-9) speed

Im using a stamp stack 2SX so Im using the following code but nothing works:

serStr· VAR···· Byte(3)························

Main:
· serStr(0) = "F"
· serStr(1) = "F"
· serStr(2) = "5"

START
· SEROUT 1, 16468, [noparse][[/noparse]STR serStr\3]
· GOTO START

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-09-29 00:32
    True or Inveted data? How about a link to the documentation....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • RobobuzzRobobuzz Posts: 2
    edited 2005-09-29 00:38
    The documentation is attached the explanation is on pg5 or here is a link to the suppliers manual:

    http://www.hvwtech.com/resources.asp?strSearch=&Mode=anywords&rCatID=1&CurPage=1

    [url=:startDownload(25)]DMC-8 User Manual (.pdf)[/url]··220KB
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-09-29 00:53
    Well, they don't seem to give any clues.· So, add this to the top of your program:

    #SELECT $STAMP
    · #CASE BS2, BS2E, BS2PE
    ··· T9600······ CON···· 84
    · #CASE BS2SX, BS2P
    ··· T9600······ CON···· 240
    · #CASE BS2PX
    ··· T9600······ CON···· 396
    #ENDSELECT


    SevenBit······· CON···· $2000
    Inverted······· CON···· $4000
    Open··········· CON···· $8000


    Baud··········· CON···· T9600


    Now you can try a test statement, something like:

    · SEROUT Motor, Baud, [noparse][[/noparse]"FF9"]


    That should make both motors move forward at full speed.· If it doesn't, change the Baud definition to this:

    Baud··········· CON···· T9600 + Inverted

    ... and try again.· Do make sure that you have configured the board for TTL serial input.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
Sign In or Register to comment.