|
Re: Code cycles per second
Posted by Matt Leese at 03/24/2001 9:38 PM EST
Other on team #73, Tigerbolt, from Edison Technical HS and Alstom & Fiber Technologies & RIT.
In Reply to: Re: Code cycles per second
Posted by Joe Ross on 03/24/2001 3:48 PM EST:
Ok, to further explain what Joe said:
A packet is sent from the OI to the RC 40 times every second. Your program, however, is not guaranteed to get every packet. This is because of the tri-microcontroller design of the RC. The Master Processor reads the data from the radio modem, the analog inputs, and the digital inputs. The Master Processor then passes it on to the BS2X (I believe all three microcontrollers are BS2X but the InnovationFIRST labels the user programmable one the BS2X). The BS2X reads the data at the beginning of a loop. The BS2X will block (meaning wait) until data is available. The variable packet_num will tell you which packet number you are on. This number does wrap around so beware. There also is a variable deltav that tells you how many packets you've missed. Therefore you can get a somewhat accurate measure of how much time has passed between loops. This should be accurate to .0225 seconds but I wouldn't count on that level accuracy.
Matt
__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
|