ELEC3050 Lab5 Keypad Slides F11

ELEC3050 Lab5 Keypad Slides F11 - ELEC 3040/3050 Lab 5...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Matrix Keypad Interface Using Parallel I/O ELEC 3040/3050 Lab 5
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Goals of this lab exercise Control a peripheral “device” with the MC9S12C32 microcontroller Use parallel I/O ports to control and access a device Implement program-controlled and/or interrupt-driven input/output (I/O) Program controlled: software controls timing of data transfers Interrupt-driven: external device triggers data transfer
Background image of page 2
Ports available on the MC9S12C32/Dragonfly PORT T (bits 0-7) General-purpose I/O pins PT7-PT0 Access via PTT Pin directions set via DDRT Programmable timer inputs/outputs IOC7-IOC0 Enable via timer setup registers Default is general-purpose I/O Bits 0-4 can be connected to the PWM module Select via MODRR (0=timer*, 1 = PWM) *default Programmable internal pull-up/down resistors
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Ports available on the MC9S12C32/Dragonfly PORT AD (bits 7-0) Analog-to-digital converter inputs AN7-AN0 Default function General-purpose digital I/O pins PAD7-PAD0 ** Directions set via DDRAD ** Access via two I/O registers ** PTAD – digital I/O PTIAD – read PAD input pins Programmable pull-up/down resistors **Register ATDDIEN bit k must be set to 1 to enable digital input buffer k (default is to disable the buffer) ** Must configure both DDRAD and ATDDIEN for digital inputs
Background image of page 4
Ports available on the MC9S12C32/Dragonfly PORT E bits PE0,PE1,PE4,PE7 Special functions: PE0 = XIRQ# (nonmaskable interrupt request input) PE1 = IRQ# (interrupt request input) PE4 = ECLK output PE7 = XCLK output
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 16

ELEC3050 Lab5 Keypad Slides F11 - ELEC 3040/3050 Lab 5...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online