Subject:
|
I2C interface
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Sun, 11 May 2003 11:11:07 GMT
|
Viewed:
|
1428 times
|
| |
| |
Hello,
A while ago i was working on a I2C interface for the RCX. i took a little
brake, but started again whit it a week ago. I now have build my own I2C
interface, which can run at 100kHz(and even faster). The signal is also pretty
stable. I had the RCX running a test program, whit all acknowledge checks
disabled. So when an error occured, the connections would be lost. It runned
all night without problems. Thats much better than the old device, which had an
error rate of about 3%.
The problem is still the speed. The interface isn't the problem. So I looked at
the RCX internals. after reading some documentation about it, i figured out
that the motors(the I2C channels are connected to the motor ports) must be
connected to port 1,2 or 3 of the H8 chip(I couldn't find any clear answer
about this). So I read the H8 3297 harware manual, and found out that these
output ports have a delay time of maximum 100ns, when running at 16mHz. That
should be more than fast enough to run at 100kHz, right? i am not even getting
close to it....
Then the motor outputs are handled by a driver-IC, the MLX10402. I couldn't
find anything about the maximum speed of this IC. Anyone knows more about this?
I don't think it can make 100kHz, but I do expect it to make atleast a few kHz's
Then the speed problem could alos be in the software. Can BrickOS make a motor
port run at 100kHz? I am not such a experienced programmer, so I don't now how
to figure that out. Does anyone know more about this?
thanks,
bas.
|
|
Message has 1 Reply: | | Re: I2C interface
|
| Hi Bastiaan, BrickOS only updates the motor register once every millisecond, so when using functions like motor_a_dir(), the highest frequency you can generate is 500 Hz. You can get around this by patching the kernel, or if that seems disagreeable, (...) (22 years ago, 12-May-03, to lugnet.robotics)
|
4 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in Robotics
|
|
|
|