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)
So the first thing i have done is connected the sensor with 3,3V/GND and SDA and SCL
In PSoC creator i have made a I2C component made is as master and last wrote a main file (attached in this topic).
But here does all the fun stops. As i read in the datasheet the I2C adress is 0x39
and the first thing i do is using the function mastersendstart, but nothing happends if i look at the oscilloscop
I then found out that the device is in a power-down state during startup and i have to write something special to wake it up
"After applying VDD, the device will initially be in the power-down state. To operate the device, issue a command to access the CONTROL register followed by the data value 03h to power up the device. At this point, both ADC channels will begin a conversion at the default integration time of 400 ms. After 400 ms, the conversion results will be available in the DATA0 and DATA1 registers. Use the following pseudo code to read the data registers:"
As i read, i have to send the value 0x03 and a command to acess the contral register, but what command is that? Do i have send these to the device before the mastersendstart and what command should i use?
How do I acess the Data0 and Data1 register with a psoc?