Cirrus-logic AN89 Manual de usuario Pagina 6

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 12
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 5
AN89
6 AN89Rev2
**************************************************************************************
* Program Code
**************************************************************************************
ORG $0100
**************************************************************************************
* Routine - Main
* Input - none
* Output - none
* This is the entry point to the program.
**************************************************************************************
MAIN EQU * ; Start from Reset Vector
******** Initialize System and Perform SELF OFFSET Calibration
JSR initialize ; Initialize the system
JSR calibrate ; Calibrate the ADC Offset
******** Write to the GAIN Register
LDA #$82 ; Prepare COMMANDBYTE
STA COMMANDBYTE
LDA #$80 ; Prepare HIGHBYTE
STA HIGHBYTE
CLR MIDBYTE ; Prepare MIDBYTE
CLR LOWBYTE ; Prepare LOWBYTE
JSR write_register ; Write to Gain Register
******** Read from the GAIN Register
LDA #$92 ; Prepare COMMANDBYTE
STA COMMANDBYTE
JSR read_register ; Read the Gain Register
******** Perform Single Conversions
LOOP JSR convert ; Convert Analog input
JMP LOOP ; Repeat Loop
******** End MAIN
Vista de pagina 5
1 2 3 4 5 6 7 8 9 10 11 12

Comentarios a estos manuales

Sin comentarios