200
Libraries
© 2008 Conrad Electronic
void Timer0_ISR(void)
{
int irqcnt;
Port_WriteBit(
0
,
1
);
// stop Timer0
irqcnt=Irq_GetCount(INT_TIM0COMP);
}
void main(void)
{
Port_DataDirBit(
0
,
0
);
// PortA.0 Output
Port_WriteBit(
0
,
0
);
// PortA.0 Output=0
Irq_SetVect(INT_TIM0COMP,Timer0_ISR);
// define Interrupt Service Routine
100
,PS0_1024);
// set time and start Timer0
// other program code....
}
6.19.7 Timer_Disable
Timer Functions
Syntax
void Timer_Disable(byte timer);
Sub Timer_Disable(timer As Byte)
Description
This function disables the specified timer. Timer functions occupy I/O ports. If a timer is not needed and
the corresponding I/O ports are used otherwise, the timer must be disabled.
Parameter
0 = Timer_0
1 = Timer_1
3 = Timer_3
(only Mega128)
6.19.8 Timer_T0CNT
Timer Functions
Syntax
void Timer_T0CNT(void);
Sub Timer_T0CNT()
Summary of Contents for C-Control Pro Mega Series
Page 1: ... 2008 Conrad Electronic C Control Pro Mega Series ...
Page 9: ...VIII Inhalt 2008 Conrad Electronic ...
Page 10: ...Part 1 ...
Page 17: ...Part 2 ...
Page 23: ...Part 3 ...
Page 41: ...32 Hardware 2008 Conrad Electronic 3 3 5 3 Component Parts Plan ...
Page 57: ...48 Hardware 2008 Conrad Electronic 3 4 5 3 Component Parts Plan ...
Page 58: ...Part 4 ...
Page 91: ...82 IDE 2008 Conrad Electronic ...
Page 92: ...Part 5 ...
Page 135: ...126 Compiler 2008 Conrad Electronic 31 1F US 63 3F 95 5F _ 127 7F DEL ...
Page 136: ...Part 6 ...
Page 231: ...Part 7 ...
Page 240: ......