First page Back Continue Last page Overview Text
The I/O ports on the 68HC12 are bidirectional. By default the bidirectional ports are inputs. A data direction register that programs the direction is associated with each register. To make a bit an output, write a 1 to the corresponding bit in the data direction register. As an example to make bit 2 an output bit, write a $04 to the port’s data direction register.