Specifications

mikroElektronika | Free Online Book | PIC Microcontrollers | Appendix B: Examples
B_Wait
movf Beep_TEMP1, w
movwf Beep_TEMP3
B_Waita
decfsz Beep_TEMP3, f
goto B_Waita
return
EXAMPLE 15
Using LCD display
This example illustrates the use of the alphanumeric LCD display. The program itself is very simple because macros are
used (usually the effort of creating Macros pays off in the end).
Two messages written on two lines change on display. The second message is intended to display the current temperature.
Since no sensor is installed, the measurement is not really carried out, the variable "temp" appears on the display instead
of the measured temperature.
In reality, the current temperature or some other measured value would be displayed.
Example 15:
;*********************** Header ***********************************
; DEFINING VARIABLES IN PROGRAM
CBLOCK 0x20 ; Block of variables starts at address 20h
HIcnt ; Belongs to macro "pausems"
LOcnt
LOOPcnt
LCDbuf ; Belongs to functions "LCDxxx"
LCDtemp
http://www.mikroe.com/en/books/picmcubook/appb/ (47 of 54)5/3/2009 11:36:02 AM