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 |
sub function Timer_Init(dim byref module as byte, dim time as longword) as longword |
||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 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 |
dim time as longword time = Timer_Init(TCC0, 1000) |
Timer_Interrupt_Enable
| Prototype |
sub procedure Timer_Interrupt_Enable(dim byref module as 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 |
sub procedure Timer_Interrupt_Disable(dim byref module as 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!



