Hello,
Can someone help me please with this code. I am trying to enter a number by pushing the switch
but lcd continue displaying numbers for few seconds as if I did not release the switch (i.e add few numbers).
How can I stop lcd add numbers?.
Code for pic16f628A:
InsertHight:
select case hightswich
case 0
PAUSE 500
hight = hight+10
IF HIGHT>900 THEN
HIGHT=0
ENDIF
debounceH:
For i = 1 To 25
Pause 10 ' 10ms at a time so no interrupts are lost
Next i
UPDATE=1
GOTO DISPLAYH
DISPLAYH:
if (UPDATE=1) AND (HIGHTSWICH=0) THEN
Lcdout $fe,1," HIGHT "
Lcdout $fe,$C0," ",#hight," ","cm"
'WRITE HIGHT TO EEPROM
Write 2,HIGHT.BYTE0
WRITE 3,HIGHT.BYTE1
ENDIF
UPDATE=0
Goto inserthight
END SELECT
RETURN
Obaid