; ***************************************************** ; * Demonstrates the use of the Include routines * ; * LCD_INC.ASM for use with the LCD on board of the * ; * ATMEL STK200 (C) 1999 Gerhard Schmidt * ; * Report bugs to info@avr-asm-tutorial.net * ; ***************************************************** ; ; .NOLIST .INCLUDE "C:\avrtools\appnotes\8515def.inc" .LIST .def mpr=R16 ; My multipurpose register, required ; Reset-/Interrupt-Vectors rjmp main ; Includes the LCD-routines, file must be in the same path .INCLUDE "LCD_INC.ASM" ; Main program main: ldi mpr,LOW(RAMEND) ; Set up stack out SPL,mpr ldi mpr,HIGH(RAMEND) out SPH,mpr ldi mpr,0xC0 ; Switch on external SRAM and WAIT out MCUCR,mpr rcall lcd_cl ; Clears display rcall lcd_st ; Standard display mode ldi mpr,0x05; Cursor position to line 1, col 5 rcall lcd_sc ldi mpr,'H' ; Output Hello World rcall lcd_ch ldi mpr,'e' rcall lcd_ch ldi mpr,'l' rcall lcd_ch rcall lcd_ch ldi mpr,'o' rcall lcd_ch ldi mpr,0x45 ; Cursor position to line 2, col 5 rcall lcd_sc ldi mpr,'W' rcall lcd_ch ldi mpr,'o' rcall lcd_ch ldi mpr,'r' rcall lcd_ch ldi mpr,'d' rcall lcd_ch ldi mpr,'!' rcall lcd_ch rcall lcd_on loop: rjmp loop ; Uff! Next week we learn how to create and read a table