90 likes | 211 Views
ECE 425. Pin Connect Block. Pin Limited. Processors tend to be severely pin limited. Way more functions available than is practical to connect individually to I/O pins. High-end packages may have over 1000 pins Difficult to manufacture boards for them. For “difficult,” read “expensive.”
E N D
ECE 425 Pin Connect Block
Pin Limited • Processors tend to be severely pin limited. • Way more functions available than is practical to connect individually to I/O pins. • High-end packages may have over 1000 pins • Difficult to manufacture boards for them. • For “difficult,” read “expensive.” • Inexpensive packages (like LPC2148 used in lab) have a small number of pins.
Multi-Function Pins • Solution is to multiplex pin functions. • That’s always been done to some extent. • Example: Intel Address/Data Mux Bus, Motorola GPIO/Timer • ARM/LPC takes it much farther than 80’s architecture like 8051, HC12, etc. • Implication is that it may be impractical to use some modules simultaneously.
Timer I/O • ARM timer needs to be able to read triggers from external world and send signals to external devices. • By default, timer is not connected to any pins. • Must be connected via Pin Connect Block. • This needs to be done before timer functions & interrupts are enabled. • Pins connected to timer functions then become unavailable for GPIO, etc.
Pin Select Registers • Two 32-bit registers used to define functions that will be connected to pins. • Two bits per pin, up to 4 totally different uses for some pins. • Third control register primarily used to put I/O into debug/trace modes. • Most programmable pins default to GPIO. • Not all pins are programmable. VCC, Reset, etc.
Pin Select Registers • Pin select addresses: • PINSEL0: 0xE002 C000 • PINSEL1 - 0xE002 C004 • Now still need to associate Px.y with something physical. • Look on pin diagram of device being used.
Timer 0 Capture 0 • Connect it to a pin by writing binary 10 to bits 5:4 of Pin Select Register 0, address 0xE002_C000. • That would be 00000020h if all other bits are zeros • Then in the hardware design the input from the sensor is connected to Pin 22.