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
Содержание HT-IDE
Страница 11: ...P a r t I Integrated Development Environment Part I Integrated Development Environment 1 ...
Страница 12: ...HT IDE User s Guide 2 ...
Страница 20: ...Fig 1 6 Fig 1 7 HT IDE User s Guide 10 ...
Страница 24: ...HT IDE User s Guide 14 ...
Страница 70: ...HT IDE User s Guide 60 ...
Страница 76: ...HT IDE User s Guide 66 ...
Страница 92: ...HT IDE User s Guide 82 ...
Страница 93: ...P a r t I I Development Language and Tools Part II Development Language and Tools 83 ...
Страница 94: ...HT IDE User s Guide 84 ...
Страница 148: ...HT IDE User s Guide 138 ...
Страница 150: ...Fig 12 1 Fig 12 2 HT IDE User s Guide 140 ...
Страница 154: ...HT IDE User s Guide 144 ...
Страница 192: ...HT IDE User s Guide 182 ...
Страница 194: ...HT IDE User s Guide 184 ...
Страница 218: ...HT IDE User s Guide 208 ...
Страница 235: ...P a r t V Appendix Part V Appendix 225 ...
Страница 236: ...HT IDE User s Guide 226 ...
Страница 250: ...HT IDE User s Guide 240 ...