Hi to everyone here
please,I'm in urgent need to use the capabilities of the EVAL-CN0428,in conjunction with an existing microcontrollor board,connected with an EVAL-M355-ARDZ-INT board.
My question is:
Is there a guide about how to use CN0428 with a generic microcontroller?
I have the ADICUP3029 code,ADICUP3029 board and CN0428 code and board.
Despite this, I'm not able to reply on my microcontroller the communication necessary to have PH,conductivity and temperature measurements.
On my board an I2C port and some GPIO's are available
By now I need only 1 CN0428,so there is no need of I2C address reassignement.
I have experienced communication,but without properly understanding details.
I have found some unexpected behaviour:
1)The CN0428,by default ,acknowledges the I2C address 0x98
Changing its address with command 0x80 it still acknowledges the I2C address 0x98,is it correct?
I kept low the CS pin during this operation,and I waited for 1 second,as in the ADICUP3029 example:
this is my code about it
SS1_LOW; Delay(100); i2c_write_data_buffer=SET_I2C_ADDRESS; i2c_write_data_buffer=new_addr; hal_st=HAL_I2C_Master_Transmit(&hi2c1,old_addr, i2c_write_data_buffer, 2, 50); Delay(1000); /* wait for selected slave to change its address */ SS1_HIGH;
2)Lot of communication between boards is done sending ASCII values on I2C,for example ,when requesting measuresensor by PuTTY terminal , a string is sent by ADICUP3029
to CN0428 : cmeasuresensor\r ,then other strings are read by I2C reads from CN0428,they look the same of strings printed on PuTTY terminal.
I am not able to relate these strings with I2C commands listed in adi_m355_gas_sensor.h
3)Still about strings,i'm able to read back in some way the welcome message:Welcome to Water Quality Demo!Sensor Site: 1! ..but I wonder how it works:
If I read the I2C buffer more than necessary CN0428 pulls down(stretches?) the SCL pin,and it remains low unless I reset the CN0428,so, what tells to I2C master how long is the message to be read?
4)It looks that long delays are necessary between reset and some operations,is there a list of these timings?I mean without searching them one by one in ADICUP3029 CN0428 example code?
Actually the code is small ,but I would like to be shure to respect all the timings and dont miss anyone.
Thanks for your help or your attention.
Noticed some errors in caps,and other errors
[edited by: Diegotrex at 8:35 AM (GMT -5) on 18 Nov 2021]