Hi Matt, Your dedication is impressive! My eye fell on line 173-197. Servo-numbering starts at one, not zero. Don't recall if we have a standard for this, but zero seems more logical to me. But aside that: the code is repeated 8 times, where it could be one if you use the servo number as array subscript. I'll leave it that, since I don't want to play the same tune over and over again while you put in so much effort...
Joep 2010/2/5 mattschinkel <[email protected]>: > Ok, I tested I2C and it works with no jitter! > > I tested with 8 servos (2 connected). > > I used the fasted I2C option: const word _i2c_bus_speed = 4 ; 400kHz > > Here is the master echo code I tested with: > > for 50_000 loop > pc_char = "A" > > -- transmit to slave > -- we want to send 1 byte, and receive 1 from the slave > i2c_tx_buffer[0] = pc_char > var bit _trash = i2c_send_receive(icaddress, 1, 1) > > -- receive buffer should contain our result > ic_char = i2c_rx_buffer[0] > ;serial_hw_write(ic_char) ;send recieved "B" to pc > end loop > > I tested with and without the serial output line, both with no jitter. > Serial output is perfect, I recieve 50_000 characters back from the > slave that runs the servos, all serial data is correct. > > Yes, some work needs to be done, I still need to enable 16 bit timers > and clean up a few other things. > > Joep, I would like to here your feedback. > > Thanks, > Matt. > > -- > You received this message because you are subscribed to the Google Groups > "jallib" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/jallib?hl=en. > > -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
