2018-05-30 02:15 AM
Hi there, I am new to this community and recently started using STM32 mcus. There is still alot I do not know about
this subject so please bear with me. I am trying to get familiar with using these mcus and would therefore makea simple datalogger using the STM32F072RBT6 in combination with the ADC MCP3903.
While I found a library for arduino, I could not find anything for STM.
http://www.kerrywong.com/2014/05/10/mcp3903-library/
-Does such a library exists? If not, Is it possible to convert it so that it can be used in the described combination?-If that does not work either, do you know of a different ADC with similar capabilities where libraries already exist?Thank you very much for your time and help.
Solved! Go to Solution.
2018-05-30 09:35 AM
The library seems pretty easy to port to Cube environment.
Re-write the readRegister()/writeRegister() methods using HAL_SPI_TransmitReceive instead of SPI.Transfer() and use HAL_GPIO_WritePin instead of digitalWrite().
2018-05-30 09:08 AM
just mimic the functionality described on page 31 of the MCP3903 data sheet
its an easy detailed explanation.
Do you have a scope or logic analyzer ?
2018-05-30 09:35 AM
The library seems pretty easy to port to Cube environment.
Re-write the readRegister()/writeRegister() methods using HAL_SPI_TransmitReceive instead of SPI.Transfer() and use HAL_GPIO_WritePin instead of digitalWrite().
2018-05-31 05:39 AM
Unfortunately, I neither have a scope nor a logic analyzer. I am not sure what I need to look at on page 31.
2018-05-31 05:40 AM
Thank you, I will try that.