- About
- Brief information about Pmod COLOR (and TCS3472)
- Interface Description
- Test
- Status Information
- Issues
- Possible Future Improvements
- Licence
Simple interface for the Digilent Pmod COLOR or any other TCS3472. This interface uses modified version of my I²C module.
The Digilent Pmod COLOR contains AMS TCS3472, a color sensor with IR blocking filter. Module communicates with the host board via I²C bus, and has the address of 0x29. Module measures red, green, blue and clear light with 16 bit precision and has adjustable gain.
Module colorlite
provides a simple interface for TCS3472 with basic functionality. Module colorlite
reads red, green and blue data, however not the clear one. Module does not do any calculations on the gathered data, and outputs raw data.
Port | Type | Width | Description |
---|---|---|---|
clk |
I | 1 | System Clock |
rst |
I | 1 | System Reset |
i2c_clk |
I | 1 | I²C Clock Source (Max. 800 kHz) |
SCL |
O | 1 | I²C Clock (Max. 400 kHz) |
SDA |
IO | 1 | I²C Data |
LEDenable |
O | 1 | Enable sensor LED for reflective measurement |
measure |
I | 1 | Get RGB data, keep high for getting continuously |
enable |
I | 1 | Low: Put sensor in sleep mode, High: Put sensor in RGBC mode |
gain |
I | 2 | Gain setting (Updates automatically when changed) |
reflectiveMode |
I | 1 | Reflective measurement mode, enables LED when measuring |
red |
O | 16 | Red data |
green |
O | 16 | Green data |
blue |
O | 16 | Blue data |
ready |
O | 1 | Ready for a new measurement |
I: Input O: Output
(Synthesized) Utilization of colorlite
on Artix 7:
- Slice LUTs: 57 (as Logic)
- Slice Registers: 136 (as Flip Flop)
Module clockGen_i2c
can be used to generate I²C clock source, i2c_clk
, with 781.25 kHz frequency. Whit this module, I²C clock will have 390.62 kHz frequency. This module requires 100 MHz clk
to generate right frequencies.
Port | Type | Width | Description |
---|---|---|---|
clk |
I | 1 | Input Clock |
rst |
I | 1 | System Reset |
i2c_clk |
O | 1 | Output Clock |
I: Input O: Output
(Synthesized) Utilization of clockGen_i2c
on Artix 7:
- Slice LUTs: 7 (as Logic)
- Slice Registers: 7 (as Flip Flop)
colorlite
Module:
Module colorlite
tested with color_test.v and Arty-A7-100-0.xdc. Two colorlite
modules are used; one connected to a Digilent Pmod COLOR other to a Adafruit TCS34725 Color Sensor. Outer RGB LEDs connected to Pmod inners connected to Adafruit sensor. Switch 0 used to enable/disable sensor (by putting it into sleep mode). Switches 2 and 1 are connected to gain
ports. Switch 3 is connected to reflectiveMode
. I²C signals and MSByte of RGB data registers (red
, green
, blue
) are monitored with Digilent Digital Discovery.
Last Test: 21 January 2021, on Digilent Arty A7.
- Nothing for now
- Full module that enables more features, such as interrupts
- Some processing over color data to make it more accurate
CERN Open Hardware Licence Version 2 - Weakly Reciprocal