Motorola MCU 68HC912 Manual de usuario Pagina 12

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 14
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 11
SLAA108A
12 SPI-Based Data Acquisition/Monitor Using the TLC2551 Serial ADC
LOOP:
LSRD ; R Shift ACCD
DBNE X,LOOP ; Loop 4 times
STAA UPPER_BYTE ; Store shifted data
STAB LOWER_BYTE ; Store shifted data
;* ----------------------------------------------------------------------
;* Transmit Subroutine
;* ----------------------------------------------------------------------
MOVB #$80, PORTS ; ADC CS Hi
BSET PORTS, #%00001000 ; Set FS to DAC(PS3) Hi
BCLR PORTS, #%00001000 ; Set FS to DAC(PS3) Lo
MOVB UPPER_BYTE, SP0DR ; Load Data Register with Upper Byte
BSR FLAG
MOVB LOWER_BYTE, SP0DR ; Load Data Register with Upper Byte
BSR FLAG
MOVB #$00, SP0DR ; Load Data Register with Zero
BSR FLAG
MOVB #$00, SP0DR ; Load Data Register with Zero
BSR FLAG
BRA SAMPLE ; Go back and do it again
;* -------------------------------------------
;* Clear SPIF
;* -------------------------------------------
FLAG:
BRCLR SP0SR,#$80,FLAG ; Wait for flag.
RTS
Vista de pagina 11
1 2 ... 7 8 9 10 11 12 13 14

Comentarios a estos manuales

Sin comentarios