Manual
Table Of Contents
- AN118: Interfacing the CS5521/22/23/24/28 to the 80C51
- TABLE OF CONTENTS
- 1. INTRODUCTION
- 2. ADC DIGITAL INTERFACE
- 3. SOFTWARE DESCRIPTION
- 4. MAXIMUM SCLK RATE
- 5. DEVELOPMENT TOOL DESCRIPTION
- 6. CONCLUSION
- 7. APPENDIX: 80C51 MICROCONTROLLER CODE

AN118
22 AN118REV2
write_to_register(0x03,0x00,0x00,0x00); /* Clear RS Bit */
} while (temp != 0x40);
break;
/**********************/
/* Read Output Latch Pins */
/**********************/
case 0x5F:
temp = A1;
temp = temp<<1;
temp = temp |A0;
TXSER(temp);
COMM = 0x00; /* Turn on LED */
Delay();
COMM = 0x01; /* Turn off LED */
break;
/********************/
/* Arbitrary Read */
/********************/
case 0xEF:
temp= RXSER(); /* How many byte to return to PC*/
for(j=0;j<temp;j++){
if(mode == 1) P1 = 0x04;
temp1 = receive_byte();
if(mode == 1) P1 = 0x05;
TXSER(temp1);
COMM = 0x00; /* Turn LED on */
Delay();
COMM = 0x01; /* Turn LED off */
} /* END for loop */
break;
/********************/
/* Arbitrary Write */
/********************/
case 0xFF:
temp = RXSER(); /* How many bytes to write to A/D */
COMM = 0x00; /* Turn on LED */
Delay();
COMM = 0x01; /* Turn off LED */
if(mode == 1) P1 = 0x04;
transfer_byte(temp);
if(mode == 1) P1 = 0x05;
break;