C h a p t e r 1 5
Input/Output Applications
Using the HT48CX0 series of microcontrollers for I/O applications is very
simple using the port I/O registers to control the input/output data. The
possibility of single bit manipulation further enhances control of input and
output data giving increased flexibility. Setting the port bits to either input
or output is conducted under program control and normally implemented
within the program initialization section. Setting the port bits can be
changed again within the main program section, however this is not
recommended unless the circuit design calls for special double function I/O
port operation.
Scanning Light
This example gives a functional emulation of a scanning LED array. Here
a row of LEDs will light in turn one after the other. The circuit uses the PA
port PA0~PA7, each bit of which is connected via a 240
Ω
series resistor to
an LED.
Circuit design
The I/O port bits PA0~PA7 are the outputs, with each output bit controlling
a single LED via a 240
Ω
series resistor. By using the instructions RRC and
RLC the illuminated LED can be made to move from left to right and vice
versa. See the circuit diagram for more details.
15
Chapter 15 Input/Output Applications
185
Summary of Contents for HT-IDE
Page 11: ...P a r t I Integrated Development Environment Part I Integrated Development Environment 1 ...
Page 12: ...HT IDE User s Guide 2 ...
Page 20: ...Fig 1 6 Fig 1 7 HT IDE User s Guide 10 ...
Page 24: ...HT IDE User s Guide 14 ...
Page 70: ...HT IDE User s Guide 60 ...
Page 76: ...HT IDE User s Guide 66 ...
Page 92: ...HT IDE User s Guide 82 ...
Page 93: ...P a r t I I Development Language and Tools Part II Development Language and Tools 83 ...
Page 94: ...HT IDE User s Guide 84 ...
Page 148: ...HT IDE User s Guide 138 ...
Page 150: ...Fig 12 1 Fig 12 2 HT IDE User s Guide 140 ...
Page 154: ...HT IDE User s Guide 144 ...
Page 192: ...HT IDE User s Guide 182 ...
Page 194: ...HT IDE User s Guide 184 ...
Page 218: ...HT IDE User s Guide 208 ...
Page 235: ...P a r t V Appendix Part V Appendix 225 ...
Page 236: ...HT IDE User s Guide 226 ...
Page 250: ...HT IDE User s Guide 240 ...