I agree with Peter in that the Javelin is probably not fast enough to do the bit-manipulation required to be an I2C slave ... unless your I2C buss is running very very slow. But, you can multidrop a number of controllers on a serial buss, and that's where the UART VP comes in.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Jon Williams Applications Engineer, Parallax
Dallas, TX· USA
Universal Asynchronous Receiver Transmitter -- the asynchronous part means only one wire, wherease SPI and I2C are synchronous schemes that have separate clock and data signals. So, no, you cannot use a UART in an SPI system.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Jon Williams Applications Engineer, Parallax
Dallas, TX· USA
Thanks for the specific advice. Is there a rs232->rs485 converter that you would recommend? The host computer is linux, but I assume that no special software is required when converting 232 to 485, is that correct?
Thanks peter. I got the rs232->rs485 converter you suggested from scm. It has 4 wire connectors on the rs485 side. A,B,-5,+5 . I searched some of the other posts for rs485, but havn't quite figured out the details of how to make this all work. Could you give me a quick rundown, or point me to a howto? I need to communicate with 4 javelins from my rs232 on my laptop.
Thanks
Daniel
Comments
The only way to have the javelin be a slave device
is by using the Uart VP (javelin can receive data in the background).
regards peter
What I want to do is to control multiple javelins (about 6) from a single CPU (using an aardvark usb->I2C/SPI adapter) on a single bus.
Am I just out of luck or is there a way this can be accomplished on a single bus?
Any suggestions?
thanks,
Daniel
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
instead of usb->I2C.
The RS485 is a multidrop connection, requiring two wires A and B.
So instead of a bus with SDA and SCL (I2C) you get a bus with A and B (RS485)
The MAX487 is a halfduplex RS485 chip (dip8) that requires
two pins from the javelin (data and direction). The Uart VP is
used to control the max487.
regards peter
http://byterunner.com/byterunner/new_frontpage=usbcom
They offer several converters and I believe these all use FTDI chips
(which is the chip Parallax advises) and they have direct Linux support.
regards peter
That page shows USB->RS485.
Here are rs232 to rs485 adapters:
http://scmstore.com/english/adap485/
regards peter
Thanks
Daniel
The A and B terminal are the RS485 bus. All Javelins have a RS232 (Javelin side) to RS485 (AB-bus)
converter. Tie all A's together, and also all B's.
Then you must give each Javelin a unique ID, for example 'A' to 'D' for 4 javelins.
Then you must decide on a protocol.
For example, start each message with a '!' followed by the target id and origin id.
So·javelin 'A' would send '!','B','A',"message string",<CR>
to send a message to javelin 'B'.
You may find this interesting:
http://members.home.nl/bzijlstra/software/communication/Benbus.htm
regards peter
The manual of the converter should explain the use
of the +5V and -5V terminals.
regards peter
·