Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Keypad and LCD using Assembly Language

Status
Not open for further replies.

Rushdiey

Junior Member level 2
Joined
Jan 10, 2013
Messages
24
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,419
Hello im new here. I need to write assembly language.
When i press at keypad i will display at lcd
 

Seriusly i dont understand it
 

I need to write assembly language.
When i press at keypad i will display at lcd

What microcontroller are you using for your design?

What type of keypad, 3x4, 4x4, etc?

Is this physical hardware or simulation?

BigDog
 

I Got the code.
But in C..
Can someboy convert to assembly?
 

Look again, the links I provided offer both source code examples in both C and Assembly Languages.

Example:
Code:
;In this whole 4-bit tutorial LCD is connected to
;my controller in following way...
;D4 - P3.0
;D5 - P3.1
;D6 - P3.2
;D7 - P3.3
;EN - P3.7
;RS - P3.5

        lcd_port equ P3         ;LCD connected to Port3
        en equ P3.7             ;Enable connected to P3.7
        rs equ P3.5             ;Register select to P3.5
       
lcd_reset:                  ;LCD reset sequence
        mov lcd_port, #0FFH
        mov delay,#20           ;20mS delay
        acall delayms
        mov lcd_port, #83H      ;Data = 30H, EN = 1, First Init
        mov lcd_port, #03H      ;Data = 30H, EN = 0
        mov delay,#15           ;Delay 15mS
        acall delayms
        mov lcd_port, #83H      ;Second Init, Data = 30H, EN = 1
        mov lcd_port, #03H      ;Data = 30H, EN = 0
        mov delay,#5            ;Delay 5mS
        acall delayms
        mov lcd_port, #83H      ;Third Init
        mov lcd_port, #03H
        mov delay,#5            ;Delay 5mS
        acall delayms
        mov lcd_port, #82H      ;Select Data width (20H for 4bit)
        mov lcd_port, #02H      ;Data = 20H, EN = 0
        mov delay,#5            ;Delay 5mS
        acall delayms
        ret

lcd_init:
        acall lcd_reset         ;Call LCD Reset sequence
        mov a,#28H              ;4-bit, 2 line, 5x7 dots
        acall lcd_cmd           ;Call LCD command
        mov a,#0CH              ;Display ON cursor OFF
        acall lcd_cmd           ;Call LCD command
        mov a,#06H              ;Set entry mode (Auto increment)
        acall lcd_cmd           ;Call LCD command
        mov a,#80H              ;Bring cursor to line 1
        acall lcd_cmd           ;Call LCD command
        ret

BigDog
 

3298728700_1358408314.jpg


Got Error
 

check this code
 

Attachments

  • keyboard_to_lcd(8051).txt
    3.3 KB · Views: 282

I GOT 1 ERROR AT STORE:MOV..
IF I DELETE MOV..
NOTHING happen
 

comment or delete the line number of 81 and 86

and check it works fine
 

code dont have any error..
but no output... nothing happen
 

make the following connections

;KEYPAD TO LCD
;
;FOR LCD
;P0 DATA LINES
;P2.0 - RS
;P2.1 - R/W
;P2.2 - EN

;FOR KEYPAD
;P1 - KEYPAD
;
 

How to use it? I don't understand
 

port 0 - data lines for LCD
port 2.0 - RS pin for LCD
port 2.1 - R/W pin For LCD
Port 2.2 - En pin for LCD

port 1 - matrix keypad
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top