User manual

141Compiler
© 2005 Conrad Electronic
PortD.0
24
... ...
PortD.7
31
ab hier nur Mega128
PortE.0
32
... ...
PortE.7
39
PortF.0
40
... ...
PortF.7
47
PortG.0
48
... ...
PortG.4
52
5.4.12.7 Port Beispiel
// Programm läßt abwechselnd die beiden LEDs auf dem
// Application Board im Sekunden Rhythmus blinken
void
main(
void
)
{
Port_DataDirBit(PORT_LED1,PORT_OUT);
Port_DataDirBit(PORT_LED2,PORT_OUT);
while
(
true
)
// Endlosschleife
{
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
Im folgenden sind die mathematischen Funktionen aufgeführt, die der C-Control Pro 128 in
einfacher Fließkommagenauigkeit (32 Bit) beherrscht. Diese Funktionen sind nicht in der
Bibliothek des C-Control Pro 32, da sonst zuwenig Flash Speicher für Benutzerprogramme bleiben
würden.
5.4.13.1 acos
Mathematische Funktionen
Syntax
float
acos(
float
val);
Sub
acos(val
As
Single
)
As
Single