Cirrus-logic AN118 Manual de usuario Pagina 25

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 32
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 24
AN118
AN118REV2 25
else
toggle_two_leds(); /* Test Failed */
break;
/* Test Mode 3: This test lights the first two LED and then
repeatively iniates a conversion and reads it from the serial port. */
case 0x03:
RESET = 0x00;
COMM = 0x00;
while(1)
read_conversion(0x80);
break;
/* Test Mode 4: This test lights the third LED’s. Then it
continuously write to the Gain Registers of PC1. */
case 0x04:
GAIN_CAL = 0x00;
while(1)
write_to_register(0x02,0xAA,0xAA,0xAA);
break;
/* Test Mode 5: This test lights the odd LED’s. Then it
continuously reads the gain register of PC1. */
case 0x05:
RESET = 0x00;
GAIN_CAL = 0x00;
while(1)
read_register(0x0A); /* Read Gain Register of PC1 */
break;
/* Test Mode 6: This test mode tests the RS232 link.
it receives three bytes from the PC and echoes them
back. This PC determines if the test passed. The last
three LED’s are lit to indicate this test mode. */
case 0x06:
COMM = 0x00;
GAIN_CAL = 0x00;
low_byte = RXSER(); /* Receive low byte from PC */
mid_byte = RXSER();
high_byte = RXSER();
TXSER(low_byte); /* Transfer bytes back to PC */
TXSER(mid_byte);
TXSER(high_byte);
toggle_all_leds();
break;
Vista de pagina 24
1 2 ... 20 21 22 23 24 25 26 27 28 29 30 31 32

Comentarios a estos manuales

Sin comentarios