Reply
Posts: 11
Registered: ‎08-31-2017

SI1133 Cannot Be Function

Hi,

I am using the Si1133 to measure the UV (Channel 0), large white (Channel 1) and IR (Channel 2). However, it was not work normally after the configuration were set. I found that the I2C register, Response 0, was not increase after the IRQ_enable command was sent and the read data from the parameter table was wrong. It should be something wrong, but I cannot aware.

The sequence for the configurations was shown below,
1. Reset si1133 : I2C format to send command 0x0B, then 0x01.
2. Delay 10ms
3. Read register Response 0
4. Reset: I2C format to send command 0x0B, then 0x01
5. Read register Response 0
6. Reset command register : I2C format to send command 0x0B, then 0x00.
7. Read register Response 0
8. Set ADCCONFIG0: I2C format to send command to HostIn0, 0x18, 0x0B, 0x82
9. Read register Response 0
10. Set ADSENS0: I2C format to send command to HostIn0, 0x01, 0x0B, 0x83
11.Read register Response 0
12. Set ADCPOST0: I2C format to send command to HostIn0, 0x40, 0x0B, 0x84
13. Read register Response 0
14. Set MEASCONFIG0: I2C format to send command to HostIn0, 0x40, 0x0B, 0x85
15. Read register Response 0
16. Set Channel list: I2C format to send command to HostIn0, 0x07, 0x0B, 0x81
17. Read register Response 0
18. Set measrate_h :I2C format to send command to HostIn0, 0x00, 0x0B, 0x9A
19. Read register Response 0
20. Set measrate_l : I2C format to send command to HostIn0, 0x7D, 0x0B, 0x9B
21. Read register Response 0
22. Set meascount0: I2C format to send command to HostIn0, 0x01, 0x0B, 0x9C
23. Read register Response 0
24.Reg_Irq_Enable: I2C format to send command 0x0F, 0x07
25. Read register Response 0
26. Start mode: I2C format to send command to 0x0B, 0x83

Thank you.
Posts: 97
Registered: ‎04-09-2015

Re: SI1133 Cannot Be Function

What do you mean by " I2C format to send command to HostIn0, 0x18, 0x0B, 0x82"? Is that an I2C write? Did you see RESPONSE0 increment after this command?

 

I've provided the function code for PARAM_WRITE and PARAM_READ in the attachment. Please follow that sequence for parameter register settings.

 

Regards,

Tony

Posts: 11
Registered: ‎08-31-2017

Re: SI1133 Cannot Be Function

Hi Tony,

 

Yes, I am using I2C write.

As I developed the code by using assembly language, so the command send out sequence is "S+Slave ID+0+(wait ack from si1133)+HostIn0 Address+(wait ack from si1133)+parameter value+(wait ack from si1133)+command address+"10"+6 bit address field for the parameter+n+stop".

 

So, the meaning for " I2C format to send command to HostIn0, 0x18, 0x0B, 0x82" is "S+Slave ID+0+(wait ack from si1133)+HostIn0 Address(0x0A)+(wait ack from si1133)+parameter value(0x18)+(wait ack from si1133)+command address+(0x0B)"10"+6 bit address field for the parameter(0x82)+n+stop".

 

I confirmed the RESPONSE0 had incremented after each command, however, I still got a wrong result from RESPONSE1 after read parameter.

 

Thank you.

 

Best regards,

Sungming

Posts: 97
Registered: ‎04-09-2015

Re: SI1133 Cannot Be Function

What is your parameter read sequence? Did you see RESPONSE0 register value increment after parameter read?

 

Regards,

Tony

Posts: 11
Registered: ‎08-31-2017

Re: SI1133 Cannot Be Function

My read sequence is

1. Read Response0 Robot Frustrated+SlaveID+0+(ack from si1133)+Response0 Address(0x11)+(ack from si1133)+Sr+SlaveID+1+(ack from si1133)+(Data - Response0)+N+Stop

2.Write parameter location to command : S+SlaveID+0+(ack from si1133)+Cmd Address(0x0B)+(ack from si1133)+channel list location(0x41)+(ack from si1133)+stop

3.Read Response0

4.Read Response1 Robot Frustrated+SlaveID+0+(ack from si1133)+Response0 Address(0x10)+(ack from si1133)+Sr+SlaveID+1+(ack from si1133)+(Data - Response1)+N+Stop

 

RESPONSE0 register value increased after point 1 and 3. However, the data from Response 1 is incorrect.

Posts: 8,134
Registered: ‎08-13-2003

Re: SI1133 Cannot Be Function

pins configured as open drain?

pullup resistor size?

distance between master and slave?

erik
Posts: 11
Registered: ‎08-31-2017

Re: SI1133 Cannot Be Function


erikm wrote:

pins configured as open drain? Yes, the pin for I2C SDA, SCL and INT were set to open drain

pullup resistor size? 5.1k ohm pull-up resistor for each pin

distance between master and slave? around 10mm, it is not too far away.


 

Posts: 97
Registered: ‎04-09-2015

Re: SI1133 Cannot Be Function

Hi Sungming,

 

I don't see anything wrong in your sequence reading RESPONSE0 and RESPONSE1 registers. If you set CHLIST to 0x01, what value did you get reading it back? What about our parameter registers?

 

Regards,

Tony

Posts: 11
Registered: ‎08-31-2017

Re: SI1133 Cannot Be Function

After I set Channel list to 0x01 and read the Response1, the value is 0x00.

 

Besides, I found that the read back data from Response0 showed the MCU state was in Sleep mode after each configuration command until the start command was sent out, then the state changed from Sleep to Running. Is it normal?

 

Thank you.

Posts: 97
Registered: ‎04-09-2015

Re: SI1133 Cannot Be Function

I'm not sure if the param write or param read is unsuccessful. Can you try to read ADCCONFIG0(0x02) register after reset? It should be default to 0x0F. If you fail to read 0x0F, can you try another part?

 

The sensor is in Sleep mode for the most of the time. It only wakes up to take measurements after the start command is issued. The duty cycle of the measurement depends on the configuration. Therefore, you may still see the sensor in Sleep mode after the start command.

 

Regards,

Tony

Posts: 11
Registered: ‎08-31-2017

Re: SI1133 Cannot Be Function

You are right, Tony. the param_write did not operate successful on my code, so the reading was wrong after I read the register, Response1. I found that the si1133 datasheet gave me a wrong direction. The correct para_write sequence should be "S+slave address+0+(ack from si1133)+hostIn0 address+(ack from si1133)+parameter value+(ack from si1133)+"10+parameter address"+(ack from si1133)+stop.

 

But, I still cannot read the data from HostOutx successfully. The si1133 sensor never sends out the interrupt signal to the MCU. And I try to read the register, IRQ_STATUS, it always keep the value on 0b00000101. I should be turn on the channel 0, 1 and 2, so the value must change after the data is ready, but it doesn't. I am so confuse.

 

Best regards,

Sungming

Posts: 97
Registered: ‎04-09-2015

Re: SI1133 Cannot Be Function

What's your configuration for Channel 1? Did you set IRQ_ENABLE register? Besides, please send us your schematic to review. Can you also probe the INT pin to check if it's ever pulled low?

 

Regards,

Tony

Posts: 11
Registered: ‎08-31-2017

Re: SI1133 Cannot Be Function

My configuration for Channel 1 is

  1. ADCCONFIG1 set to 0b00001101
  2. ADSENS1 set to 0b00000000
  3. ADCPOST1 set to 0b01001000
  4. MEASCONFIG1 set to 0b01000000

I set IRQ_ENABLE register to 0b00111111 after all configuration commands, but before the START_Mode command. So, I think the interrupt operation for all six channel should be turned on.

 

I found that the INT pin for the si1133 always pulled low, should I set it to high level after Reset command manually?

 

My schematic was attached. It is same as the si1133 datasheet Figure 3.1. The SDA, SCL and INT pin were connected to MCU I/O pins.

Posts: 97
Registered: ‎04-09-2015

Re: SI1133 Cannot Be Function

If the INT pin is configured as open-drain and your schematic is the same as the one in the datasheet, the INT pin should be high after power-up. Can you double check?

 

When the interrupt occurs, the INT pin will be pulled low and it's the host's responsibility to read the IRQ_STATUS register to clear the interrupt and de-assert the INT pin (back to high again).

 

Your channel 1 configuration looks fine. You can set CHLIST to 0x02 and see if you can receive interrupts.

 

Regards,

Tony

Posts: 11
Registered: ‎08-31-2017

Re: SI1133 Cannot Be Function

Now, I set the INT pin to high after power-up. However, the si1133 did not pull down the INT pin although I waited around 10 ms after I sent out the start command.

 

Regards,

Sungming

Posts: 97
Registered: ‎04-09-2015

Re: SI1133 Cannot Be Function

What do you mean by "set the INT pin to high"? Is the INT pin configured to open-drain or push-pull?'

 

Regards,

Tony

Posts: 11
Registered: ‎08-31-2017

Re: SI1133 Cannot Be Function

 
Posts: 11
Registered: ‎08-31-2017

Re: SI1133 Cannot Be Function

the INT pin configured to open-drain. My meaning for "set the INT pin to high" is point out that the INT pin is in high logic level after reset. Regards, Sungming
Posts: 97
Registered: ‎04-09-2015

Re: SI1133 Cannot Be Function

Can you read back IRQ_ENABLE register to see if it is set correctly?

 

It seems that you can read IRQ_STAUTS register to see the interrupt status, but couldn't receive the interrupt. If that's the case, then something is holding the INT pin high in your system.

 

Regards,

Tony

Posts: 11
Registered: ‎08-31-2017

Re: SI1133 Cannot Be Function

The value of the IRQ_Enable register was correct when I read it.

But, I tried to set the CHAN_LIST to 0b00000010, after that I read the value of IRE_STATUS register, it still kept to 0b00000101. It did not make sense. However, I cannot find out the reason and I am not sure the si1133 whether start to function or not.

Posts: 97
Registered: ‎04-09-2015

Re: SI1133 Cannot Be Function

Did you set MEASCOUNT for channel 1? Is the MEASCOUNT the same for all channels?

 

Alternatively, you can use the forced mode measurement instead of the autonomous mode. Please see if that works.

 

I'd like to close the thread here and if you have further questions, please create a support ticket in our technical support system.

 

Regards,

Tony