171
C-Control Pro Mega Series
© 2008 Conrad Electronic
6.14.1 Port_DataDir
Port Functions
Syntax
void Port_DataDir(byte port,byte val);
Sub Port_DataDir(port As Byte,val As Byte)
Description
The function Port_DataDir configures the port for input or output direction. Is a bit set, then the Pin
corresponding to the bit position is switched to output. Example: Is port = PortB and val = 0x02, then
PortB.1 is configured for output, all other ports on PortB are set to input (
see Pin Assignment
of
and
Parameter
port port number (see table)
val output byte
port number table
Definition
Value
PortA
0
PortB
1
PortC
2
PortD
3
PortE (
Mega128
)
4
PortF (
Mega128
)
5
PortG (
Mega128
)
6
6.14.2 Port_DataDirBit
Port Functions
Syntax
void Port_DataDirBit(byte portbit,byte val);
Sub Port_DataDirBit(portbit As Byte,val As Byte)
Description
The function Port_DataDirBit configures one bit (Pin) of a port for input or output direction. Is a bit set, then
the Pin corresponding to the bit position is switched to output. Example: Is portbit = 10 and val = 0, then
PortB.2 is configured for input. All other ports on PortB stay the same (
see Pin Assignment
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: ......