pdelay 8000 at90s8515 (sending from geode1) 9750 atmega32 1.229 MHz 1.1 us default for chip 10650 (probably the best value) 10500 (approx) for reading from geode1 9600 9650 good gyro pulse width with 63 (version 1) and 89 (version 2) - the input pulse is shrunk a tiny amount by the gyro so to get 1.5 ms input, perhaps 88 is good value. but to get 1.5 ms output, the input needs to be longer at 89. - corresponding output pulse width is 107 to 108 gyro pulse frequency is about 245 Hz, much faster than before. To get 1.5 ms pulses on PC2 now takes a pulse delay width of 107. This is without any gyro connected - with the gyro connected, the pulse delay width should be 103. However...the frequency of input pulses is so high that it appears to stretch the gyro's view of the pulse width. It outputs a pulse of around 1700 us at 70 Hz with an input pulse of 1500 us at 245 Hz. To get 1500 us pulse width output from the gyro (when at rest), the input pulse delay should be 88. Note that for a clean gyro signal, it's best to send the input pulse train and then shut it off. Otherwise, jitter in the input pulse widths affect the output pulses from the gyro. However, over time the gyro pulse width can drift (have seen this happen) so the input pulse width needs to be reset periodically. The output pulse width is still about 108. 12/13/2005 - This time, a good input pulse of 107 creates a 1.5 ms output pulse from the gyro. The input pulse appears as 1.5 ms too (perhaps a few microseconds stretched). 12/15/2005 - input pulse of 89 is optimal for an output pulse of 1.5 ms which reads as 108 in output. input pulse frequency is about 215 Hz. output pulses are about 70 Hz. For the potentiometer, from the front, full counter clockwise is 254 while full clockwise is zero. Remember than due to serial protocol framing issues, 255 is an illegal value to send. So it is disallowed. The pot would read 255 except that this is clipped to 254. TEST PLAN 2 Testing microcontroller in STK500 Test pulse generation Pin Function Command OK 1.975 KHz PB3 OC0 echo 9750 3 10 | ./sendframe echo 9750 3 254 | ./sendframe echo 9750 3 0 | ./sendframe echo 9750 3 100 | ./sendframe OK 1.975 KHz PD7 OC2 echo 9750 48 10 | ./sendframe echo 9750 48 254 | ./sendframe echo 9750 48 0 | ./sendframe echo 9750 48 110 | ./sendframe OK 1.975 KHz PD5 OC1A echo 9750 15 10 | ./sendframe echo 9750 15 254 | ./sendframe echo 9750 15 0 | ./sendframe echo 9750 15 120 | ./sendframe OK 1.975 KHz PD4 OC1B echo 9750 240 10 | ./sendframe echo 9750 240 254 | ./sendframe echo 9750 240 0 | ./sendframe echo 9750 240 130 | ./sendframe OK PC4 relay coil A echo 9750 94 238 | ./sendframe echo 9750 94 0 | ./sendframe echo 9750 94 14 | ./sendframe OK PC5 relay coil B echo 9750 110 238 | ./sendframe echo 9750 110 0 | ./sendframe echo 9750 110 14 | ./sendframe OK PC6 general 1 echo 9750 93 238 | ./sendframe echo 9750 93 0 | ./sendframe echo 9750 93 14 | ./sendframe OK PC7 general 2 echo 9750 109 238 | ./sendframe echo 9750 109 0 | ./sendframe echo 9750 109 14 | ./sendframe OK PC2 pulse to gyro echo 9750 17 65 | ./sendframe PC3 from gyro echo 9750 17 115 | ./sendframe echo 9750 17 89 | ./sendframe echo 9750 17 0 | ./sendframe echo 9750 17 89 | ./sendframe OK Test steering potentiometer target window (pot is face down with legs sticking upwards) 1. Turn pot full clockwise to 0xff position 2. Set target window with echo 9750 117 122 | ./sendframe echo 9750 118 132 | ./sendframe 3. Turn on OC0 with echo 9750 3 15 | ./sendframe 4. Turn pot back to center 0x7f position 5. Note that OC0 pulses stop OK Test stop pulse generation PC2 echo 9750 126 230 | ./sendframe PB3, PD7 echo 9750 126 228 | ./sendframe PB3, PD7, PD5, PD4 echo 9750 126 226 | ./sendframe echo 9750 3 30 | ./sendframe echo 9750 126 231 | ./sendframe OK Test analog/digital conversion gyro must be connected and powered - it is the timing event for frame txen echo 10650 3 | ./recvframe TEST PLAN Testing microcontroller in STK500 Test pulse generation Pin Function Command OK 1.975 KHz PB3 OC0 echo 9750 3 10 | ./sendframe echo 9750 3 254 | ./sendframe echo 9750 3 0 | ./sendframe echo 9750 3 100 | ./sendframe OK 1.975 KHz PD7 OC2 echo 9750 48 10 | ./sendframe echo 9750 48 254 | ./sendframe echo 9750 48 0 | ./sendframe echo 9750 48 110 | ./sendframe OK 1.975 KHz PD5 OC1A echo 9750 15 10 | ./sendframe echo 9750 15 254 | ./sendframe echo 9750 15 0 | ./sendframe echo 9750 15 120 | ./sendframe OK 1.975 KHz PD4 OC1B echo 9750 240 10 | ./sendframe echo 9750 240 254 | ./sendframe echo 9750 240 0 | ./sendframe echo 9750 240 130 | ./sendframe OK 175 Hz PC4 steering A echo 9750 14 10 | ./sendframe echo 9750 14 254 | ./sendframe echo 9750 14 0 | ./sendframe echo 9750 14 15 | ./sendframe OK 175 Hz PC5 steering B echo 9750 224 10 | ./sendframe echo 9750 224 254 | ./sendframe echo 9750 224 0 | ./sendframe echo 9750 224 25 | ./sendframe OK approx 100 Hz PC2 pulse to gyro echo 9750 17 55 | ./sendframe PC3 from gyro echo 9750 17 75 | ./sendframe echo 9750 17 63 | ./sendframe echo 9750 17 0 | ./sendframe echo 9750 17 63 | ./sendframe Test stop pulse generation OK PC2 echo 9750 126 230 | ./sendframe OK PC4, PC5 echo 9750 126 228 | ./sendframe OK PB3, PD7, PD5, PD4 echo 9750 126 226 | ./sendframe echo 9750 3 30 | ./sendframe echo 9750 126 231 | ./sendframe Test analog/digital conversion gyro must be connected and powered - it is the timing event for frame txen