Motor Mind B Enchanced Help
I've been having some trouble getting the MMBe to work with the propeller. As far as I know everything is hooked up right. I even tried hooking it up to my BS2, which worked. I'm not using any resistors or anything, should I be?
There was no MMBe object in the object exchange so I tried using the FullDuplexSerial object to replicate the BS2 example as follows:
'Output 15
'Input 14
CON
TM = 14
FM = 15
OBJ
FDS : "FullDuplexSerial"
PUB Main
FDS.start(TM, FM, 3, 2400)
FDS.tx($55) 'Sync
FDS.tx($03) 'SETDC
FDS.tx($DD) 'SETDC value
I contacted tech support and they told me to start with a mode value of 3.
Any help would be appreciated, I am completely stumped.
There was no MMBe object in the object exchange so I tried using the FullDuplexSerial object to replicate the BS2 example as follows:
'Output 15
'Input 14
CON
TM = 14
FM = 15
OBJ
FDS : "FullDuplexSerial"
PUB Main
FDS.start(TM, FM, 3, 2400)
FDS.tx($55) 'Sync
FDS.tx($03) 'SETDC
FDS.tx($DD) 'SETDC value
I contacted tech support and they told me to start with a mode value of 3.
Any help would be appreciated, I am completely stumped.

Comments
I think the proper mode value is zero, not 3. Try it. If you're expecting replies from the MMB, you'll need a pullup resistor on the TM lead. Best to use a 1K to 3.3K resistor between the Propeller pin and +3.3V. I wouldn't use the 1K pullup to +5V as recommended in the MMB documentation. It'll work, but it's better to tie it to +3.3V or use a higher value in tying it to +5V.
Post Edited (Mike Green) : 8/13/2008 11:22:07 PM GMT
Also, I'm using the commands without a reply (actually, TM is disconnected right now too)
When I used the MMBe with my bs2 I saw the green led light up immediately, with the propeller I never see it light up no matter how long I wait.
CON sync = $55 stop = $00 reverse = $01 setdc = $03 thestatus = $05 count = $06 readcounter = $0B readfirm = $0E VAR long sin, sout, inverted, bitTime, started, rxOkay, txOkay, status, speed OBJ serial : "simple_serial" ' bit-bang serial driver PUB start(txPin, rxPin, baud) if lookdown(rxPin : 0..31) ' qualify rx pin sin := rxPin ' save it rxOkay := started := true ' set flags if lookdown(txPin : 0..31) ' qualify tx pin sout := txPin ' save it txOkay := started := true ' set flags if started serial.start(sin, sout, baud) return started PUB set(power) 'to set the DC value to the motor (range 0 - 255) if started serial.tx(sync) serial.tx(setdc) serial.tx(power) return true else return false PUB motorstop 'to stop the motor if started serial.tx(sync) serial.tx(stop) return true else return false PUB motorrev 'to reverse the motor direction if started serial.tx(sync) serial.tx(reverse) return true else return false PUB getstatus 'to retrieve the status byte if started serial.tx(sync) serial.tx(thestatus) return serial.rx else return 0 PUB getspeed 'to extract the speed byte if started serial.tx(sync) serial.tx(thestatus) status := serial.rx return serial.rx else return 0 PUB ismoving 'to check the movement status of the motor if started serial.tx(sync) serial.tx(thestatus) status := serial.rx if speed := serial.rx return true else return false else return falseNow I've never had any issues at all with this, but i can't guarantee due to the fact that I haven't really tested every circumstance (ie other PLL modes, or input frequencies). Let me know how things work for you. Hopefully it'll be of some help
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
~Some men see things as they are and ask "why?"
I dream of things that never were and ask "why not?"~