4D systems Picaso MD1 User manual

USERS MANUAL
µVGAPICASO MD1
Tiny VGA Graphics Controller
QVGA, VGA, SVGA
Revision 1.2
4D Systems

www.4dsystems.com.au
µVGA-PICASO-MD1
2
PROPRIETORY INFORMATION
The information contained in this document is the property of 4D Systems Pty. Ltd., and may
be the subject of patents pending or granted, and must not be copied or disclosed with out
prior written permission. It should not be used for commercial purposes without prior
agreement in writing.
4D Systems Pty. Ltd. Endeavours to ensure that the information in this document is correct
and fairly stated but does not accept liability for any error or omission. The development of
4D Systems products and services is continuous and published information may not be up
to date. It is important to check the current position with 4D Systems.
Contact details are available from the company web site at www.4dsystems.com.au
All trademarks recognised and acknowledged.
Copyright 4D Systems Pty. Ltd. 2000-2007
DISCLAIMER OF WARRANTIES & LIMITATION OF LIABILITY
4D Systems Pty. Ltd. makes no warranty, either express or implied with respect to any
product, and specifically disclaims all other warranties, including, without limitation,
warranties for merchantability, non-infringement and fitness for any particular purpose. 4d
systems' sole obligation and liability for product defects shall be, at 4d systems' option, to
replace such defective product or refund to buyer the amount paid by buyer therefore. In no
event shall 4D Systems' liability exceed the buyer's purchase price.
The foregoing remedy shall be subject to buyer's written notification of defect and return of
the defective product within ninety (90) days of purchase. The foregoing remedy does not
apply to products that have been subjected to misuse (including without limitation static
discharge), neglect, accident or modification, or to products that have been soldered or
altered during assembly, or are otherwise not capable of being tested, or if damage occurs
as a result of the failure of buyer to follow specific instructions.
In no event shall 4D Systems be liable to the buyer or to any third party for any indirect,
incidental, special, consequential, punitive or exemplary damages (including without
limitation lost profits, lost savings, or loss of business opportunity) arising out of or relating to
any product or service provided or to be provided by 4D Systems, or the use or inability to
use the same, even if 4D Systems has been advised of the possibility of such damages.

www.4dsystems.com.au
µVGA-PICASO-MD1
3
Table of contents
1. Introduction 4
2.Features 5
3.PinDescription 6
4.ReferenceDesigns 7
5. Personality Module Micro Code (PmmC) 9
6. Graphics Command Set (Serial) 10
6.1 General Command Set 11
7. Serial Interface (TTL Level) 39
8. Using the µVGA-PICASOMD1-UB 40
9.USBInterface 41
10.Specifications 42
11.MechanicalDetails 43
12.ColourOrganisation 44
13.Power-UpReset 45
14.RelatedProducts 46
15.Appendix 47
15.1 Help and Other Information 47

www.4dsystems.com.au
µVGA-PICASO-MD1
4
1Introduction
The µVGA-PICASO-MD1 is a compact & cost effective ready to go 'drop in' embedded
graphics engine that will deliver ‘stand-alone’ functionality to your project. The ‘simple to
use’ embedded commands not only control background colour but can produce text in a
variety of sizes as well as draw shapes (which can include user definable bitmapped
characters such as logos) in 256 colours whilst freeing up the host processor from the
‘processor hungry ‘ screen control functions. This means a simple micro-controller with a
standard serial interface can drive the module with total ease. For USB operation simply add
a µUSB interface controller.
Figures below show some of the graphics capability of the µVGA-PICASO-MD1.

www.4dsystems.com.au
µVGA-PICASO-MD1
5
2Features
The µVGA-PICASO-MD1 module is aimed at being integrated into a variety of different
applications using a wealth of features designed to facilitate the designer to quickly and
cost effectively complete a product and thus reduce ‘time to market’. These features are as
follows:
Intelligent and fully integrated VGA/SVGA Display Graphics Controller.
Tiny 28 pin module, powered by the 4D LABS PICASO chip. A powerful DSP/Controller
based multi purpose graphics engine.
Low Power design. 3.0Volts to 3.6Volts input supply @90ma.
256 Colours with standard resolution modes for QVGA (320x240), VGA (640x480) and
SVGA (800x600, to be implemented in the near future). The µVGA-PICASO-MD1
supports multiple resolutions with in the same module. Resolutions are selectable during
run time under host control. Resizable viewing window allows partial/full screen control.
The digital video signals, RED0:RED2, GREEN0:GREEN2, BLUE1:BLUE2, HSYNC, VSYNC
and BLANK(R,G,B), facilitate using a simple Resistor-DAC to drive any standard VGA
monitor.
512K bytes of onboard SRAM for video memory allows 8 pages for QVGA, 2 pages for
VGA and 1 page for SVGA resolutions. Utilising the multiple pages allows double
buffering which can be used for smooth animations and windowing of menu systems.
RX and TX signals (TTL levels) provide a simple serial host interface. The serial interface
allow the µVGA-PICASO-MD1 graphics module to be connected to any host controller
such as a PIC, AVR, STAMP, ARM, Propeller just to name a few as well as a PC. The host
controls the module by sending simple serial commands. Auto baud rate detection from
2400 baud to 1Mbit/sec.
Powerful, easy to use and understand built in graphics functions allow drawing of lines,
rectangles, circles, ellipses, text, images, icons, user defined bitmaps and much more…
SPI signals (SDI, SDO, SCK) allow the module to be connected to a number of SD and
MMC memory cards (from 64Mb up to 4Gb) that can store images, icons, and other
graphics objects.
Future upgrades and enhancements are easily achieved by uploading PmmC
(Personality module micro Code) files. PmmC files allow the PICASO chip to be
uploaded with the latest micro-Code firmware.
System designers can incorporate the µVGA-PICASO-MD1 module directly into their
application, saving space and cost. Reference designs enable the user to create a
platform to incorporate the µVGA-PICASO easily.
NOTE: Usable resolutions are; QVGA: 310x210, VGA: 620x420 and SVGA: 800x560. These
resolutions are chosen to maximise the number of display pages from the video RAM.

www.4dsystems.com.au
µVGA-PICASO-MD1
6
3Pin Description
PIN FUNCTION DESCRIPTION
7, 21 VCC Regulated 3.3 Volts Supply Input @90mA average, max. 150ma
8, 15, 20 GND Ground
28 RESET Module Hardware Reset. Active Low signal > 20us will reset the module
14 I/O1 General purpose Input/Output 1
1 I/O3 General purpose Input/Output 3
24 (SCK) I/O6 General purpose Input/Output 6. Also used as the Clock signal for external SD/MMC
memory card interface in SPI mode.
25 (SDI) I/O5 General purpose Input/Output 5. Also used as the Data In signal for external
SD/MMC memory card interface in SPI mode.
26 (SDO) I/O4 General purpose Input/Output4. Also used as the Data Out signal for external
SD/MMC memory card interface in SPI mode.
27 (CS_FLASH) I/O2 General purpose Input/Output 2. Also used as the Chip Select signal for external
SD/MMC memory card SPI interface.
16 PGMRX Serial Receive Pin
17 PGMTX Serial Transmit Pin
Serial interface for host processor commands. Also used
for uploading PmmC files into the PICASO module from
the PC for future upgrades.
2 VSYNC VGA Vertical Synchronisation Output.
3 HSYNC VGA Horizontal Synchronisation Output.
4 BLANK_G GREEN Display Enable blanking signal.
5 BLANK_R RED Display Enable blanking signal.
6 BLANK_B BLUE Display Enable blanking signal.
These form the VGA Control signals.
Connect these along with the Pixel Data
Bus signals to an external Video DAC.
18 RED0 RED intensity bit 0
19 RED1 RED intensity bit 1
22 RED2 RED intensity bit 2
23 GREEN0 GREEN intensity bit 0
12 GREEN1 GREEN intensity bit 1
11 GREEN2 GREEN intensity bit 2
10 BLUE0 BLUE intensity bit 1
9 BLUE1 BLUE intensity bit 2
These signals combined form the 8 bit
256 colour Pixel Data bus. Connect
these along with the VGA Control signals
to an external Video DAC.
13 RUN/DEMO Internal Demo Mode when Active Low on Power-Up if the module is running the
Serial Command platform. Also runs 4DGL user programs from power-up if the
module is running 4DGL platform.

www.4dsystems.com.au
µVGA-PICASO-MD1
7
4Reference Designs
The following reference design show how easily the µVGA-PICASO-MD1 module can be
integrated into a wide range of applications with very simple circuitry. Please check the
following link for updated information as it becomes available. This is available from 4D as a
standard option also for general purpose use and testing.
www.4dsystems.com.au/downloads/micro-VGA/uVGA-PICASO-MD1/Reference-Designs/
Example: A General Purpose platform
f
or the µ
V
GA-PICASO-MD1 module

www.4dsystems.com.au
µVGA-PICASO-MD1
8

www.4dsystems.com.au
µVGA-PICASO-MD1
9
5Personality Module Micro Code (PmmC)
One of the important features of the µVGA-PICASO module is the ability to upload its
onboard PICASO processor with a micro-Code firmware which allows the module to take
on a new personality. This is referred to as Personality Module Micro Code (PmmC). The
benefits of this are as follows:
•Allows the module to be easily upgraded by the user at any time with specific PmmC
files as further enhancements are made in the future. This allows the user to benefit
from those latest features.
•Allows the user to upload a new Operating System for example to change the device
from a serial command driven platform into a high level language platform such as
4DGL (4D Graphics Language). A built-in higher level language such as 4DGL allows
user programs to be run directly within the PICASO processor where the graphics
operations can be performed much faster than sending the commands serially. This
avoids serial bottle necks for those graphics intensive applications as well as allows
the user to take complete control of all of the internal resources of the module.
The latest PmmC system file for the µVGA-PICASO-MD1 can be downloaded from:
www.4dsystems.com.au/downloads/micro-VGA/uVGA-PICASO-MD1/PmmC/
The latest version of PmmCLoader.exe the PC software tool can be downloaded from:
www.4dsystems.com.au/downloads/PmmC-Loader/Software/Windows/
and the User Guide can be found here:
www.4dsystems.com.au/downloads/PmmC-Loader/Docs/Pdf/

www.4dsystems.com.au
µVGA-PICASO-MD1
10
6Graphics Command Set (Serial)
The heart of the µVGA-PICASO-MD1 module is its rich graphics oriented command set.
This comprises of powerful instructions that can draw lines, circles, rectangles, text, images,
etc. to provide a full graphical user interface. The commands can be either sent via the
serial link or called as functions from the built-in library if the platform is running a higher
level language such as 4DGL. The command set is divided into 2 groups:
•General Command Set
oThese commands are generic and are standard commands that apply across
all applications.
•Extended Command Set
oThe µVGA-PICASO-MD1 module supports an external micro-SD (µSD)
memory card. This feature is not implemented yet, but when it becomes
available the revised firmware will be available for download to re-program
the module via PmmC operation. This Extended Command set will be
documented fully when it is implemented. Check the 4D website for details.
The General Command set is described in detail in the following section with its syntax.
Please note that all command examples listed below are in hex (00hex). Due to the high
resolution nature of the µVGA-PICASO-MD1, a pixel horizontal and vertical address
coordinates (x, y) will not fit into a single byte, which can only hold a maximum value of
255. Therefore each of the xand ypixel address data are represented as a 2 byte value,
x(msb:lsb) and y(msb:lsb). The most significant byte (msb) is transmitted first followed by
the least significant byte (lsb). This format is called the big endian. So for a 2 byte
coordinate value of 013Fhex the byte order can be shown as (01hex),(3Fhex).
NOTE: When transmitting the command and data bytes to the µVGA, do not include any
separators such as commas ‘,’ or spaces ‘ ‘ or brackets ‘(‘ ‘)’ between the bytes. The
examples show these separators purely for legibility; these must not be included when
transmitting data to the µVGA.
When a command is sent, the µVGAwill reply back with a single acknowledge byte called
the ACK (06hex). This tells the host that the command was understood and the operation is
completed. It will take the µVGAanywhere between 1 to several milliseconds to reply back
with an ACK, depending on the command and the operation the µVGAhas to perform. If the
µVGAreceives a command that it does not understand it will reply back with a negative
acknowledge called the NAK (15hex).
If a command that has 5 bytes but only 4 bytes are sent, the command will not be executed
and the µVGAwill wait until another byte is sent before trying to execute the command.
There is no timeout on the µVGAwhen incomplete commands are sent. The µVGAwill reply
back with a NAK for each invalid command it receives. For correct operation make sure the
command bytes are sent in the correct sequence.

www.4dsystems.com.au
µVGA-PICASO-MD1
11
6.1 General Command Set
NOTES:
Serial : Those commands that can be sent via the serial link and executed by the PICASO module.
4DGL : Those commands that can be executed from user application code written in 4DGL via
function calls within the built in 4DGL library.
General Command Set Serial 4DGL
(A)Add User Bitmapped Character √
(a)Set Viewing area √√
(B)Set Background Colour √√
(b)Place Text button √√
(C)Draw Circle √√
(c)Block copy and Paste (bitmap copy) √√
(D)Display User Bitmapped Character √√
(E)Erase Screen √√
(e)Draw ellipse √√
(F)Font Size √√
(G)Draw TrianGle √√
(g)Draw Polygon √√
(I)Display Image √√
(L)Draw Line √√
(O)Opaque or Transparent Text √√
(P)Put Pixel √√
(p)Set pen Size √√
(R)Read Pixel √√
(r)Draw rectangle √√
(S)Place String of Text (unformatted/bitmapped) √√
(s)Place string of Text (formatted) √√
(T)Place Text Character (formatted) √√
(t)Place text Character (unformatted/bitmapped) √√
(V)Version/Device Info Request √
(v)vsync Lock √√
(Y)DisplaY Control functions √√

www.4dsystems.com.au
µVGA-PICASO-MD1
12
6.1.1 Add User Bitmapped Character (A)
Serial Syntax : cmd, group, numb, data1, data2, …….., dataN
4DGL Syntax : N/A
cmd : 41hex, Aascii
group : selects the appropriate bitmap format
00hex selects the 8x8 bitmap format
01hex selects the 16x16 bitmap format
02hex selects the 32x32 bitmap format
numb : bitmap character number to add to memory:
0 to 63 (00h to 3Fh), 64 characters of 8x8 format when group = 00hex
0 to 15 (00h to 0Fh), 16 characters of 16x16 format when group = 01hex
0 to 7 (00h to 07h), 8 characters of 32x32 format when group = 02hex
data1 to dataN : number of data bytes that make up the composition and format of
the bitmapped character. The 8x8 bitmap composition is 1 byte wide (8bits)
by 8 bytes deep which makes N = 1x8 = 8. The 16x16 bitmap composition is
2 bytes wide (16bits) by 16 bytes deep which makes N = 2x16 = 32. The
32x32 bitmap composition is 4 bytes wide (32bits) by 32 bytes deep hence N
= 4x32 = 128.
Description : This command will add a user defined bitmapped character into the
internal memory. There are 3 different size bitmaps available, 8x8 format, 16x16
format and 32x32 format. The desired format is selected by specifying the appropriate
value in ‘group’.
Example1: 41hex, 0, 01hex, 18hex, 24hex, 42hex, 81hex, 81hex, 42hex, 24hex,
18hex
This adds and saves user defined 8x8 bitmap as character number 1 into memory as
seen below.
b7 b6 b5 b4 b3 b2 b1 b0
data1 (hex = 18h)
data2 (hex = 24h)
data3 (hex = 42h)
data4 (hex = 81h)
data5 (hex = 81h)
data6 (hex = 42h)
data7 (hex = 24h)
data8 (hex = 18h)
Example of a 8x8 user defined bitmap

www.4dsystems.com.au
µVGA-PICASO-MD1
13
Example2: 41hex , 01hex, 03hex, 3Fhex, FChex, 40hex, 02hex, 80hex, 01hex,
BChex, 3Dhex, 98hex, 19hex, 98hex, 19hex, 81hex, 81hex, 81hex,
81hex, 80hex, 01hex, 40hex, 02hex, 24hex, 24hex, 23hex, C4hex,
21hex, 84hex, 10hex, 08hex, 08hex, 10hex, 07hex, E0hex
This adds and saves user defined 16x16 bitmap (group 1) as character number 3 into
memory as seen below.
b7 b6 b5 b4 b3 b2 b1 b0 b7 b6 b5 b4 b3 b2 b1 b0
data1(hex=3Fh) data2(hex=FCh)
data3(hex=40h) data4(hex=02h)
data5(hex=80h) data6(hex=01h)
data7(hex=BCh) data8(hex=3Dh)
data9(hex=98h) data10(hex=19h)
data11(hex=98h) data12(hex=19h)
data13(hex=81h) data14(hex=81h)
data15(hex=81h) data16(hex=81h)
data17(hex=80h) data18(hex=01h)
data19(hex=40h) data20(hex=02h)
data21(hex=24h) data22(hex=24h)
data23(hex=23h) data24(hex=C4h)
data25(hex=21h) data26(hex=84h)
data27(hex=10h) data28(hex=08h)
data29(hex=08h) data30(hex=10h)
data31(hex=07h) data32(hex=E0h)
Example of a 16x16 user defined bitmap

www.4dsystems.com.au
µVGA-PICASO-MD1
14
6.1.2 Set viewing area (a)
Serial Syntax : cmd, lineStart(msb:lsb), lineEnd(msb:lsb)
4DGL Syntax : (refer to 4DGL programmers manual)
cmd : 61hex, a ascii
lineStart: specify line start position. 2 bytes.
lineEnd: specify line stop position. 2 bytes.
Description : This command sets the current screen viewing area. The PICASO chip
allocates its resources to its internal graphics engine as well as its processor to
execute user commands. For those applications that require fast graphics processing
and do not require full screen area, setting a smaller viewing area will allow the
PICASO chip to allocate more resources for processing the commands. Success is
followed by ACK return. If operation not successful, a NACK is returned.
Power-up or Reset default is full screen size.

www.4dsystems.com.au
µVGA-PICASO-MD1
15
6.1.3 Set Background Colour (B)
Serial Syntax : cmd, colour
4DGL Syntax : (refer to 4DGL programmers manual)
cmd : 42hex, Bascii
colour : pixel colour value: 1 byte
256 colours to choose from
Black = 00hex, 0dec
White = FFhex, 255dec, 11111111bin
Description : This command sets the current background colour. Once this command
is sent, only the background colour will change. Any other object on the screen with a
different colour value will not be affected.
Example : 42hex, FFhex
Set the background colour to value 256 (white).

www.4dsystems.com.au
µVGA-PICASO-MD1
16
6.1.4 Text button (b)
Serial Syntax : cmd, state, x(msb:lsb), y(msb:lsb),buttonColour, font,
textColour, textWidth, textHeight, char1, .., charN, terminator
4DGL Syntax : (refer to 4DGL programmers manual)
cmd : 62hex, bascii
state : Specifies whether the displayed button is drawn as UP (not pressed) or
DOWN (pressed). 0 = Button Down (pressed)
1 = Button Up (not pressed)
x : top left horizontal start position of the button. 2 bytes
y : top left vertical start position of the button. 2 bytes
buttonColour : button colour value. 1 byte
font : 0 = 5x7 font, 1 = 8x8 font, 2 = 8x12 font. This has precedence and does not
affect the Font command.
textColour : text colour value. 1 byte
textWidth : horizontal size of the character. 1 byte
textHeight : vertical size of the character. 1 byte
char1..charN : string of ASCII characters (limit the string to line width)
terminator : the string must be terminated with 00hex
Description : This command will place a Text button similar to the ones used in a PC
Windows environment. (x, y) refers to the top left corner of the button and the size of
the button is automatically calculated and drawn on the screen with the text relatively
justified inside the button box. The button can be displayed in an UP (button not
pressed) or DOWN (button pressed) position by specifying the appropriate value in the
state byte. Separate button and text colours provide many variations in appearance
and format.

www.4dsystems.com.au
µVGA-PICASO-MD1
17
6.1.5 Draw Circle (C)
Serial Syntax : cmd, x(msb:lsb), y(msb:lsb), rad(msb:lsb), colour
4DGL Syntax : (refer to 4DGL programmers manual)
cmd : 43hex, Cascii
x : circle centre horizontal position. 2 bytes
y : circle centre vertical position. 2 bytes
rad : radius size of the circle. 2 bytes
colour :circle colour value. 1 byte
Description : This command will draw a coloured circle centred at (x, y) with a
radius determined by the value of rad. The circle can be either solid or wire frame
(empty) depending on the value of the Pen Size (see Set Pen Size command). When
Pen Size = 0 circle is solid, Pen Size = 1 circle is wire frame.
Example : 43hex, 00, 3Fhex, 00, 3Fhex, 00, 22hex, 07hex
Draws a RED circle (07hex) centred at x = 63dec (003Fhex) and y = 63dec
(003Fhex) with a radius of 34dec (22hex).

www.4dsystems.com.au
µVGA-PICASO-MD1
18
6.1.6 Block copy & Paste (Screen Bitmap Copy) (c)
Serial Syntax : cmd, xs(msb:lsb), ys(msb:lsb), xd(msb:lsb), yd(msb:lsb),
width(msb:lsb), height(msb:lsb), src_page, dest_page
4DGL Syntax : (refer to 4DGL programmers manual)
cmd : 63hex, c ascii
xs: top left horizontal start position of block to be copied (source). 2 bytes.
ys: top left vertical start position of block to be copied (source). 2 bytes.
xd: top left horizontal start position of where copied block is to be pasted
(destination). 2 bytes.
yd: top left vertical start position of where the copied block is to be pasted
(destination). 2 bytes.
width: width of block to be copied (source). 2 bytes.
height: height of block to be copied (source). 2 bytes.
src_page: source page, QVGA:8pages, VGA:2 pages, SVGA:1page.
dest_page: destination page, QVGA:8pages, VGA:2 pages, SVGA:1page.
Description : This command copies an area of a bitmap block of specified size. The
start location of the block to be copied is represented by xs, ys (top left corner) and
the size of the area to be copied is represented by width and height parameters. The
start location of where the block is to be pasted (destination) is represented by xd, yd
(top left corner). There are 8 pages for QVGA, 2 pages for VGA and 1 memory page
for SVGA resolutions available. This is a very powerful feature for animating objects,
smooth scrolling, implementing a windowing system or copying patterns across the
screen to make borders or tiles.

www.4dsystems.com.au
µVGA-PICASO-MD1
19
6.1.7 Display User Bitmapped Character (D)
Serial Syntax : cmd, group, numb, x(msb:lsb), y(msb:lsb), colour
4DGL Syntax : (refer to 4DGL programmers manual)
cmd : 44hex, Dascii
group : selects the appropriate bitmap format
00hex selects the 8x8 bitmap format
01hex selects the 16x16 bitmap format
02hex selects the 32x32 bitmap format
numb : bitmap character number to add to memory:
0 to 63 (00h to 3Fh), 64 characters of 8x8 format when group = 00hex
0 to 15 (00h to 0Fh), 16 characters of 16x16 format when group = 01hex
0 to 7 (00h to 07h), 8 characters of 32x32 format when group = 02hex
x : horizontal display position of the character. 2 bytes
y : vertical display position of the character. 2 bytes
colour: bitmap colour value. 1 byte
Description : This command displays the previously defined user bitmapped
character at location (x, y) on the screen. User defined bitmaps allow drawing &
displaying unlimited graphic patterns quickly & effectively.
Example 1: 44hex, 01hex , 00hex, 00hex, 00hex, 00hex, 07hex
Display 8x8 bitmap character number 1 at x = 0, y = 0, colour = red
Example 2: 44hex, 01hex, 00hex, 08hex, 00hex, 00hex, 38hex
Display 8x8 bitmap character number 1 at x = 8, y = 0, colour = green
Example 3: 44hex , 01hex, 00hex, 10hex, 00hex, 00hex, C0hex
Display 8x8 bitmap character number 1 at x = 16, y = 0, colour = blue
Example 4: 44hex , 01hex, 03hex, 00hex, 10hex, 00hex, 20hex, FFhex
Display 16x16 bitmap character number 3 at x = 16, y = 32, colour = white

www.4dsystems.com.au
µVGA-PICASO-MD1
20
6.1.8 Erase Screen (E)
Serial Syntax : cmd
4DGL Syntax : (refer to 4DGL programmers manual)
cmd : 45hex, Eascii
Description : This command clears the entire screen using the current background
colour. The screen erase execution starts at the beginning of the next Vsync cycle and
completes by the end of the frame.
Example : 45hex
Clear the screen.
This manual suits for next models
1
Table of contents