Cirrus-logic AN118 Manual do Utilizador Página 17

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 32
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 16
AN118
AN118REV2 17
low_byte = receive_byte();
TXSER(low_byte); /* Return bytes to PC */
TXSER(mid_byte);
TXSER(high_byte);
}
if (temp1 == 1 ){
do { /* Nothing*/} while (SDO !=0);/* Wait for SDO to fall */
transfer_byte(0xFF); /* Send all zeros */
for (j=0; j<sample_size; j++) {
high_byte = receive_byte();/* Receive last conversion */
mid_byte = receive_byte();
low_byte = receive_byte();
} /* END for */
} /* END if */
if(mode == 1) P1 = 0xF5; /* Set CSb */
COMM = 0x01; /* Turn off LED */
break;
/*****************************/
/* Read Channel-Setup Registers */
/*****************************/
case 0x0D:
COMM = 0x00; /* Turn on LED*/
sample_size = RXSER(); /* How many Registers? */
if(mode == 1) P1 = 0xF4; /* Clear CSb */
transfer_byte(command); /* Send command to A/D */
for (j=0; j<sample_size; j++) {
high_byte = receive_byte();/* Receive Bytes */
mid_byte = receive_byte();
low_byte = receive_byte();
TXSER(low_byte); /* Transfer data to PC */
TXSER(mid_byte);
TXSER(high_byte);
} /* END for loop */
if(mode == 1) P1 = 0xF5; /* Set CSb */
COMM = 0x01; /* Turn off LED*/
break;
/**********************/
/* Normal Conversions */
/**********************/
case 0x80: /* Normal Conversion on Setup 1 */
case 0x88: /* Normal Conversion on Setup 2 */
case 0x90: /* Normal Conversion on Setup 3 */
case 0x98: /* Normal Conversion on Setup 4 */
Vista de página 16
1 2 ... 12 13 14 15 16 17 18 19 20 21 22 ... 31 32

Comentários a estes Manuais

Sem comentários