compare them, and “detect”
something via reflectance is
something left to the reader.)
With the idea of just trying to
test the I2C interface and get a
verifiable measurement, I set out
to read a temperature value from
the Si7020. The steps encoded in
the ROM are as follows:
1. Read User Register 1. (Bit 7
and bit 0 show temperature
measurement resolution. Expect 0
and 0 for a 14-bit resolution
2. Read temperature value
with no SCLK hold by the Si7020 x
2 (retries enabled).
3. Read temperature value
with SCLK hold by the Si7020 enabled x 2 (retries disabled).
These operations are written in the ROM
(i2c_setup_rom.v) at address
0x00-0x04. At the top level,
address pointers to the
beginning and end of the
micro-code are set up so that
when BTN1 (“INIT” signal) on
the board is pressed, the I2C
commands will execute.
(SELECT_1145 must be set to
off; SW0 towards the edge of
The commands as they
appear in the ROM are shown
in Figure 7.
Using the setup shown in
Figure 8, I made some
temperature measurements to
confirm that the I2C interface
code and Si7020 were working.
In the debug ILA windows,
I set up the trigger so that I would capture the result of the
first “no hold” temperature measurement
(MSR_TEMP_NHOLD operation at address 0x01 in the
Figure 9. Temperature sense data waveform.
Figure 8. PMOD sensor setup for temperature measurements.
Figure 7. I2C commands encoded in
SERVO 10.2017 57