User manual

141
PortD.0 24
PortD.7 31
Vanaf hier alleen Mega128
PortE.0 32
PortE.7 39
PortF.0 40
PortF.7 47
PortG.0 48
PortG.4 52
5.4.12.7 Poort voorbeeld
// Programma laat afwisselend de beide LED’s op het
// Application Board knipperen in een 1 seconde – ritme
void main(void)
{
Port_DataDirBit(PORT_LED1,PORT_OUT);
Port_DataDirBit(PORT_LED2,PORT_OUT);
while(true) // Eindelozw lus
{
Port_WriteBit(PORT_LED1,PORT_ON);
Port_WriteBit(PORT_LED2,PORT_OFF);
AbsDelay(1000);
Port_WriteBit(PORT_LED1,PORT_OFF);
Port_WriteBit(PORT_LED2,PORT_ON);
AbsDelay(1000);
}
}
5.4.13 Math
Hieronder volgen de wiskundige functies die de C-Control Pro 128 in eenvoudige zwevende
komma precisie (32 bit) beheerst. Deze functies zijn niet in de bibliotheek van de C-Control
Pro 32, anders is er te weinig flash-geheugen voor de gebruikerprogramma’s.
5.4.13.1 acos
Wiskundige functies
Syntax
float
acos(
float
val);
Sub acos(val As Single) As Single