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

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
unsigned int tilemap_ptr;
tilemap_ptr = GFX_Read_Tilemap_Ptr() ;
_________________________________________________________________________________________________
Function Prototype:
Description:
Example(s):
per row).
GFX_Write_Tilemap_Ptr( GFX_Read_Tilemap_Ptr() + 32*2) ;
_________________________________________________________________________________________________
Function Prototype:
Description:
Example(s):
unsigned int bitmap_ptr;
bitmap_ptr = GFX_Read_Bitmap_Ptr() ;
_________________________________________________________________________________________________
Function Prototype:
Description:
Example(s):
unsigned int GFX_Write_Tilemap_Ptr(unsigned int tilemap_ptr);
unsigned int GFX_Read_Bitmap_Ptr(void);
unsigned int GFX_Write_Bitmap_Ptr(unsigned int bitmap_ptr);
Scroll down a line. Assumes 32x24 tile map (important thing is the row pitch, this defines how many bytes
Read the current bitmap pointer.
Adjust the bitmap pointer down by 16 bitmap tiles (16 * 16 = 256 bytes).
GFX_Write_Tilemap_Ptr(…) writes the 16-bit tilemap pointer that points to the current tile map data
displayed. Each tile map entry is 2 bytes [palette index | character index], and the current tile map
width decides the pitch. The pointer must be a valid address and within open memory or part of memory
declared for the driver itself, otherwise you could crash the Propeller, so watch out. Scrolling, page
flipping, and other memory effects can be achieved by changing the pointer. For example, say you want
to scroll the tilemap one row down? Assuming the current tilemap is 32x24 then we know there are 32
tiles per row and each tile is 2-bytes, thus 64 bytes per row. Therefore to scroll down a single row, we
simply need to add 64 to the current tile map pointer. The example that follows will show this. Returns 1.
GFX_Read_Bitmap_Ptr() reads the 16-bit bitmap pointer that points to the first bitmap indexed by tile 0.
Each bitmap is 8x8 pixels, 2-bits per pixel, 16-bytes each. The bitmap pointer is of course relative to the
Propeller’s 32K memory space and an absolute address. Returns the 16-bit pointer value/address.
GFX_Write_Bitmap_Ptr(…) writes the 16-bit bitmap pointer bitmap_ptr that points to the first bitmap
indexed by tile 0. Each bitmap is 8x8 pixels, 2-bits per pixel, 16-bytes each. The pointer must be a valid
address and within open memory or part of memory declared for the driver itself, otherwise you could
crash the Propeller, so watch out. Typically, you will adjust the bitmap pointer by one or more bitmaps to
create animation effects of the tiles on screen or to swap out character sets on the fly. Returns 1.
© 2009 NURVE NETWORKS LLC “Exploring the Chameleon PIC 16-Bit”
189

Related parts for Chameleon-PIC