Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Countdown timer + LCD + Keypad

Status
Not open for further replies.

josephkim87

New Member
Hi,

I am facing a problem in my programming. Any button press on the keypad didt display any character in the LCD.
 

Attachments

  • code.txt
    12.1 KB · Views: 271
This is my countdown timer code. My keypad code is from nigel. If any key is press, will it go to the Hours?

countdown
;Secs
S1
call Delay250
call Delay250
call Delay250
call Delay250
call Chk_Keys
movf key, w
movwf Hours
movf Hours, w
movwf NumL
call DisplayH
movlw ':'
call LCD_Char
movf Mins, w
movwf NumL
call DisplayM
movlw ':'
call LCD_Char
movf Secs, w
movwf NumL
call DisplayS
movf Secs,w
btfss STATUS,Z
goto cd_Secs
call Display_Secs

;Mins
movf Mins,w
btfss STATUS,Z
goto cd_Mins
call Display_Mins

;Hours
movf Hours,w
btfss STATUS,Z
goto cd_Hours
call Display_Hours


cd_Secs
decf Secs, f
goto S1

cd_Mins
decf Mins, f
goto S1

cd_Hours
decf Hours, f
goto S1

Display_Secs
movlw d'59'
movwf Secs
return

Display_Mins
movlw d'59'
movwf Mins
return

Display_Hours
movlw d'00'
movwf Hours
return
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top