garg29
Advanced Member level 1
generating millisecond in 89c52
hi friends,
i have designed a unit in which i m measuring temp using ds1820 with 89c52and dispklaying the result on lcd(16 X 2) .
the unit incorporates a menu key for setting max temp value .it uses two additional keys (plus and minus) for setting the
values.
If the temp goes beyond this value a relay is activated .
Now my problem is if sometime the user presses this menu key to set the temp. the microcontroller doesnt detect the key press
cause it is busy reading ds1820 which includes some small delay routines also as required by ds1820.
how can i improve key scanning i.e.. how can i make the system or microcontroller respond to any of its key as soon as it is
pressed.it should not miss the key scanning.
open_menu:
----- coding for plus minus key
------
-----
-----
ret
loop:
jnb menu_key, open_menu
write_ds1820:
----
-----
------
also includes delay routines
read_ds1820:
-----
-----
---- also includes delay routines
display_lcd:
----
---
--
ajmp loop
this is the code sequence please help me out for proper method of key scanning.
with best regards
amit
hi friends,
i have designed a unit in which i m measuring temp using ds1820 with 89c52and dispklaying the result on lcd(16 X 2) .
the unit incorporates a menu key for setting max temp value .it uses two additional keys (plus and minus) for setting the
values.
If the temp goes beyond this value a relay is activated .
Now my problem is if sometime the user presses this menu key to set the temp. the microcontroller doesnt detect the key press
cause it is busy reading ds1820 which includes some small delay routines also as required by ds1820.
how can i improve key scanning i.e.. how can i make the system or microcontroller respond to any of its key as soon as it is
pressed.it should not miss the key scanning.
open_menu:
----- coding for plus minus key
------
-----
-----
ret
loop:
jnb menu_key, open_menu
write_ds1820:
----
-----
------
also includes delay routines
read_ds1820:
-----
-----
---- also includes delay routines
display_lcd:
----
---
--
ajmp loop
this is the code sequence please help me out for proper method of key scanning.
with best regards
amit