Mikroelektronika MIKROE-350 データシート

ページ / 526
KEYPAD LIBRARY
The mikroBasic PRO for AVR provides a library for working with 4x4 keypad. The
library routines can also be used with 4x1, 4x2, or 4x3 keypad. For connections
explanation see schematic at the bottom of this page.
Note: Since sampling lines for AVR MCUs are activated by logical zero Keypad
Library can not be used with hardwares that have protective diodes connected with
anode to MCU side, such as mikroElektronika's Keypad extra board HW.Rev v1.20
Library Routines
- Keypad_Init 
- Keypad_Key_Press 
- Keypad_Key_Click 
234
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6
The following variable
must be defined in all
projects using Keypad
Library:
Description: 
Example : 
dim keypadPort as
byte sfr external
Keypad Port.
dim keypadPort as
byte at 
PORTB
dim
keypadPort_Direction
as byte sfr external
Direction of the Keypad
Port.
dim
keypadPort_Direction
as byte at DDRB