Ana içeriğe atla

Kayıtlar

CS5532/34 etiketine sahip yayınlar gösteriliyor

HOW TO PROGRAM 24 BIT ADC CS5532/34 with PIC 18f4550 MCU C18

In some particular application regular ADC units will not be enough. Because of the relativly small resolution (e.g. 10 or 8 bit) regular ADCs will not satisfy your demand. In this situation I am using CS5532/34 from Cirrus Logic. It has a stunning resolution of 24 bit. The problem is to program this unit is hard. There is not any example code for Microchip MPLAB C18. I have written an example code for Pic MCUs. Here I am sharing this codes for your help.  Let's began with assigning the prototypes: /**PROTOTYPES*******************************************************************************/ void csadc_init(void); //16/24bit adc başlat void csadc_set(void); //6/24bit adc kanal ayarları void csadc_read(char channel); //6/24bit adc okuma The function called csadc_init() is the code that makes first initialization of the ADC IC. void csadc_init(void) {     int i;     ADC_CS=0;        OpenSPI(SPI_FOSC_64 ,M...