User Tools

Site Tools




void portOut (u16 portNumber, u8 value)

portNumber : Port Number of an individual port (not a port block)
value : 0 or 1 (0=Off, 1=On)

Sets portNumber's output state on (value=1) or off (value= 0). The port block containing the given port, portNumber, must have its I/O mode set to Output beforehand.

portOut(20,1);     // Turns port 20 on
portOut(20,0);     // Turns port 20 off

go MOACON home

moacon/portout/index.txt · Last modified: 2016/04/14 11:07 (external edit)