| | I2C interface
|
| 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 (...) (22 years ago, 11-May-03, to lugnet.robotics)
| | | | 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)
| | | | Re: I2C interface
|
| Thanks for your answer! However, I do have some questions about it.. First of all, I looked at the code you send in your post. looks nice, but to be honest, I don't know anything about assembly ( It is assembly, whats being used in the sub (...) (22 years ago, 13-May-03, to lugnet.robotics)
| | | | Re: I2C interface
|
| Hi, Change the declaration for set_motor to: extern "C" void set_motor(unsigned char mask, unsigned char value); and you should be fine. And, yes, it's H8 asm code. Probably could have written it in C, but I tend to prefer asm for low-level type (...) (22 years ago, 13-May-03, to lugnet.robotics)
| |