> Timer 1 and Timer 3 each have input capture pins, called ICP1 and
> ICP3. From the Atmega128 datasheet we see that ICP1 is on pin 29 (of
> the processor), and is also called PD4. On the robostix, this pin is
> called IC1 and is right next to INT7.
> ICP3 is on pin 9 of the processor and shares functionality with INT7 and
> So it depends on which version of the roboaudiostix you have as to
> whether or not these pins are exposed.
> On the newer versions (R816), there is a row of pins on the short edge
> of the board opposite the 60-pin hirose connector. There is a group of
> 5 pins on one side the of the LEDs and a group of 2 pins on the other
> side. If we start in the corner of the group of 5 we have GND, FFTXD,
> VCC5, FFRXD, IC1, then the LEDs, and then INT7/ICP3, and INT6.
> You could also use any of the pins which can generate interrupts and
> then just read the timer from with the interrupt handler. This way you
> wouldn't need to ties up both 16 bit timers.
Thanks for your help Dave. I do actually have access to both input capture
pins. Stupidly I was looking on the webpage pinout and not my board!
I am still a bit confused though because I want to drive the two wheels
with PWM from the roboaudiostix. For this I was going to use two channels
from either Timer1 or Timer3 but these are also the timers used for the
input capture. I am assuming they can't do input capture and PWM at the same
time. Is that right? I do have the int6 and int7 pins available so was
thinking of using those and the 8 bit timers. Would I need both Timer0 and
Timer2 to measure the 2 speeds or could I get away with one timer? I also
see that int4 and int5 share pins with PWM3, can you still use the timer
(not for PWM) and use these as interrupts? Sorry about all the questions. I
am still quite new to microcontrollers.
Get latest updates about Open Source Projects, Conferences and News.