Instructions
309 C-Control Pro IDE
© 2013 Conrad Electronic
Port28
52
PB20
Port29
53
PB21
Port30
54
PB22
Port31
55
PB23
Port32
65
PC01
Port33
70
PC06
Port34
68
PC04
Port35
69
PC05
Port36
81
PC17
Port37
82
PC18
Port38
79
PC15
Port39
80
PC16
Port40
83
PC19
Port41
84
PC20
Port42
76
PC12
Port43
75
PC11
Port44
77
PC13
Port45
78
PC14
Port46
85
PC21
Port47
86
PC22
Port48
87
PC23
Port49
88
PC24
Port50
95
PC31
Port51
103
PD07
Port52
104
PD08
Port53
117
PD21
Port54
118
PD22
Port55
119
PD23
Port56
51
PB19
Port57
34
PB02
5.18.11 Port Example (Mega)
// Program toggles the LED's on the applicationboard
// alternately every second
void main(void)
{
Port_DataDirBit(PORT_LED1,PORT_OUT);
Port_DataDirBit(PORT_LED2,PORT_OUT);
while(true) // endless loop
{
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);
}
}