Instructions
387 C-Control Pro IDE
© 2013 Conrad Electronic
Return Parameter
time interval expressed in 10ms ticks
Example
void main(void)
{
word time;
Timer_TickCount();
AbsDelay(500); // wait 500 ms
time=Timer_TickCount(); // the value should be 50
}
5.26.2 AVR32Bit
There are 2 timer with 3 channels available in the C-Control Pro AVR32Bit. These will show up in the
library as 6 timer. You can use the internal timer for various tasks:
Event Counter
Frequency Generation
In addition, there are three dedicated functional units for Pulse Width Modulation.
5.26.2.1 Event Counter
On each of the 6 timer channels events (up to 16-bit) can be counted. In this Example, the rising
edges on input COUNTA_1 are counted in timer 2 (see Pin Assignment). After every 300 events an
interrupt will be triggered, while the counter is reset. The sample program outputs after 10 seconds
the current state of the counter.
Example