Help interfacing Prop to another device
Little-endian
Posts: 91
I'm interested in interfacing a Prop to another device and could use help understanding the best way to do this.
Here's what I received from the manufacturer about the device I'm trying to interface to:
It's a master/slave setup using single wire full-duplex w/10K pullup's tied to 3.6v. Serial data is 19.2k, 8bit, no parity, 1 start/stop, non-inverted (3.6v equals logical 1).
Any devices connecting to the interface should be open collector to prevent holding the line high while listening. If open collector is not possible a diode should be used on the TX line of every device connected on the network.
A pause of > 3 bytes must proceed any communication.
I know this device has a three wire connector on it and one wire is ground.
What I'd like to understand is how how full-duplex is accomplished with the remaining two wires? Is this an SPI interface? How can you accomplish full-duplex with one wire? I assume this is SPI and not I2C? If anyone has any links to training materials on how this communications works I'd appreciate it. Are there any objects in the OBX that would help here?
My next question is how can I interface this device to the Prop? I assume I'll need to use two pins on the prop. This device is 3.6v and the prop is 3.3v so I'm not sure what I need to do here, diode, resistor, etc. Since this device contains much higher voltages I'd ideally like to optically isolate it from the prop, but I've never done that before.
Any help is appreciated.
Here's what I received from the manufacturer about the device I'm trying to interface to:
It's a master/slave setup using single wire full-duplex w/10K pullup's tied to 3.6v. Serial data is 19.2k, 8bit, no parity, 1 start/stop, non-inverted (3.6v equals logical 1).
Any devices connecting to the interface should be open collector to prevent holding the line high while listening. If open collector is not possible a diode should be used on the TX line of every device connected on the network.
A pause of > 3 bytes must proceed any communication.
I know this device has a three wire connector on it and one wire is ground.
What I'd like to understand is how how full-duplex is accomplished with the remaining two wires? Is this an SPI interface? How can you accomplish full-duplex with one wire? I assume this is SPI and not I2C? If anyone has any links to training materials on how this communications works I'd appreciate it. Are there any objects in the OBX that would help here?
My next question is how can I interface this device to the Prop? I assume I'll need to use two pins on the prop. This device is 3.6v and the prop is 3.3v so I'm not sure what I need to do here, diode, resistor, etc. Since this device contains much higher voltages I'd ideally like to optically isolate it from the prop, but I've never done that before.
Any help is appreciated.
Comments
FullDuplexSerial should work fine.
One of the three lines is likely the TX line and the other the RX line. Since it's an open collector you don't need optical isolation, resistors nor diodes. Just two wires to the Props IO pins and a shared ground connection. This is probably the easiest communication protocol to use with the Prop.
Duane
does it have a published data sheet
Frank
I just noticed the single wire spec. I thought full-duplex was two way communication at the same time. I don't know of any uC protocol that can do that. It's likely half-duplex that can switch directions. I still think FullDuplexSerial will work but there might be other objects that will let you use only one wire instead of two.
Duane
http://fmadirect.com/support_docs/item_1338.pdf
I wanted to clarify what I wrote. You don't need any extra protection in this case because while 3.6V is higher than the Prop's normal Vdd, the 10K resistor limits the current to a safe level.
Duane
But it could be full-duplex serial with two wires. It's not real clear but you should be able to interface the prop with basic components once you figure out what you're dealing with.
Mike,
I don't see why a 74HC126 is needed. Both the device and the Prop pull the line low to communicate. The 10K resistor on the device limits the current to a very safe level.
A series resistor could be added to the line to safeguard against a programming error driving the line.
This thing was made to talk with a Prop.
Duane
The datasheet list a "Charger ID Num" as part of a message. Your message requesting information needs to include the ID of the device. I think there can be 17 possible devices on the line with ID 0 to 16.
This has similarities to the way one communicates with Dynamixel servos.
Duane
If I understand this device correctly ---- TX and RX pins on Propeller need be connected together to form one wire full-duplex for this device to communicate.
As it send and receive on same line Else Serial driver need be rewritten to support Communication on one PIN in both directions
Okay, it wasn't "designed" to talk to the Prop. I didn't have access to a smiley face from the "Quick Reply" box. It's just that 3.6V with a pull-up resistor is pretty darn friendly for the Prop.
Besides, I think everything is designed to talk with a Prop. If all you have is a hammer. . . (The Prop's my hammer.) :^)
Duane
I want to put the prop where the FUIM USB interface is and eliminate it. I'd like to have the prop control the device instead of the PC. Not going to build all the functionality of the PC into the Prop, but just some useful functionality and perhaps expand it over time.
It definitely looks like 1 wire serial half duplex based on the data sheet info. I would recommend a current limiting series resistor ( about 150 – 220 ohms) between the prop and the device. There is a half duplex serial port driver in the OBEX (http://obex.parallax.com/objects/search/?csrfmiddlewaretoken=cf434c0e67ca26fa307f953e7782e5b4&q=half+duplex) that might work.