Shop OBEX P1 Docs P2 Docs Learn Events
Motor Mind B NOT compatible with Javelin Stamp ? — Parallax Forums

Motor Mind B NOT compatible with Javelin Stamp ?

sharmaitsharmait Posts: 15
edited 2006-01-25 22:57 in General Discussion
After reading Motor Mind B datasheet, it seems it·can only be controlled with PBASIC commands.

Thus I suspect my Javelin Stamp (which used embedded Java) is not going to work with it.

Can anybody comment on this ? Which controller is suitable for interfacing with Javelin ?

And any sample code would be highly appreciated.

Thanks....

Comments

  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-01-25 21:39
    You need to declare a transmit uart and a receive uart. The datapins for those are
    your FM and TM connections. The commands are constant values as defined in
    the MMB manual (eg. STOP=0x00, SETDC=0x03 etc).
    You issue a command by sending 0x55, followed by the commandvalue, followed by
    optional parameters (see manual).
    The best approach is to write a special MMB class that has methods for all
    available commands. You can communicate with a single I/O pin or with
    seperate transmit and receive pins. Baudrate is 2400, 8 databits, no parity, 1 stopbit.
    You find the manual here
    http://www.solutions-cubed.com/solutions%20cubed/Products%20Page/Downloads/MMB_DS_1.PDF

    regards peter
  • sharmaitsharmait Posts: 15
    edited 2006-01-25 22:26
    Thanks Peter.

    One more question.

    Right now I want to do a receive from motor mind, so I am using UART receive.

    For UART receive I see a SERIAL_RX_PIN and SERIAL_CTS_PIN.

    I connect SERIAL_RX_PIN TO 'FM' pin of Motor Mind B. Where do I connect SERIAL_CTS_PIN ?

    Regards,

    S
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-01-25 22:57
    You do not use any handshake pins.
    Just declare your receive uart as
    static Uart rxUart = new Uart(Uart.dirReceive,CPU.pin0,Uart.dontInvert,Uart.speed2400,Uart.stop1);

    where CPU.pin0 is the datapin (select the pin you want).
    Your transmit uart also does not use any handshake pin.

    The rxUart datapin connects to MMB TM pin.

    The txUart datapin connects to MMB FM pin.

    regards peter
Sign In or Register to comment.