Microchip Technology AC164127-9 Data Sheet

Page of 34
 2011 Microchip Technology Inc.
DS01368A-page 1
AN1368
INTRODUCTION
Graphic-enabled devices are used extensively in daily
life. They are found everywhere, including indoor
products, such as telephones, calculators, pagers, MP3
players, digital electric meters, smart remote and UPS
displays. They are also used in outdoor products, such
as traffic signals, taxi meters, bus displays, advertise-
ment boards, etc. The list is virtually endless. A current
trend is that many existing devices are becoming
graphic-enabled because it is economically feasible,
easy to use and the latest in technology.
This application note is intended to help engineers who
are designing their first graphic application. It describes
the basic definitions and jargons of graphics applications
and it helps the engineer to understand the theory,
necessary decision factors, hardware considerations,
available microcontrollers and development tools. Soft-
ware libraries and support are available from Microchip
with further literature references for advanced users.
BASICS OF COLOR SCIENCE
In its purest form, color is associated with the
wavelength of light, within human visible range, from
about 400 nm (Violet) to 700 nm (Red), with Yellow
centered at about 575 nm. That means, if a light of
575 nm wavelength is incident on human eyes, it is
perceived as a Yellow light. We have also learned that
colors can be derived from three basic colors: Red,
Blue and Green. For example, Yellow can be derived
by mixing Red and Green lights. Is this true? The
answer is both no and yes. It is no because mixing Red
and Green lights will constitute a mixture of lights with
wavelengths of 700 nm and 560 nm, and there is not a
wavelength representing Yellow. The answer is yes
because human eyes perceive this mixture as a Yellow
colored light. Therefore, we see the mixture of Red and
Green lights as a single Yellow light, as shown in
. This is due to the color recognition properties
of the human eye. 
FIGURE 1:
RED + GREEN = YELLOW
Human eyes perceive the light as a Yellow colored light
instead of separate Red and Green colored lights. This
color recognition property of the human eye is the
foundation of the RGB (Red, Green and Blue) model.
The model states that the human eye can be made to
perceive different colors by mixing appropriate
proportions (intensities) of Red, Blue and Green colors.
Therefore, a ‘colored’ light can be formed by mixing
different proportions of Red, Green and Blue colors. 
• Mixing the same proportions of three RGB colors 
gives a Gray color
• Mixing a zero amount of all RGB colors gives a 
Black color
• Mixing a maximum amount of all RGB colors 
gives a White color 
Varying the intensity of light, while keeping the same
proportion of RGB, gives different shades of Gray,
which is also known as ‘Grayscale’. Using a single
color (a fixed proportion of RGB) throughout an appli-
cation gives a ‘Monochrome’ application, meaning a
single color.
Since everything is represented in bits and bytes in a
digital system,
 
then how can actual colors be repre-
sented as a number in the form of bits or bytes? Each
of these three basic colors (RGB) can represent a byte
for a number ranging from 0 to 255. Therefore, with
3 bytes, we can represent 16 million colors (2
24
) and
this is termed as “True Color”. It is also common to use
16 bits to represent colors. With 16 bits, we can
represent 64K colors (2
16
), which is sufficient for many
graphics applications. 
Author:
Pradeep Budagutta
Microchip Technology Inc.
Developing Embedded Graphics Applications using PIC
® 
Microcontrollers with Integrated Graphics Controller