Specifications
18
AVR064
2529A–AVR–11/02
To adjust the variable MINUTE: Press SW7 until “CLOCK” appears in the LCD display,
and select this by pressing SW6 to activate Menu 2 under “CLOCK”. Pressing SW7 will
now toggle between the alternatives in Menu 2, Hour, Minute, and Second. Press SW7
until the variable MINUTE is blinking in the LCD display, and select this by pressing
SW6. Now Menu 3 is activated and the colons should disappear. Pressing SW7 will
increase the variable MINUTE and SW6 will decrease. When desired value has been
selected, press SW5 to deactivate Menu 3, and go back to Menu 2. Press SW5 once
more to deactivate Menu 2 and go back to Menu 1.
The same procedure can be used to adjust the other variables as well.
LCD Writing to the LCD requires an LCD driver. The driver used in this application is
described in the application note “AVR065: LCD Driver for the STK502 LCD”.
LCD Update Figure 15. LCD_update
This function will load data into the LCD_displayBuffer.
First check if the LCD has been updated with the data already in the LCD_displayBuffer.
If so, set the LCD_update required to FALSE. This will prevent the LCD to be updated
with incomplete data, if an LCD Start of Frame interrupt should occur during this
function.
If a text-string is to be scrolled, clear display and call the LCDscrollMSG function. If no
text to scroll, check if there is data to write from the TransmitBuffer, and load the data
into the LCD_displayBuffer. Digits can be set to blink on the display. To do this the digit
will be loaded with either its data value or a ASCII-space (0x20), depending on the vari-
able LCD_Blink.
Clear All
Special Segments
Set
Specialsegments
if Required
Write Data
fromTransmit-
Buffer?
Yes
No
No
Yes
Load One
Byte from
Transmit Buffer
Write the
Digit to
LCD_displayBuffer
Activate Blinking
if that is Required
Six Digits
Written to
Buffer?
Yes No
Go to
LCDscrollMSG
Function.
LCD_update
Return
Set
LCD_updateComplete
= FALSE
Set
LCD_updateRequired
= FALSE
LCD_
updateComplete
= TRUE?
Set
LCD_updateRequired
= TRUE
Enable All
Segments
Scrolling
Text?
Yes
No