❐ 25 mA Sink on all GPIO
❐ Pull up, Pull down, High Z, Strong, or Open Drain Drive
Modes on all GPIO
❐ Up to 12 Analog Inputs on GPIO
❐ Four 30 mA Analog Outputs on GPIO
❐ Configurable Interrupt on all GPIO
■ Flexible On-Chip Memory
❐ 16K Flash Program Storage 50,000 Erase/Write Cycles
❐ 1K SRAM Data Storage
❐ In-System Serial Programming (ISSP)
❐ Partial Flash Updates
❐ Flexible Protection Modes
❐ EEPROM Emulation in Flash
■ Full-Speed USB (12 Mbps)
❐ Four Uni-Directional Endpoints
❐ One Bi-Directional Control Endpoint
❐ USB 2.0 Compliant
❐ Dedicated 256 Byte Buffer
❐ No External Crystal Required
Cypress Semiconductor Corporation•198 Champion Court•San Jose, CA 95134-1709•408-943-2600
Document Number: 001-13108 Rev. ** Revised June 13, 2007
Overview
Block Diagram
CY8CLED04
Port 7
s
u
B
m
e
t
s
y
Global Digital Interconnect
S
SRAM
1K
Interrupt
Controller
DIGITAL SYSTEM
Digital
Block
Array
Port 5 Port 4 Port 3 Port 2 Port 1 Port 0
Global Analog Interconnect
PSoC CORE
SROMFlash 16K
Sleep and
CPU Core (M8C)
Watchdog
Clock Sources
(Includes IMO and ILO)
ANALOG SYSTEM
Analog
Ref.
Analog
Block
Array
Analog
Drivers
Digital
Clocks
2
MACs
Decimator
Type 2
POR and LVD
I2CUSB
System Resets
Internal
Voltage
Ref.
Analog
Input
Muxing
SYSTEM RESOURCES
Document Number: 001-13108 Rev. **Page 2 of 33
CY8CLED04
EZ-Color Functional Overview
Cypress' EZ-Color family of devices offers the ideal control
solution for High Brightness LED applications requiring intelligent dimming control. EZ-Color devices combine the power and
flexibility of PSoC (Programmable System-on-Chip™); with
Cypress' PrISM (precise illumination signal modulation)
modulation technology providing lighting designers a fully
customizable and integrated lighting solution platform.
The EZ-Color family support up to 16 independent LED channels
with up to 32 bits of resolution per channel, enabling lighting
designers the flexibility to choose the LED array size and color
quality. PSoC Express software, with lighting specific drivers,
can significantly cut development time and simp lify implementation of fixed color points through temperature and LED binning
compensation. EZ-Color's virtually limitless analog and digital
customization allow for simple integration of features in addition
to intelligent lighting, such as CapSense, Battery Charging,
Image Stabilization, and Motor Control during the development
process. These features, along with Cypress' best-in-class
quality and design support, make EZ-Color the ideal choice for
intelligent HB LED control applications.
Target Applications
■ LCD Backlight
■ Large Signs
■ General Lighting
■ Architectural Lighting
■ Camera/Cell Phone Flash
■ Flashlights
The PSoC Core
The PSoC Core is a powerful engine that supports a rich feature
set. The core includes a CPU, memory , clocks, and configurable
GPIO (General Purpose IO).
The M8C CPU core is a powerful processor with speeds up to 68
MHz, providing a four MIPS 8-bit Harvard architecture microprocessor. The CPU utilizes an interrupt controller with up to 20
vectors, to simplify programming of real time embedded events.
Program execution is timed and protected using the included
Sleep and Watch Dog Timers (WDT).
Memory encompasses 16K of Flash for program storage, 1K of
SRAM for data storage, and up to 2K of EEPROM emulated
using the Flash. Program Flash utilizes four protection levels on
blocks of 64 bytes, allowing customized software IP protection.
The EZ-Color family incorporates flexible internal clock generators, including a 24 MHz IMO (internal main oscillator) accurate
to 8% over temperature and voltage. The 24 MHz IMO can also
be doubled to 48 MHz for use by the digital system. A low power
32 kHz ILO (internal low speed oscillator) is provided for the
Sleep timer and WDT. The clocks, together with programmable
clock dividers (as a System Resource), provide the flexibility to
integrate almost any timing requirement into the EZ-Color
device. In USB systems, the IMO will self-tune to ± 0.25%
accuracy for USB communication.
EZ-Color GPIOs provide connection to the CPU, digital and
analog resources of the device. Each pin’s drive mode may be
selected from eight options, allowing great flexibility in external
interfacing. Every pin also has the capability to generate a
system interrupt on high level, low level, and change from last
read.
The Digital System
The Digital System is composed of 4 digital PSoC blocks. Each
block is an 8-bit resource that can be used alone or combined
with other blocks to form 8, 16, 24, and 32-bit peripherals, which
are called user module references.
Digital peripheral configurations include those listed below.
■ PrISM (8 to 32 bit)
■ Full-Speed USB (12 Mbps)
■ PWMs (8 to 32 bit)
■ PWMs with Dead band (8 to 24 bit)
■ Counters (8 to 32 bit)
■ Timers (8 to 32 bit)
■ UART 8 bit with selectable parity
■ SPI master and slave
■ I2C slave and multi-master
■ Cyclical Redundancy Checker/Generator (8 to 32 bit)
■ IrDA
■ Generators (8 to 32 bit)
The digital blocks can be connected to any GPIO through a
series of global buses that can route any signal to any pin. The
buses also allow for signal multiplexing and for performing logic
operations. This configurability frees your designs from the
constraints of a fixed peripheral controller.
Digital blocks are provided in rows of four, where the number of
blocks varies by EZ-Color device family. This allows you the
optimum choice of system resources for your application. Family
resources are shown in the table titled EZ-Color Device Characteristics.
Document Number: 001-13108 Rev. **Page 3 of 33
CY8CLED04
Figure 1. Digital System Block Diagram
Port 2
Port 1
To Analog
System
4
4
GOE[7:0]
GOO[7:0]
Configuration
Port 0
Row Output
8
88
Port 7
D
Port 5
i
g
i
t
a
l
C
l
o
c
k
s
F
r
o
m
C
o
r
e
Port 3
Port 4
To System Bus
DIGITAL SYSTEM
Digital PSoC Block Array
8
DBB00 DBB01 DCB02 DCB03
Row Input
Configuration
GIE[7:0]
GIO[7:0]
Row 0
Global Digital
Interconnect
The Analog System
The Analog System is composed of 6 configurable blocks, each
comprised of an opamp circuit allowing the creation of complex
analog signal flows. Analog peripherals are very flexible and can
be customized to support specific application requirements.
Some of the more common EZ-Color analog functions (most
available as user modules) are listed below.
■ Analog-to-digital converters (up to 2, with 6- to 14-bit resolution,
selectable as Incremental, Delta Sigma, and SAR)
■ Filters (2 and 4 pole band-pass, low-pass, and notch)
■ Amplifiers (up to 2, with selectable gain to 48x)
■ Instrumentation amplifiers (1 with selectable gain to 93x)
■ Comparators (up to 2, with 16 selectable thresholds)
■ DACs (up to 2, with 6- to 9-bit resolution)
■ Multiplying DACs (up to 2, with 6- to 9-bit resolution)
■ High current output drivers (two with 30 mA drive as a PSoC
Core Resource)
■ 1.3V reference (as a System Resource)
■ DTMF Dialer
■ Modulators
■ Correlators
■ Peak Detectors
■ Many other topologies possible
Analog blocks are arranged in a column of three, which includes
one CT (Continuous Time) and two SC (Switched Capacitor)
blocks, as shown in the figure below.
Figure 2. Analog System Block Diagram
All IO
(Except Port 7)
P0[7]
P0[5]
P0[3]
P0[1]
P2[3]
P2[1]
Interface to
Digital System
ACI0[1:0]
Array Input
Configura tio n
Block
Array
M8C Interface (Address Bus, Data Bus, Etc.)
ACB00ACB01
ASC10
ASD20
RefHi
RefLo
AGND
Analog
Mux Bus
RefIn
AGNDIn
ACI1[1:0]
ASD11
ASC21
Analog Reference
Reference
Generators
P0[6]
P0[4]
P0[2]
P0[0]
P2[6]
P2[4]
P2[2]
P2[0]
AGNDIn
RefIn
Bandgap
Document Number: 001-13108 Rev. **Page 4 of 33
CY8CLED04
The Analog Multiplexer System
The Analog Mux Bus can connect to every GPIO pin in ports 0-5.
Pins can be connected to the bus individually or in any combination. The bus also connects to the analog system for analysis
with comparators and analog-t o-digit al converters. It ca n be split
into two sections for simultaneous dual-channel processing. An
additional 8:1 analog input multiplexer provides a second path to
bring Port 0 pins to the analog array.
Switch control logic enables selected pins to precharge continuously under hardware control. This enables capacitive
measurement for applications such as touch sensing. Other
multiplexer applications include:
■ Track pad, finger sensing.
■ Chip-wide mux that allows analog input from up to 48 IO pins.
■ Crosspoint connection between any IO pin combinatio ns.
When designing capacitive sensing applications, refer to the
latest signal-to-noise signal level requirements Application
Notes, which can be found under http://www.cypress.com >>
DESIGN RESOURCES >> Application Notes. In general, and
unless otherwise noted in the relevant Application Notes, the
minimum signal-to-noise ratio (SNR) for CapSense applications
is 5:1.
Additional System Resources
System Resources, provide additional capability useful to
complete systems. Additional resources include a multiplier,
decimator, low voltage detection, and power on reset. Brief statements describing the merits of each resource follow.
■ Full-Speed USB (12 Mbps) with 5 configurable endpoints and
256 bytes of RAM. No external components required except
two series resistors. Wider than commercial temperature USB
operation (-10°C to +85°C).
■ Digital clock dividers provide three customizable clock
frequencies for use in applications. The clocks can be routed
to both the digital and analog systems. Additional clocks can
be generated using digital PSoC blocks as clock dividers.
■ Two multiply accumulates (MACs) provide fast 8-bit multipliers
with 32-bit accumulate, to assist in both general math as well
as digital filters.
■ Decimator provides a custom hardware filter for digital signal
processing apps. including creation of Delta Sigma ADCs.
■ The I2C module provides 100 and 400 kHz communication over
two wires. Slave, master, multi-master are supported.
■ Low Voltage Detection (LVD) interrupts signal the application
of falling voltage levels, while the advanced POR (Power On
Reset) circuit eliminates the need for a system supervisor.
■ An internal 1.3V reference provides an absolute reference for
the analog system, including ADCs and DACs.
■ Versatile analog multiplexer system.
EZ-Color Device Characteristics
Depending on your EZ-Color device characteristics, the digital and analog systems can have 16, 8, or 4 digital blocks and 12, 6, or 4
analog blocks. The following table lists the resources available for specific EZ-Color device groups. The device covered by this data
sheet is shown in the highlighted row of the table
Table 1. EZ-Color Device Characteristics
PSoC Part
Number
CY8CLED0445614482261K16KYes
CY8CLED0884428124412256 Bytes16KNo
CY8CLED1616
LED
Channels
IO
Digital
644161244122K32KNo
Rows
Digital
Digital
Blocks
Analog
Inputs
Analog
Analog
Outputs
Columns
Analog
Blocks
Size
SRAM
Flash
Size
CapSense
Document Number: 001-13108 Rev. **Page 5 of 33
CY8CLED04
Getting Started
The quickest path to understanding the EZ-Color silicon is by
reading this data sheet and using the PSoC Express Integrated
Development Environment (IDE). This data sheet is an overview
of the EZ-Color integrated circuit and presents specific pin,
register, and electrical specifications.
For up-to-date Ordering, Packaging, and Electrical Specification
information, reference the latest device data sheets on the web
at http://www.cypress.com/ez-color.
Development Kits
Development Kits are available from the following distributors:
Digi-Key, Avnet, Arrow, and Future. The Cypress Online Store
contains development kits, C compilers, and all accessories for
PSoC development. Go to the Cypress Online Store web site at
http://www.cypress.com, click the Online Store shopping cart
icon at the bottom of the web page, and click EZ-Color to view
a current list of available items.
Technical Training Modules
Free PSoC technical training modules are available for users
new to PSoC. Training modules cover designing, debugging,
advanced analog and CapSense. Go to
http://www.cypress.com/techtrain.
Development Tools
PSoC Express is a high-level design tool for creating embedded
systems using Cypress's PSoC mixed-signal technology. With
PSoC Express you create a complete embedded solution
including all necessary on-chip peripherals, block configuratio n,
interrupt handling and application software without writing a
single line of assembly or C code.
PSoC Express solves design problems the way you think about
the system:
■ Select input and output devices based upon system require-
ments.
■ Add a communications interface and define its interface to
system (using registers).
■ Define when and how an output device changes state based
upon any and all other system devices.
Based upon the design, automatically select one or more PSoC
Mixed-Signal Controllers that match system requirements.
Figure 3. PSoC Express
Consultants
Certified PSoC Consultants offer everything from technical
assistance to completed PSoC designs. T o contact or become a
PSoC Consultant go to http://www.cypress.com, click on Design
Support located on the left side of the web page, and select
CYPros Consultants.
Technical Support
PSoC application engineers take pride in fast and accurate
response. They can be reached with a 4-hour guaranteed
response at http://www.cypress.com/support/login.cfm.
Application Notes
A long list of application notes will assist you in every aspect of
your design effort. To view the PSoC application notes, go to the
http://www.cypress.com web site and select Application Notes
under the Design Resources list located in the center of the web
page. Application notes are listed by date as default.
PSoC Express Subsystems
Express Editor
The Express Editor allows you to create designs visually by
dragging and dropping inputs, outputs, communication interfaces, and other design elements, and then describing the logic
that controls them.
Project Manager
The Project Manager allows you to work with your applications
and projects in PSoC Express. A PSoC Express application is a
top level container for projects and their associated files. Each
project contains a design that uses a single PSoC device. An
application can contain multiple projects so if you are creating an
application that uses multiple PSoC devices you can keep all of
the projects together in a single application.
Most of the files associated with a project are automatically
generated by PSoC Express during the build process, but you
can make changes directly to the custom.c and custom.h files
Document Number: 001-13108 Rev. **Page 6 of 33
CY8CLED04
and also add your own custom code to the project in the Project
Manager.
Application Editor
The Application Editor allows you to edit custom.c and custom.h
as well as any C or assembly language source code that you add
to your project. With PSoC Express you can create application
software without writing a single line of assembly or C code, but
you have a full featured application editor at your finger tips if you
want it.
Build Manager
The Build Manager gives you the ability to build the application
software, assign pins, and generate the data sheet, schematic,
and BOM for your project.
Board Monitor
The Board Monitor is a debugging tool designed to be used
while attached to a prototype board through a communication
interface that allows you to monitor changes in the various
design elements in real time.
2
The default communication for the board monitor is I
2
the CY3240-I2USB I
C to USB Bridge Debugging/Communica-
C. It uses
tion Kit.
Tuners
A Tuner is a visual interface for the Board Monitor that allows you
to view the performance of the HB LED drivers on your test board
while your program is running, and manually override values and
see the results.
Hardware Tools
In-Circuit Emulator
A low cost, high functionality ICE (In-Circuit Emulator) is
available for development support. This hardware has the
capability to program single devices.
The emulator consists of a base unit that connects to the PC by
way of a USB port. The base unit is universal and will operate
with all PSoC devices. Emulation pods for each device family are
available separately. The emulation pod takes the place of the
PSoC device in the target board and performs full speed (24
MHz) operation.
Document Conventions
Units of Measure
A units of measure table is located in the Electrical Specifications
section. Table6 on page 12 lists all the abbreviations used to
measure the PSoC devices.
Numeric Naming
Hexidecimal numbers are represented with all letters in
uppercase with an appended lowercase ‘h’ (for example, ‘14h’ or
‘3Ah’). Hexidecimal numbers may also be represented by a ‘0x’
prefix, the C coding convention. Binary numbers have an
appended lowercase ‘b’ (e.g., 01010100b’ or ‘01000011b’).
Numbers not indicated by an ‘h’ or ‘b’ are decimal.
Acronyms Used
The following table lists the acronyms that are used in this
document.
Table 2. Acronyms
AcronymDescription
ACalternating current
ADCanalog-to-digital converter
APIapplication programming interface
CPUcentral processing unit
CTcontinuous time
DACdigital-to-analog converter
DCdirect current
ECOexternal crystal oscillator
EEPROMelectrically erasable programmable read-only memory
FSRfull scale range
GPIOgeneral purpose IO
GUIgraphical user interface
HBMhuman body model
ICEin-circuit emulator
ILOinternal low speed oscillator
IMOinternal main oscillator
IOinput/output
IPORimprecise power on reset
LSbleast-significant bit
LVDlow voltage detect
MSbmost-significant bit
PCprogram counter
PLLphase-locked loop
PORpower on reset
PPORprecision power on reset
PSoC®Programmable System-on-Chip™
PWMpulse width modulator
SCswitched capacitor
SRAMstatic random access memory
Document Number: 001-13108 Rev. **Page 7 of 33
CY8CLED04
Pin Information
68-Pin Part Pinout
This Section describes, lists, and illustrates the CY8CLED04 EZ-Color device pins and pinout configuration. The CY8CLED04 device
is available in the following package. Every port pin (labeled with a “P”) is capable of Digital IO. However, Vss, Vdd, and XRES are
not capable of Digital IO.
10IOMP3[3]
11IOMP3[1]
12IOMP5[7]
13IOMP5[5]
14IOMP5[3]
15IOMP5[1]
16IOMP1[7]I2C Serial Clock (SCL).
17IOMP1[5]I2C Serial Data (SDA).
18IOMP1[3]
19IOMP1[1]I2C Serial Clock (SCL) ISSP SCLK*.
20PowerVssGround connection.
21USBD+
22USBD23PowerVddSupply voltage.
24IOP7[7]
25IOP7[6]
26IOP7[5]
27IOP7[4]
28IOP7[3]
29IOP7[2]
30IOP7[1]Digital Analog
31IOP7[0]50IOMP4[6]
32IOMP1[0]I2C Serial Data (SDA), ISSP SDATA*. 51IOI,MP2[0] Direct switched capacitor block input.
33IOMP1[2]52IOI,MP2[2] Direct switched capacitor block input.
34IOMP1[4]Optional External Clock Input (EXT-
35IOMP1[6]54IOMP2[6] External Voltage Reference (VREF) input.
36IOMP5[0]55IOI,MP0[0] Analog column mux input.
37IOMP5[2]56IOI,MP0[2] Analog column mux input and column output.
38IOMP5[4]57IOI,MP0[4] Analog column mux input and column output.
39IOMP5[6]58IOI,MP0[6] Analog column mux input.
40IOMP3[0]59PowerVddSupply voltage.
41IOMP3[2]60PowerVssGround connection.
42IOMP3[4]61IOI,MP0[7] Analog column mux input, integration input #1
43IOMP3[6]62IOIO,M P0[5] Analog column mux input and column output, integra-
44
45
46
Type
Digital Analog
NameDescription
CLK).
NCNo connection.63IOIO,M P0[3] Analog column mux input and column output.
NCNo connection.64IOI,MP0[1] Analog column mux input.
InputXRES Active high pin reset with internal pull
down.
68-Pin Device
P2[1], M, AI
P2[3], M, AI
P2[5], M
P2[7], M
P0[1], M, AI
P0[3], M, AIO
P0[5], M, AIO
P0[7], M, AI
Vss
Vdd
P0[6], M, AI
P0[4], M, AI
P0[2], M, AI
P0[0], M, AI
P2[6], M, Ext. VREF
P2[4], M, Ext. AGND
P2[2], M, AI
676665646362616059585756555453
68
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
1819202122232425262728293031323334
Vss
M, P1[3]
I2C SCL, M, P1[1]
D +
D -
Vdd
QFN
(Top View)
P7[7]
P7[5]
P7[6]
P7[4]
P7[3]
P7[2]
P7[1]
NameDescription
I2C SCL, M, P1 [7 ]
I2C SDA, M, P1 [5 ]
Pin
No.
M, P4[7]
M, P4[5]
M, P4[3]
M, P4[1]
M, P3[7]
M, P3[5]
M, P3[3]
M, P3[1]
M, P5[7]
M, P5[5]
M, P5[3]
M, P5[1]
Type
NC
NC
Vss
53IOMP2[4] External Analog Ground (AGND) input.
tion input #2.
65IOMP2[7]
52
P7[0]
M, P1[2]
M, P1[4]
I2C SDA, M, P1[0]
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
P2[0], M, AI
P4[6], M
P4[4], M
P4[2], M
P4[0], M
XRES
NC
NC
P3[6], M
P3[4], M
P3[2], M
P3[0], M
P5[6], M
P5[4], M
P5[2], M
P5[0], M
P1[6], M
Document Number: 001-13108 Rev. **Page 8 of 33
CY8CLED04
Table 3. 68-Pin Part Pinout (QFN**) (continued)
47IOMP4[0]66IOMP2[5]
48IOMP4[2]67IOI,MP2[3] Direct switched capacitor block input.
49
IOMP4[4]68IOI,MP2[1] Direct switched capacitor block input.
LEGENDA = Analog, I = Input, O = Output, NC = No Connection, M = Analog Mux Input.
* These are the ISSP pins, which are not High Z at POR.
** The center pad on the QFN package should be connected to ground (Vss) for best mechanical, thermal, and electrical performance. If not connected to
ground, it should be electrically floated and not connected to any other signal.
Register Conventions
This section lists the registers of the CY8CLED04 EZ-Color device.
Abbreviations Used
The register conventions specific to this section are listed in the following table.
ConventionDescription
RRead register or bit(s)
WWrite register or bit(s)
LLogical register or bit(s)
CClearable register or bit(s)
#Access is bit specific
Register Mapping Tables
The device has a total register address space of 512 bytes. The register space is referred to as IO space and is divided into two banks.
The XOI bit in the Flag register (CPU_F) determines which bank the user is currently in. When the XOI bit is set the user is in Bank 1.
Note In the following register mapping tables, blank fields are Reserved and should not be accessed.
PRT0DM0
PRT0DM1
PRT0IC0
PRT0IC1
PRT1DM0
PRT1DM1
PRT1IC0
PRT1IC1
PRT2DM0
PRT2DM1
PRT2IC0
PRT2IC1
PRT3DM0
PRT3DM1
PRT3IC0
PRT3IC1
PRT4DM0
PRT4DM1
PRT4IC0
PRT4IC1
PRT5DM0
Blank fields are Reserved an d should not be accessed.# Access is bit specific.