![Show Menu](styles/mobile-menu.png)
![Page Background](./../common/page-substrates/page0041.png)
the LCC graphics board must be set
for this configuration. In this setup,
all colour is 16BPP and the external
SRAM contains the graphics frame
that is continuously being read. For
16BPP colour, a 565 RGB format is
used with five colour values for red,
six for green and five for blue.
In both methods, when connecting
to an LCD panel with more than 16
colour lines, the unused colour lines
are tied to the most significant bits
of the last colour bit being used.
This ensures that a full colour scale
from white to black can be achieved.
Conclusion
This article has shown how a
low-cost controllerless graphics
system can be implemented with
microcontroller peripherals to
create a virtual graphics controller
using only a small amount of CPU
time.
Fig. 3: PIC32 microcontroller LCC graphics flowchart
the frame is being updated. This is
necessary because there is only one
PMP peripheral and it is being shared
by the virtual graphics controller or
DMA transfer. This method does
affect the refresh rate of the screen.
The amount of pixel updates needs
to be monitored to prevent too large
a refresh rate change, otherwise
the change will be perceptible by
the human eye. This is done by
using a pixel count variable within
the virtual graphics controller that
is updated on every pixel write and
cleared during every DMA interrupt.
With the introduction of the EBI
peripheral, the suspension time
needed for a frame update is
dramatically reduced. When the EBI
is used for writing, less data need
to be stored and restored since the
PMP registers are no longer being
shared for reading and writing. Also,
the EBI module is a more efficient
peripheral when communicating to
external SRAM.
Software
The internal SRAM method uses the
write strobe of the PMP for the pixel
clock. Jumper rows one and two on
the LCC graphics board must be set
for this configuration. In this setup,
all colour is 8BPP and no external
SRAM is used. SRAM from inside the
MCU is continuously writing its pixel
values to the PMP.
For 8BPP colour, a 332 RGB colour
format is used, that is three colour
values for red, three for green and
two for blue. This is a common
colour format, because red is an
easier colour for the human eye to
detect than blue.
The external SRAM method uses the
read strobe of the PMP for the pixel
clock. Jumper rows two and three on
New-Tech Magazine Europe l 41