Motorola Axiom CMD11E1 Guía de usuario Pagina 75

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 101
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 74
6.3. TIMING 75
6.3.1 Slowing it down
In the last exp eriment, we toggle the pin so fast that chances are you did not
notice the LED’s blink. We can slow it down by toggling only every so many
TOF overflows (say 31 overflows). All we need to do is introduce a counting loop
as shown below. Note that the program structure is not changed at all.
; Various defines go here ...
ORG $D000 don’t forget the $
ME FCC /Your name/
FCB 10
FCC /ECE 372/
FCB 10
FCC /Date the program was last changed/
FCB 10, 10, 4
ORG $C000 DONT FORGET THE $
LDX #ME
JSR OUTSTRG ; MAKE SURE YOU HAVE EQU FOR OUTSTRG
LOOP1
LDAB #31 ’SET UP COUNTER
LTOP
TSTB
BEQ LBOT
; CLEAR THE FLAG. NO HARM IS DONE IF IT IS ALREADY CLEARED
LDAA #%10000000
STAA TFLAG2
;WAIT FOR THE FLAG TO BE SET
LOOP2
LDAA TFLAG2
ANDA #%10000000
BEQ LOOP2
DECB
BRA LTOP
LBOT
Vista de pagina 74
1 2 ... 70 71 72 73 74 75 76 77 78 79 80 ... 100 101

Comentarios a estos manuales

Sin comentarios