View Full Version : LCD display icon
cyber88
- 23rd October 2007, 04:10
hi i new to lcd and now playing with lcd to make an alarm clock.how can i made a bell icon display in lcd when i on the alarm?i attach the pic i get from internet.how can i made my LCD display like this?
Darrel Taylor
- 23rd October 2007, 04:59
... how can i made a bell icon display in lcd ...
With this ...
http://www.picbasic.co.uk/forum/showthread.php?t=2598
<br>
cyber88
- 24th October 2007, 02:32
thanks for the help....:-)
by the way, i got something don't understand
why my display on second keep fresh and fresh in LCD and it made it look like blinking?
is the any problem with my LCD display or need to add extra component?
i using standard connection according to picbasic manual book.
my LCD model:BONA MC1602-17
mackrackit
- 24th October 2007, 04:33
I would guess a PAUSE of 100 some place after the LCD updates will stop the blink.
cyber88
- 24th October 2007, 05:59
here is my programe
'4Mhz Crystal is use
DEFINE LCD_LINES 2
hour VAR BYTE
dhour VAR BYTE
minute VAR BYTE
second VAR BYTE
scaler VAR BYTE
i VAR BYTE
Pause 100 'wait lcd startup
hour = 0
minute = 0
second = 0
scaler = 0
OPTION_REG = %11010101
INTCON = %10100000
display:
LCDOut $fe,1
dhour = hour
IF (hour//12) = 0 Then
dhour = dhour + 12
EndIF
IF hour < 12 Then
LCDOut DEC2 dhour,":",DEC2 minute,":",DEC2 second, "AM"
LCDOut $fe,$c0,"Simple Test"
Else
LCDOut DEC2 (dhour - 12),":",DEC2 minute,":",DEC2 second, "PM"
LCDOut $fe,$c0,"Simple Test"
EndIF
GoSub timing
GoTo display
timing:
scaler = scaler + 1
IF scaler > 61Then
scaler = 0
second = second + 1
IF second > 59Then
second = 0
minute = minute +1
IF minute > 59Then
minute = 0
hour = hour + 1
IF hour > 24 Then
hour = 0
EndIF
EndIF
EndIF
EndIF
Return
End
where should i put the pause 100 and how i can display simple test in second line?
it seem it run only time but didn't display simple test in second line
savnik
- 24th October 2007, 07:01
here is my programe
'4Mhz Crystal is use
DEFINE LCD_LINES 2
hour VAR BYTE
dhour VAR BYTE
minute VAR BYTE
second VAR BYTE
scaler VAR BYTE
i VAR BYTE
Pause 100 'wait lcd startup
hour = 0
minute = 0
second = 0
scaler = 0
OPTION_REG = %11010101
INTCON = %10100000
display:
LCDOut $fe,1
dhour = hour
IF (hour//12) = 0 Then
dhour = dhour + 12
EndIF
IF hour < 12 Then
LCDOut DEC2 dhour,":",DEC2 minute,":",DEC2 second, "AM"
LCDOut $fe,$c0,"Simple Test"
Else
LCDOut DEC2 (dhour - 12),":",DEC2 minute,":",DEC2 second, "PM"
LCDOut $fe,$c0,"Simple Test"
EndIF
pause 100 ' pause for .1 sec
GoSub timing
GoTo display
timing:
scaler = scaler + 1
IF scaler > 61Then
scaler = 0
second = second + 1
IF second > 59Then
second = 0
minute = minute +1
IF minute > 59Then
minute = 0
hour = hour + 1
IF hour > 24 Then
hour = 0
EndIF
EndIF
EndIF
EndIF
Return
End
where should i put the pause 100 and how i can display simple test in second line?
it seem it run only time but didn't display simple test in second line
Add pause 100 before GoSub timing
cyber88
- 24th October 2007, 08:21
display:
LCDOut $fe,1
dhour = hour
IF (hour//12) = 0 Then
dhour = dhour + 12
EndIF
IF hour < 12 Then
LCDOut DEC2 dhour,":",DEC2 minute,":",DEC2 second, "AM"
LCDOut $fe,$c0,"Simple Test"
Else
LCDOut DEC2 (dhour - 12),":",DEC2 minute,":",DEC2 second, "PM"
LCDOut $fe,$c0,"Simple Test"
EndIF
pause 100 ' pause for .1 sec
GoSub timing
GoTo display
thanks for the help. but i still cannot get display Simple test in LCD second line.
is it my coding problem or my connection to LCD(i use last 4 bit to connect).
if i use
LCDOUT "hello"
LCDOUT $fe,$c0,"simple test"
it come out as i want.but with the above coding, it didn't show out.
savnik
- 24th October 2007, 11:01
display:
dhour = hour
IF (hour//12) = 0 Then
dhour = dhour + 12
EndIF
LCDOut $fe,1
IF hour < 12 Then
LCDOut DEC2 dhour,":",DEC2 minute,":",DEC2 second, "AM"
Else
LCDOut DEC2 (dhour - 12),":",DEC2 minute,":",DEC2 second, "PM"
EndIF
LCDOut $fe,$c0,"Simple Test"
pause 100 ' pause for .1 sec
GoSub timing
GoTo display
cyber88
- 26th October 2007, 04:51
thanks for the help
here are my code for day
symbol mon = 0
symbol tue = 1
symbol wed = 2
symbol thu = 3
symbol fri = 4
symbol sat = 5
symbol sun = 6
hour var byte
day var byte
day = 0 ' initial day at mon when program run
if hour > 24 then
day = day + 1
endif
if day > 7 then
day = 0
endif
lcdout $fe,$c0, dec3 day
*the display only show 000, not mon.
how i write the code to display date:month:year
savnik
- 26th October 2007, 07:09
loop:
hour = hour + 1
if hour > 24 then
day = day + 1
endif
if day > 7 then
day = 0
endif
lcdout $fe,$c0, dec3 day
pause 200
goto loop
lcdout $fe,$c0, dec3 date ,":", dec3 month ,":", dec3 year
cyber88
- 26th October 2007, 08:06
code :
loop:
hour = hour + 1
if hour > 24 then
day = day + 1
endif
if day > 7 then
day = 0
endif
lcdout $fe,$c0, dec3 day
pause 200
goto loop
i already try but the LCD display 000
is it because my declare wrong here
code:
symbol mon = 0
symbol tue = 1
day var byte
savnik
- 26th October 2007, 08:43
try this
loop:
hour = hour + 1
pause 100
if hour > 24 then
day = day + 1
endif
if day > 7 then
day = 0
endif
lcdout $fe,$c0, dec3 day
pause 1000
goto loop
cyber88
- 28th October 2007, 04:20
thanks....it work well now...now i want to made an alarm for my clock, i connect my buzzer at PORTB.0 for pic16f84.how should i write the alarm coding and it auto send signal to buzzer when the alarm is match?
cyber88
- 29th October 2007, 07:09
does anyone have a code for an alarm clock?my code for alarm seem not running.it cannot save the time i set to alarm the buzzer and whole alarm code not running.how can i save the time i set to alarm the buzzer and it auto wake me up everyday on that time without everyday set the alarm again?now i only left the alarm part for my LCD clock.can anyone please help me?
i read the asm code, it say move the part i want to save into eeprom.how can i do that in picbasic?
mackrackit
- 29th October 2007, 09:25
See if any of these threads help:
http://www.picbasic.co.uk/forum/showthread.php?t=2129&highlight=timer
http://www.picbasic.co.uk/forum/showthread.php?t=632&highlight=timer
http://www.picbasic.co.uk/forum/showthread.php?t=190&highlight=timer
http://www.picbasic.co.uk/forum/showthread.php?t=6545&highlight=timer
http://www.picbasic.co.uk/forum/showthread.php?t=4088&highlight=timer
Powered by vBulletin® Version 4.1.7 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.