Yuppie!!! My mock-up controller section is now reporting via serial link the throttle, pwm value and current.
The code works! I've used a FIFO queue (ring-buffer) filled with values on timer2 overflow. The actual transmission is done using buffer empty interrupt. The impact on the code is thus minimal.
Next steps: Implement receive part so I can send 1 byte commands to the controller ("inhibit reporting" for instance).
There was a question earlier in the thread about what kind of test board I'm using: I just bought the cheapest avr programmer/test kit I could find and changed the xtal and the uC to 16MHz version. The actual kit is "myAVR board MK1 LPT, assembly kit" 12Eur in Germany. with PCB, a sp12 compatible programmer, connectors, leds, push-buttons ...
|