zx-44

Page 1

ZX-44 V2.0 4x4 Switch Matrx board

l

1

ZX-44 V2.0

4x4 Switch Matrix board Include :1 of ZX-44 V2.0 board with jumper and leaflet Specification and Features l Selectable 2 formats by jumper A format : 4x4 B format : 4x3+4 l 2 output interface : 4-bit parallel data with STROBE and Serial data. All signal level in TTL l Baudrate 2,400 bps in serial interface l Support swtich debouncing l +5V 50mA supply

Strobe out Data bit 3 Data bit 2 Data bit 1 Data bit 0

l Interface with popular microcontrollers

GND

+5V STRB D3 D2 D1 D0 GND

+5V

A B

0

1

2

3

4

5

6

7

8

9

A

B

C

D

E

F

MODE A : Normal mode switch layout ( 4x4 )

4 bit binary of : 0-9 , A-F represent as : 0000 to 1111

1

2

3

C

4

5

6

D

7

8

9

E

A

0

B

F

MODE B : Telephone-like mode switch layout ( 4x3 + 4 )

Fig. 1- Key position assighnment in both format of ZX-44 V2.0 board


2

ZX-44 V2.0 4x4 Switch Matrx board

l

+5V

1/50V

20

10k

4k7 x 4

VCC 1 3

RESET

ROW1

MODE

ROW2

220

A

Mode Select B

ROW3 ROW4

6

D0 D1 D2 D3 STRB GND

7 8 9 11 2

Sout

D0 D1 D2 D3

COL1 COL2 COL3 COL4

12 13 14 15

16 17 18 19

STRB Sout

+5V

Maximum current rating on outputs I source = 500µA I sink = 20mA

X1 4

GND

10

IC1 NXP1416S-KPC

X2 5 CF1 4MHz

Fig. 2 - Schematic diagram of ZX-44 V2.0 board

Applications Connect ZX-44 with BASIC STAMP 1/2/2SX Using UART serial 2400bps

GND

' Example program for BASIC STAMP 1 SYMBOL KEY=B2 LOOP: SERIN 7,T2400,KEY DEBUG $KEY,CR GOTO LOOP

+5V S

+5V. P7 GND

BASIC Stamp 2/2SX or i-Stamp

' Example program for BASIC STAMP 2 KEY VAR LOOP: SERIN DEBUG GOTO

BYTE 7,396,[KEY] "Switch ",HEX KEY," pressed.",CR LOOP

' Example program for BASIC STAMP 2SX ZX-44 BOARD

KEY VAR LOOP: SERIN DEBUG GOTO

BYTE 7,1021,[KEY] "Switch ",HEX KEY," pressed.",CR LOOP


ZX-44 V2.0 4x4 Switch Matrx board Connect ZX-44 with BASIC STAMP 2/2SX Using 4 bit parallel with strobe +5V STRB

' Example program for BASIC STAMP 1 SYMBOL KEY=B2 DIRS=%00000000

GND

D3-D0

+5V. P0 P1 P2 P3 P4

BASIC Stamp 2/2SX or i-Stamp

GND

LOOP: IF PIN4=1 THEN LOOP KEY=PINS & %00001111 DEBUG $ KEY,CR LOOP1: IF PIN4=0 THEN LOOP1 GOTO LOOP ' Example program for BASIC STAMP 2/2SX KEY VAR NIB DIRL=%00000000 LOOP: IF IN4=1 THEN LOOP KEY=INA DEBUG "Switch ",HEX KEY," pressed.",CR LOOP1: IF IN4=1 THEN LOOP1 GOTO LOOP

GND

ZX-44 BOARD

Connect ZX-44 with MCS-51 Microcontroller Using UART serial 2400bps

' Example Assembly program for MCS-51 ' Running at 11.0592MHz KEY

GND

+5V S

+5V P3.0 GND

MCS-51 Microcontroller

ZX-44 BOARD

Connect ZX-44 with MCS-51 microcontroller Using 4 bit parallel with strobe +5V

GND

D3-D0

+5V. P1.0 P1.1 P1.2 P1.3 P3.2 GND GND

ZX-44 BOARD

MCS-51 Microcontroller

030H

ORG AJMP ORG RETI

0000H INIT 0023H

INIT:

MOV TMOD,#021H MOV TH1,#0F4H MOV TL1,#0F4H MOV SCON,#050H MOV IE,#10010000B SETB TR1 MAIN: JNB RI,MAIN CLR RI MOV A,SBUF MOV KEY,A ; After this, data was kept in reg. KEY ; Anything you want AJMP MAIN

' Example Assembly program for MCS-51 KEY

STRB

EQU

EQU

030H

ORG AJMP ORG AJMP

0000H INIT 0003H INT0_1

INIT: MOV IE,#10000001B MAIN: ; Anything you want.. AJMP MAIN INT0_1:MOV MOV ANL MOV ; After WAIT: JNB RETI

P1,#0FFH A,P1 A,#00FH KEY,A this, data was kept in reg. KEY P3.2,WAIT

l

3


4

l

ZX-44 V2.0 4x4 Switch Matrx board


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.