Subject:
|
Re: Hi-speed port communication
|
Newsgroups:
|
lugnet.robotics.nxt
|
Date:
|
Sat, 5 Jan 2008 01:45:30 GMT
|
Viewed:
|
31210 times
|
| |
| |
In lugnet.robotics.nxt, John Hansen wrote:
> I've been getting a number of emails from some people who want to know how to
> use the hi-speed RS-485 port 4 functionality in the NXT using the standard
> firmware. With John Barnes' help I now know how to get it to work correctly.
> ...
> Once you have initialized the port type and the hi-speed state machine by
> calling SetHsState(HS_INITIALISE) and SetHsFlags(HS_UPDATE) then reading
> messages is about as simple as calling GetHSInputBuffer(offset, size, buffer);
>
> According to folks at LEGO you can simply use a sensor wire to connect two NXTs
> together on port 4 and send data back and forth using this sort of code.
Thanks John. I agree that from the electrical point of view, just connecting one
port 4 to another port 4 should just work with no hardware other than the cable
(for short lengths, like the cables that come with the NXT). For longer cables,
a termination resistor (usually 120Ohm) at either end is used. Cable lengths of
100 meters (300 feet) should work reliably.
I'm not sure what would be the advantage of connecting NXT's to each other in
this way, compared to to Bluetooth. I think that using RS485 might be mainly
useful for communicating with non-NXT devices (perhaps simpler sensor interfaces
and/or motor controllers) over long distances. For shorter distances, I think
that I2C is usually a better choice (much easier to build the devices). RS485 is
much faster on the NXT than I2C, but I am not so sure how useful that it.
To Rosco: it should be possible to hang 32 NXT's on a single RS485 cable.
Sivan
|
|
Message is in Reply To:
| | Hi-speed port communication
|
| I've been getting a number of emails from some people who want to know how to use the hi-speed RS-485 port 4 functionality in the NXT using the standard firmware. With John Barnes' help I now know how to get it to work correctly. Here is a simple (...) (17 years ago, 4-Jan-08, to lugnet.robotics.nxt)
|
7 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in NXT programmable brick
|
|
|
|