Epson S1C6200A Specifiche Pagina 122

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 191
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 121
II-12 EPSON S1C6S2N7 TECHNICAL SOFTWARE
CHAPTER 2: INITIAL RESET
Initialize Program Example
The following is a program that clears the RAM and LCD,
resets the flags, registers, timer, and stopwatch timer, and
sets the stack pointer immediately after resetting the sys-
tem.
Label Mnemonic/operand Comment
ORG 100H
JP INIT ;Jump to "INIT"
;
ORG 110H
INIT RST F,0011B ;Interrupt mask, decimal
;adjustment off
;
LD X,0 ;
RAMCLR LDPX MX,0 ;
CP XH,5H ;
JP NZ,RAMCLR ;
LD X,90H ;
LCDCLR LDPX MX,0 ;
CP XM,0BH ;
JP NZ,LCDCLR ;
;
LD A,0 ;
LD B,4 ;
LD SPL,A ;
LD SPH,B ;
;
LD X,0F9H ;
OR MX,0101B ;
;
LD X,0EBH ;
OR MX,0111B ;
;
LD X,0E8H ;
OR MX,1111B ;
;
LD X,0E9H ;
OR MX,0001B ;
Clear RAM (00H–4FH)
Enable timer interrupt
Enable input interrupt
(K03–K00)
Clear LCD (90H–AFH)
Reset timer and stopwatch
timer
Set stack pointer to 40H
2.2
Enable motor driver
interrupt
Vedere la pagina 121
1 2 ... 117 118 119 120 121 122 123 124 125 126 127 ... 190 191

Commenti su questo manuale

Nessun commento