CY3270 PSoC® FirstTouch™ Kit Guide, Document No. 001-15945 Rev. *D
59
Code Examples
5.4.2
Firmware Architecture
5.4.2.1
Flowchart
5.4.2.2
Verify Output
■
The red LED is ON only if the temperature is between 28 °C and 55 °C
■
The green LED is ON only if the temperature is between 16 °C and 28 °C
■
The blue LED is ON only if the temperature is between 16 °C and –10 °C"
Start
If temperature
is between
-10 C to 16 C
Enable Global Interrupts
Turn ON Blue
LED
Turn ON Red
LED
Turn ON Green
LED
Initialize ADC, LED, EzI2Cs
Module
If temperature is
between 16 C to
28 C
If temperature
is between
28 C to 55 C
Update EzI2Cs Registers
Convert ADC Value to
Temperature Value
No
No
Yes
Yes
Yes
No
Get ADC Value