| | I2C device for the RCX
|
|
Hello, A while ago, there whas a short thread about the I2C device for the RCX from Elector Electronics magazine No. 309, APRIL 2002. The conclusion was: way to slow, 3 commands per second was the maximum possible. Ive build it anyway, just for fun (...) (22 years ago, 11-Jan-03, to lugnet.robotics)
|
|
| | Re: I2C device for the RCX
|
|
(...) Erm...no...you have some trouble with your numbers! 1000us == 1ms so: 4.7us == 0.0047ms !! (...) Yikes! Nooo...ooo! 250ns == 0.25us == 0.00025ms Remember: ms is a millisecond which is 1/1000th second. us is a microsecond which is 1/1000000th (...) (22 years ago, 11-Jan-03, to lugnet.robotics)
|
|
| | Re: I2C device for the RCX
|
|
Steve, Very good suggestions! (...) Bastiaan v.Kesteren, I second Steve's recommendation, using loops for timing between command segments. You will not get very far using BrickOS msleep because of the 1ms minimum timing. Also, you may find the (...) (22 years ago, 11-Jan-03, to lugnet.robotics)
|
|
| | Re: I2C device for the RCX
|
|
Steve is absolutely right and what he said is exactly what I'd recommend. When writing for loops, you can do the same test as Steve suggested: running the loop x 1000 times and then beep. Divide the stopwatch time by 1000 and you have the timing of (...) (22 years ago, 11-Jan-03, to lugnet.robotics)
|
|
| | Re: I2C device for the RCX
|
|
(...) high (...) frames (...) very (...) anyone (...) I (...) BrickOS (...) In the current release of BrickOS, the motors only get updated by the timer ISR every 2ms, so that probably explains why trying to twiddle the bits any faster than that (...) (22 years ago, 11-Jan-03, to lugnet.robotics)
|
|
| | Re: I2C device for the RCX
|
|
(...) This actually seems to be some sort of 'combined' problem which results from the brickOS-kernel doing task scheduling plus some ROM-internal functions eating up some CPU-time. I did some research on it and came up with a rather evil solution. (...) (22 years ago, 12-Jan-03, to lugnet.robotics)
|
|
| | Re: I2C device for the RCX
|
|
(...) OK, stupid of me! (...) even more stupid..... Maybe I should go back to primary-school for a while to learn those things again (-: anyway, thanks for the suggestions. (22 years ago, 12-Jan-03, to lugnet.robotics)
|
|
| | Re: I2C device for the RCX
|
|
Hum. i think my first post was not very clear( and whit some stupid mistakes) I think you now how I2C works: there are to lines, SCL and SDA. so whit this device, I got to sensor ports, one for SCL and one for SDA. making high and low signals on the (...) (22 years ago, 12-Jan-03, to lugnet.robotics)
|
|
| | Re: I2C device for the RCX
|
|
(...) I think it will - as long as you put the sensor handler on timer B (the motor handler probably can stay there too). Take a close look at _ds_handler inside the file dsensor.c. That's where all the active/passive switching and sensor readout is (...) (22 years ago, 12-Jan-03, to lugnet.robotics)
|
|
| | Hi, I'm new
|
|
Hi, I'm Tjandra at Surabaya, Indonesia. Last year, I bought RIS 2.0. But until now I cannot make a robot biped with two leg. Would you please to help me, to give some building instruction & the program to make it, only uses RIS 2.0 components. Thank (...) (22 years ago, 13-Jan-03, to lugnet.robotics)
|
|
| | Re: I2C device for the RCX
|
|
Before starting the hacking,I did some tests whit this 'for-lus-delay', and I found the results better than expected. I found that this: for(long i=0;i<100000;i++); takes about 120ms, so one for lus takes 0.0012ms. I made a test program which first (...) (22 years ago, 13-Jan-03, to lugnet.robotics)
|
|
| | Re: I2C device for the RCX
|
|
(...) Nope, I didn't. Mixed up the packages/sec and bits/sec. It should be 6360Hz. Sounds even more faster (-: (22 years ago, 13-Jan-03, to lugnet.robotics)
|
|
| | Re: I2C device for the RCX
|
|
ARGH!!!...!!! i'm getting nuts of all these numbers! Now it appears that my stopwatch didn't give the time in steps from 1 ms, but in steps from 10 ms so then the program takes 3750ms, which means 70,6 packages per second. the RCX has send 1 adress (...) (22 years ago, 13-Jan-03, to lugnet.robotics)
|
|
| | Re: I2C device for the RCX
|
|
"Bastiaan v.kesteren" <b.van.kesteren53@zonnet.nl> wrote in message news:H8o02v.Gpz@lugnet.com... (...) 375ms, which is (...) at the sensor (...) 6360Hz. (...) I don't understand your references to clock pulses. The I2C protocol is edge triggered (...) (22 years ago, 13-Jan-03, to lugnet.robotics)
|
|
| | Re: I2C device for the RCX
|
|
"Bastiaan v.Kesteren" <b.van.kesteren53@zonnet.nl> wrote in message news:H8nvnF.2rz@lugnet.com... (...) takes (...) package, (...) A 3% error rates (7 out of 250 messages) is far too high. I would have expected error rates under 1 in 10 million (...) (22 years ago, 13-Jan-03, to lugnet.robotics)
|
|
| | Re: Hi, I'm new
|
|
Tjandra, you have posted your message inside a thread with a different topic. You may run the risk of your message never being read. Use the "New" icon at the top right to start your own thread, and try typing in the title exactly what you're asking (...) (22 years ago, 13-Jan-03, to lugnet.robotics)
|
|
| | Re: Hi, I'm new
|
|
"Tjandra J" <lego-robotics@crynwr.com> wrote in message news:046601c2bad2$44...Tjandra... (...) with (...) Check out this site. Look in the "Gallery" (URL) walkers are a real challenge. Good luck with your project. -- Bob Fay (URL) (22 years ago, 13-Jan-03, to lugnet.robotics)
|
|
| | Re: I2C device for the RCX
|
|
Dick Swan wrote: >I don't understand your references to clock pulses. The I2C protocol >is edge triggered with a data bit transferred as the clock signal >transitions from a LOW to HIGH value. Where do clock pulses come into >play? OK, as a (...) (22 years ago, 14-Jan-03, to lugnet.robotics)
|
|
| | Re: Hi, I'm new
|
|
(...) (22 years ago, 14-Jan-03, to lugnet.robotics)
|
|
| | Re: I2C device for the RCX
|
|
(...) Lepomux works with a serial protocol (5 bit preamble, 8 bit data, parity) based on a halfbit-clockspeed of 1 kHz. So compared to your I2C-driver it is dead slow (about 33ms/byte = 30 bytes/s). This slow speed has two reasons: - it's possible (...) (22 years ago, 14-Jan-03, to lugnet.robotics)
|
|
| | Re: I2C device for the RCX
|
|
(...) Well, one reason for this is that I2C doesn't need a precise clocksignal (thanks to Dick Swan for telling me, I totally forgot about it). All the timer stuff shouldn't matter for the I2C device, so there should be even higher speeds possible, (...) (22 years ago, 15-Jan-03, to lugnet.robotics)
|
|
| | Re: I2C device for the RCX
|
|
(...) We'll first check it out before boasting about it ;) The whole thing won't work without some hardware modifications on the lepomux - so I'll tell you about it in two or three weeks. Gunther (22 years ago, 15-Jan-03, to lugnet.robotics)
|
|
| | Re: I2C device for the RCX
|
|
(...) ... took slightly longer than 2 weeks, but now it works as expected. Using BrickOS you'll get up to 100 byte/s without any patch. I've put a protocol description on www.lepomux.org. Gunther (22 years ago, 1-Mar-03, to lugnet.robotics)
|
|
| | Re: I2C device for the RCX
|
|
** For some reason my e-mail didn't work anymore, so i couldn't post any messages to Lugnet. that's why i'm responding so late. So , hoping this time it will work, I send my post, again(for about the 10th time...) ** It looks very good! You say(on (...) (22 years ago, 14-Mar-03, to lugnet.robotics)
|