Motorola Axiom CMD11E1 Guia do Utilizador Página 91

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 101
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 90
8.5. VARIABLE FREQUENCY GENERATOR 91
FDB 851, 804, 759, 716, 676
OFFTIMETBL
FDB 3409, 3217, 3037, 2866, 2706
FDB 2554, 2410, 2275, 2147, 2027
Note that it makes sense to enter numbers in decimal notation. Each entry in the
table requires two bytes (we use 16 bit numbers to measure time since the HC11
clock is a 16 bit quantity). Hence we use FDB instead of FCB. Note that this also
means that we have to index through memory in steps of two bytes. Suppose
we want to access the element #4 in ONTIMETBL and the value #4 is in the
B register (the number #4 is used only as an illustration. In the application the
register B will have the value). Then we have to access the element we have to
write
LDX #ONTIMETBL
ABX
ABX ; NEED TWO ABX’S
??? 0,X
We can now modify the single tone generator to a programmable square wave
generator by making the following changes:
Before After
LDD #1000 LDX #ONTIMETBL
STD ONTIME LDY #OFFTIMETBL
LDD #3000 LDD 0,X
STD OFFTIME STD ONTIME
LDD 0,Y
STD OFFTIME
Vista de página 90
1 2 ... 86 87 88 89 90 91 92 93 94 95 96 ... 100 101

Comentários a estes Manuais

Sem comentários