Serial Communication on ONE wire

I have a ColorPal 28380 from Parallax. I have studied all the documentation i could find. Te only clear documentation uses a Basic Stamp that both Send and Receive Data between 2400 and 7200 Baud, on one single pin (The ColorPal only has one Data pin , a0v and a 5v Pin)

Now i was looking at my options (for the FEZ Spider

Serial , SPI , I2C all use more than one wire, and only with Serial i can secify the baudRate…
I need to send commands like sio.write(["= R !") to the module and i need to set the baudrate…
how can i achieve this…

anybody have an idea ?

Thanks
Bert

Check Codeshare. There are some examples on how to use OneWire.

But I don’t think this is a “true” one-wire device in the Maxim definition.

It seems that this is really using serial comms over a single wire (I say this is like interpreting what

from the reference sheet (http://www.parallax.com/Portals/0/Downloads/docs/prod/sens/28380ColorPAL.pdf)

[quote]Communication with the ColorPAL takes place using serial I/O, transmitting and receiving at between
2400 and 7200 baud, using a non-inverted, open-drain protocol. The ColorPAL includes a pullup
resistor to Vdd, so you do not need to apply one externally. Because of the open-drain protocol, the pin
used to communicate with the ColorPAL should always be configured as an input, except when being
driven low. Also, when starting up, you should wait for this pin to be pulled high by the ColorPAL before
trying to send it any commands. This is particularly important when connecting it to one of the BOEs
servo headers, since the three-way power switch will start your PBASIC program before powering up the
ColorPAL.[/quote]

Now I don’t know if you need to write a custom UART driver, but I suspect so. You could determine timing for those baud rates, so it might not be too challenging to do it without stepping into RLP.

You should be able to use serial and join the TX and Rx together, but you will also need to clear the recieve buffer before you read, otherwise it will contain your Tx data as well as any data that has been read from the device.

Edit: You may also need to place a 1k resistor in the Tx line, it will depend if the uC Tx line goes tri-state or not.

I do not know of any software solution with this uC, maybe some one else does, but if the resistor dosnt work this device will,

Sorry for the hardware solution, you will also need 2 extra pins to switch the Tx and Rx pins.

HI,
I have tried to get the Maxim IC in Holland, but as of yen have not succeeded. I tried something with 2 x BC547 's but it looks like i have to get some more knowledge about serial communications first. Ill park this experiment untill i have learnt more, Thanks for all that responded to this post.

Might anybody , stumbling onto this post have ideas that are somewhat more elaborate, Ill be grateful , else when i DO get further ill post the proceedings.
regards
Bert

by any chance did you try the RX/TX lines joined scenario, with a 2400 baud rate ? Basic Stamp are pretty low-tech (although i suspect they’re doing software UART not hardware) so I can’t see it being that hard… unfortunately it looks unlikely someone else has this sensor to help out either :frowning:

I’ve done about 15 years ago this project for serial bus sharing. It works till 19200 without any problem, sharing the bus between three slaves. It uses very easy SN7417 TTL buffer.
Other friends’ of mine made similar circuit using 2 x 2N2222 that put levels directly in RS232 specs (avoiding max232).

hi

Berto 62
Did you try to use a serial port with buffer gate with tristate outputs for example 74ls125
and using an additional pin to activate the buffer.

I will be attentive to your answer