Rainbow-electronics Atmega169L Manuale Utente Pagina 218

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 317
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 217
218
ATmega169V/L
2514AAVR08/02
Note: 1. The example code assumes that the part specific header file is included.
Assembly Code Example
(1)
LCD_disable:
; Wait until a new frame is started.
Wait_1:
lds r16, LCDCRA
sbrs r16, LCDIF
rjmp Wait_1
; Set LCD Blanking and clear interrupt flag
; by writing a logical one to the flag.
ldi r16, (1<<LCDEN)|(1<<LCDIF)|(1<<LCDBL)
sts LCDCRA, r16
; Wait until LCD Blanking is effective.
Wait_2:
lds r16, LCDCRA
sbrs r16, LCDIF
rjmp Wait_2
; Disable LCD.
ldi r16, (0<<LCDEN)
sts LCDCRA, r16
ret
C Code Example
(1)
Void LCD_disable(void);
{
/* Wait until a new frame is started. */
while ( !(LCDCRA & (1<<LCDIF)) )
;
/* Set LCD Blanking and clear interrupt flag */
/* by writing a logical one to the flag. */
LCDCRA = (1<<LCDEN)|(1<<LCDIF)|(1<<LCDBL);
/* Wait until LCD Blanking is effective. */
while ( !(LCDCRA & (1<<LCDIF)) )
;
/* Disable LCD */
LCDCRA = (0<<LCDEN);
}
Vedere la pagina 217
1 2 ... 213 214 215 216 217 218 219 220 221 222 223 ... 316 317

Commenti su questo manuale

Nessun commento