Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
I am attempting to use the SPI master module to interface the MCP3901. The first thing I am doing is setting up the registers to the configuration I want. Then I will attempt to read.
I am using a pin on the PSoC to generate the clock. The device is not responding, a sign the configuration did not take. The sign of successful configuration I am looking for is activity on the data ready and MISO pins when invoking a read. I am receiving none.
My C code, the SPI object, and the MCP3901 are not squaring up. Given the address automatically increments upon a write, I assumed you can just write the values 8 bits at a time using the SPI master. Can any of you tell where I am mixed up? What about reading 24 bits properly?
The conversion formula I use is Voltage = (ACD_Count * Ref_Voltage) / (2^Resolution). The variables may be rearragned in the datasheet as I cannot conform if DATA_CHn is the count or the analog voltage. I am using the internal 2.37 volt reference. The in- terminals are grounded, so I am just running the converters single ended. So for this converter, based on that formula, with my setup, what is theproper method to determine the voltage level based on the count?