Chameleon-PIC Nurve Networks, Chameleon-PIC Datasheet - Page 45

MCU, MPU & DSP Development Tools PIC24 & PROPELLER DEV SYSTEM (SBC)

Chameleon-PIC

Manufacturer Part Number
Chameleon-PIC
Description
MCU, MPU & DSP Development Tools PIC24 & PROPELLER DEV SYSTEM (SBC)
Manufacturer
Nurve Networks
Datasheet

Specifications of Chameleon-PIC

Processor To Be Evaluated
PIC24
Data Bus Width
16 bit
Interface Type
USB, VGA, PS/2, I2C, ISP, SPI
Operating Supply Voltage
3.3 V, 5 V
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
10.3.3 Generating the Active VGA Video
Generating the actual RGB video pixels is trivial on any system, there is no look up, no math, just send out bytes or words
that represent the RGB values and that’s it. Of course the Propeller will do this for us via the VSU and a driver, but there is
no reason you can’t drive the I/O pins manually with pure software as well. Either way, let’s take a look at the mechanics
of the signal. On the Chameleon PIC for example, there are 2-bits per channel, so the encoding of the VGA data byte is
as simple as generating bytes in the format shown in Figure 10.4.
I/O
Let’s say that we have a BYTE buffer called vga_byte[ ] and a function Write_VGA(value, time_us) that we use to send
data to the VGA port, given that, we can write all kinds of functions that send out different signals as long as we stream
the bytes to the port at the 25.175MHz rate everything will work out fine. For example, say that we are working with a
positive sync system, that is a VGA monitor that wants a TTL HIGH for sync, then to generate a Hsync pulse we could
use some pseudo-code like this:
vga_byte = 0b00000010;
Write_VGA(vga_byte, 3.77);
Ok, now consider we want to draw 640 pixels from an array video_buffer[ ] that is storing the pixel data in byte format
already in the proper format for our hardware, then all we would do is this:
UCHAR video_buffer[640]; // pre-initialized video buffer
for (pixel = 0; pixel < 640; pixel++)
Of course, you would need some might fast hardware to delay at a resolution of 39 ns, but you get the idea. This is a
“model” of the algorithm for a line of video, this coupled with the model for the horizontal timing, vertical timing, and put it
all together as a state machine and you have a VGA generator! The VGA drivers on the Propeller are more complex than
this of course, but that’s the idea.
| Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 |
|
|
Write_VGA(video_buffer[pixel],
P23
R1
Red Signal
|
Table 10.4 – The RGB signals and their relationship to VGA and the Propeller I/O pins.
P22
R0
|
|
Prop Port Bit
P23
P22
P21
P20
P19
P18
P17
P16
P21
G1
Green Signal |
|
P20
G0
Chameleon Signal
VGA_RED_B1
VGA_RED_B0
VGA_GREEN_B1
VGA_GREEN_B0
VGA_BLUE_B1
VGA_BLUE_B0
VGA_HSYNC
VGA_VSYNC
|
0.039721946);
Figure 10.4 – VGA data byte encoding.
P19
B1
Blue Signal | Sync Signals
|
e Port Mapping Bits.
P18
B0
| VSYNC | HSYNC |
P17
© 2009 NURVE NETWORKS LLC “Exploring the Chameleon PIC 16-Bit”
P16
Description
Bit 1 of RED channel.
Bit 0 of RED channel.
Bit 1 of GREEN channel.
Bit 0 of GREEN channel.
Bit 1 of BLUE channel.
Bit 0 of BLUE channel.
VGA HSYNC TTL level.
VGA VSYNC TTL level.
|
45

Related parts for Chameleon-PIC