PortD.0
...
PortD.7
Vanaf hier alleen Mega128
PortE.0
...
PortE.7
PortF.0
...
PortF.7
PortG.0
...
PortG.4
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)
{
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
141
24
...
31
32
...
39
40
...
47
48
...
52
// Eindelozw lus