Timer Library
The mikroPascal PRO for AVR includes Timer library for easier handling of the internal Timer module of XMEGA devices.
Library Routines
Timer_Init
| Prototype |
function Timer_Init(var module : byte; time : dword) : dword; |
||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Returns |
Number of uS which is set. |
||||||||||||||||||
| Description |
Initializes the Timer/Counter (TC) module. Parameters :
|
||||||||||||||||||
| Requires |
This routine is avaliable only for XMEGA devices. |
||||||||||||||||||
| Example |
var time : dword; time := Timer_Init(TCC0, 1000); |
Timer_Interrupt_Enable
| Prototype |
procedure Timer_Interrupt_Enable(var module : byte); |
||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Description |
Enables TC overflow interrupt. Parameters :
|
||||||||||||||||||
| Requires |
This routine is avaliable only for XMEGA devices. |
||||||||||||||||||
| Example |
Timer_Interrupt_Enable(TCC0); |
Timer_Interrupt_Disable
| Prototype |
procedure Timer_Interrupt_Disable(var module : byte); |
||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Description |
Disables TC overflow interrupt. Parameters :
|
||||||||||||||||||
| Requires |
This routine is avaliable only for XMEGA devices. |
||||||||||||||||||
| Example |
Timer_Interrupt_Disable(TCC0); |
Copyright (c) 2002-2012 mikroElektronika. All rights reserved.
What do you think about this topic ? Send us feedback!
What do you think about this topic ? Send us feedback!



