Chapter 10, Keyboard interface, Introduction – Cirrus Logic EP73xx User Manual

Page 101: Features, Register list, Programming example, Chapter 10. keyboard interface, Chapter 10 10 keyboard interface introduction

Advertising
background image

EP7309/11/12 User’s Manual - DS508UM4

10-1

Copyright Cirrus Logic, Inc. 2003

1010

10

Chapter 10

10

Keyboard Interface

Introduction

The keyboard interface provides the necessary hardware for a direct connect to an 8x8
or 64-key entry keyboard. Scanning for a keypress involves column and GPIO pins
which assert and read column by column. If enabled, there is an internal interrupt
that be generated from a keypress.

Features

• Maximum direct interface of an 8x8 array

• Dedicated column drives and GPIOs for detection

• Keyboard interrupt (if enabled)

Register List

See

Chapter 5

.

Programming Example

;*****************************************************************************

; Purpose of the code is to read a 1x8 keypad using column 1 drive and read
; From GPIO Port A pins. Keypress should also generate an interrupt

;*****************************************************************************

KBD6_WEN

EQU

0x8

; All eight Port A ORed to create interrupt, Keypress
; will also Wakeup processor from Standby state

PortA_DR

EQU

0x80000000

SYSCON1

EQU

0x80001000

;

ldr

r0, = SYSCON1

ldr

r2, = PortA_DR

mov

r1, #KBD6_WEN ; Interrupt enabled

str

r1,[r0,#0x100] ; SYSCON1 bits set for

;

;......... from the interrupt routine....................

;

mov

r3, #0x9

str

r3, [r2,#0x100] ; assert column1 drive for keypress read

ldr

r1, [r2,#0x0] ; read Port A for Keypress value.

mov

r4, #0xff

str

r4, [r0, #700] ; clear keyboard interrupt

;

Advertising