This presentation is the property of its rightful owner.
Sponsored Links
1 / 57

键盘与显示器接口 PowerPoint PPT Presentation


  • 84 Views
  • Uploaded on
  • Presentation posted in: General

键盘与显示器接口. 键盘可分为编码式键盘和非编码式键盘。编码 键盘能够由硬件自动提供与被按键对应的 ASCII 码或其它编码。但是它要求采用较多的硬件,价 格昂贵。非编码键盘则仅提供行和列的矩阵,其 硬件逻辑与按键编码不存在严格的对应关系,而 要由所用的程序来确定。非编码键盘的硬件接口 简单,但是要占用较多的 CPU 时间。 任何键盘接口均要解决三个主要问题: 1 、反弹跳 2 、串键保护 3 、按键识别. 1 、反弹跳 当按键开关的触点闭合或断开到其稳定,会产生一个短暂的抖 动和弹跳,如下图所示,这是机械式开关的一个共同性问题。

Download Presentation

键盘与显示器接口

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


4597511


4597511

ASCII

CPU

1

2

3


4597511

1

RS


4597511

20msCLOSE20ms


4597511

2

n

n

n

,

n


4597511

3

ASCII


4597511

Row-

Scanning(Line-Reverse)


4597511

,


4597511

CPU0


4597511

R1R2R3R4C1C2C3C4R1=0 C1=0K13C3=0K15


4597511

4410


4597511

0FH4(PB0PB3)4(PB4-PB7)F0HPB0PB304004.6(a)21PB7PB410110

F0HPB0PB3PB4PB7PB7PB41011PB3PB010110101110110ROM


4597511

8155

8051LED8155PAPBPCPALEDPC7407754528031P2.78155P2.08155IORAM81557F00HPAPC7F01H7F03H


4597511

KEY: MOV DPTR, #7F00H 8155

MOV A, #03H PAPB

MOVX @DPTRA PC

MOV R400H 0R4

MOV R201H 01HR2

KEY1MOV DPTR7F01H

MOV AR2

[email protected] 8155PA

INC DPTR

INC DPTR

MOVX [email protected] 8155PC

JB ACC.0KEY2 01

MOV A00H 00A

AJMP KEY5

KEY2JB ACC.1KEY3 12

MOV A01H 101HA

AJMP KEY5


4597511

KEY3JB ACC.2KEY4 23

MOV A02H 202HA

AJMP KEY5

KEY4JB ACC.3NEXT 3

MOV A03H 303HA

KEY5ADD AR4 +(R4)A

MOV R4A R4

RET

NEXTMOV AR4

ADD A04 4

MOV R4A

MOV AR2

JB ACC.3NEXT1

RL A

MOV R2A

AJMP KEY1

NEXT1: MOV R488H RET


4597511

1

ROM

2.


4597511

ROM


4597511

10H10H


4597511

INPUT: LCALL KEY A

MOV R0A R0

ANL A10H

JZ DATIN 10H

MOV AR0 10H

ANL A0FH 4

MOV R0A (A)3

RL A

ADD AR0

MOV DPTRTABEL

JMP @A+DPTR

TABEL:LJMP RUN RUN

LJMP RET RET

LJMP ADRS ADRS

LJMP STORE STORE

LJMP READ READ

LJMP WRITE WRITE

DATIN:


4597511

LED

LED

LEDLED


4597511

LED

8LED

LED


4597511

LED


4597511

LED

LED936816+5V30mA747544D3D0E0088H0

MOV DPTR0088H

MOV A00H

MOVX @DPTRA


4597511

LED

LEDLED


4597511

DISPB MOV DPTR7F00H 8155

MOV A03H

MOVX @ DPTRA PAPB

MOV R07AH

MOV R301H

MOV AR3

DISPB1MOV DPTR7F01H 8155 PA

MOVX @DPTRA 8155 PA

INC DPTR

MOV A @R0

ADD A0DH

MOVC A @A+PC

MOVX @DPTRA 8155 PB


4597511

ACALL DELAY

INC R0

MOV AR3

JB ACC.5DISPB2 6LED

RL A 1

MOV R3A

AJMP DISPB1

DISPB2: RET

SEGPT2: DB 3FH06H5BH4FH66H6DH

DELAY: MOV R502H

DELAY1: MOV R40FFH

DELAY2: DJNZ R4DELAY2

DJNZ R5DELAY1

RET


Led max7219

LEDMAX7219

MAX7219MAXIM7LEDBCDB88 RAMB10kLED


4597511

MAX721916DIN

CLK16

LOAD

LOAD16

DIN

16.5DOUTDOUT

CLK16D15

D12D11D8 D7D0


4597511

MAX7219


4597511

8051MAX72198051P1.0MAX7219DINP1.1LOADP1.2CLKMAX7219LED8031


4597511

MAIN: MOV SP,#60H

MOV R7,#0AH

MOV R5,#07H

LCALL DINPUT 7219

MOV R7,#0BH

MOV R5,#07H 7

LCALL DINPUT

MOV R7,#09H

MOV R5,#0FFH #FFH=7-0B#00=

LCALL DINPUT

MOV R7,#0CH

MOV R5,#01H

LCALL DINPUT

MOV 30H,#08H 8031

MOV 31H,#00H

MOV 32H,#03H

MOV 33H,#01H

MOV R7,#30H

LCALL DISPLY 7219

SJMP $


4597511

7219DINPUT: MOV A,R7 1R7MOV R2,#08 MAX72198LOOP1: RLC A AD7P1.0D6D0 MOV P1.0, C 8DIN CLR P1.2 P1.2SETB P1.2 DJNZ R2,LOOP1 MOV A,R5 2R5 MOV R2,#08 8LOOP2: RLC A AD7P1.0D6D0 MOV P1.0, C 8DIN CLR P1.2 P1.2SETB P1.2 DJNZ R2,LOOP2 CLR P1.1 P1.1LOADSETB P1.1 RET


4597511

7219DISPLY: MOV A,R7 R77219MOV R0,A R0MOV R1,#01 R18RAMMOV R3,#08LOOP3: MOV A,@R0 R5 MOV R5,A MOV A,R1 RAMR7 MOV R7,A LCALL DINPUT 7219INC R0 INC R1 DJNZ R3,LOOP3 RET


4597511

8279/

8279

  • 64(128)N8FIFO()8CPU

  • 7LED8279168RAM164RAMCPURAM1


4597511

8279


4597511

8279

  • I/O

  • FIFO/RAM

  • RAM


4597511

8279


4597511

8279


4597511

8279


4597511

8279827916A0A3B0B3SL0SL344-16SL0SL23-8882798(RL0RL7)10ms8279(FIFO)INTFIFOINTCPUFIFO82798279


4597511

8279


4597511

8031P2.78279A08279C/D7FFFH7FFEH 8279488LED74LS138


4597511

8279

INI79 MOV DPTR7FFFH 8279

MOV A0D1H

MOVX @DPTRA

WNDU MOVX [email protected] 8279

JB ACC.7WNDU

MOV A0 8279

MOVX @DPTRA

MOV A34H 8279

MOVX @DPTRA

MOV IE84H 8279

RET


4597511

RDIR MOV DPTR7FFFH RAM8279

MOV A90H

MOVX @DPTRA

MOV R078H R0

MOV R78

MOV DPTR7FFEH

RDLO MOV [email protected]

ADD A5

MOVC [email protected]+PC MOVX @DPTRA

INC R0

DJNZ R7RDLO

RET

SEG DB 3FH06H5BH4FH

DB 66H6DH, 7DH07H

DB 7FH6FH 77H7CH


4597511

PKEYIPUSH PSW

PUSH DPL

PUSH DPH

PUSH ACC

PUSH B

SETB PSW.3 1

MOV DPTR7FFFH FIFO

MOVX [email protected]

ANL A0FH

JZ PKYR FIFO?

MOV A40H FIFO8279

MOVX @DPTRA

MOV DPTR7FFEH

MOVX [email protected]

MOV R2A

ANL A38H

RR A


4597511

RR A

RR A

MOV B04H

MUL AB

XCH AR2

ANL A7

ADD AR2

MOV R040 (40H)

MOV @R0A

INC R0

MOV AR0

ANL A3FH

ORL A30H

MOV 40HA

SETB 0

PKYRPOP B

POP ACC

POP DPH

POP DPL

POP PSW

RETI


4597511

LCD

LCD

LCD


4597511

LCD

LCD, ,

, C, C, BA, LCD0, LCDC, BA, LCD, LCD


4597511

LCD

4N07MC14543BCD7PH, PHLD, LD, ADBCD, LD, BIMC14543LCD, BCDAD8051P1.0P1.3, LDP1.4P1.7, 4MC14543BCDMC14543PH8051P3.7, P3.78031T1


4597511

DISB EQU 60H ;

ORG 0000

HINIT: LJMP START ;

ORG 001BH

LJMP INTT1 ;1

ORG 0030H

START: MOV TMOD, #10H ;T11

MOV TH1, #0ECH ;10msfosc=6MHz

MOV TL1#78H

SETB TR1 T1

SETB EA ;

SETB ET1

;

LCALL DISP ;

;


4597511

DISP: MOV R0, #DISB ;R0

MOV R2, #10H ;

DISP1: MOV A, @R0 ;

ANL A, #0FH ;BCD

ORL A, R2 ;

MOV P1, A ;MC14543

ANL P1, #0FH ;MC14543

INC R0 ;R0

MOV A, R2 ;A

RL A

MOV R2, A

JNB ACC.0, DISP1 ;4

RET ;,


4597511

1

INTT: CPL P3.7 ;P3.7

MOV TH1, #0ECH ;

MOV TL1, #78H

RETI ;


4597511

EPSONEA-DSED12874SED1278, 1640


Ddram ddram

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

1

2

3

4

00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13

40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53

14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27

54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67

(DDRAM), , DDRAM


4597511


4597511

:

START: MOV DPTR, #2820H ;2820H

MOV A, #38H ;28

MOVX @DPTR, A

LCALL WAIT

MOV A, #06H ;

MOVX @DPTR, A

LCALL WAIT

MOV A, #0FH ;/

MOVX @DPTR, A

LCALL WAIT

MOV A, #01 ;

MOVX @DPTR, A

LCALL WAIT

RET

WAIT: MOV DPTR,#2820H ;

MOV A, @DPTR

JB ACC.7, WAIT ;

RET


4597511

SINGLE, ,

SINGLE:MOV DPTR, #2820H ;

MOV A, #84H ;DDRAM04H

MOV @DPTR, A

LCALL WAIT

MOV A, #53H ;S

LCALL CHAR1

MOV A, #49H ;I

LCALL CHAR1

MOV A, #4EH ;N

LCALL CHAR1

MOV A,#47H ;G

LCALL CHAR1

MOV A, #4CH ;I

LCALL CHAR1

MOV A, #45H ;L

LCALL CHAR1

LJMP SINGLE

CHAR1: DPTR, #2821H ;2821H

MOVX @DPTR, A

LCALL WAIT

RET


  • Login