Motorola Axiom CMD11E1 Guía de usuario Pagina 45

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 101
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 44
3.10. HARDWARE INTERFACING 45
NOSTR FCC /NO/
FCB 4
;;;;;;;;;;;;;;;;;;;;;;;end of code ;;;;;;;;;;;;;;;;;;;;;;;;
3.10 Hardware Interfacing
Working with random numbers is fine, but we want to do something useful. In
HC11, there area special memory locations called PORTS. The special nature of
these locations allows us to have direct access to the individual bits using external
circuitry. Each bit in the port has an I/O line associated with it. This line
provides access to the bit. The bits in the port can be one of two types:
1. A bit in a port could be an input bit. If this is the case, then we can only
set or clear the bit using external electrical circuit connected to the I/O line
associated with the bit. This means that the code you wrote earlier to set or
clear a bit will have no effect on the bit. You can however check the bit and
take appropriate action. To set the bit, you have to set the voltage of the
I/O line above 3 volts (without exceeding the supply voltage of 5 volts). To
clear the bit, you have to set the voltage of the bit to below 2 volts (without
going below zero).
2. A particular bit can be an output bit. If this is the case, we can set or clear
the bit in our program and the bit will control the I/O line associated with
the bit. If the bit get set, then the voltage on the line will go to 5 volts. If
the bit is cleared, the voltage on the line will go to zero. Make absolutely
sure that you do not connect any external device that can control
the voltage (such as a voltage source) to the line. The single biggest
reason why HC11 ports get burnt is when some external device tries to send
the voltage on the line to zero while your program tries to send it to 5 volts
or vice versa. If you are concerned about damaging the port. always
connect 2.2K or larger resistor in series with the port. This will
limit the port current to 1 mA or less.
3.10.1 PORTA at location $1000
In this experiment we shall work with PORTA which is at memory location $1000.
The bits of PORTA are designated as PA7, PA6, PA5, · · · PA0. If you are using
the
FOX11
board, the lines associated with these ports are clearly labelled. If you
are using CMD11E1 from Axiom, the lines are the first 8 pins in the MCU CONNECTOR.
The bits PA0, PA1, PA2 are inputs. This means you can connect external circuits
to these pins. The bits PA3, PA4, PA5, PA6 are outputs. This means you can
Vista de pagina 44
1 2 ... 40 41 42 43 44 45 46 47 48 49 50 ... 100 101

Comentarios a estos manuales

Sin comentarios