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

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
// NTSC commands
#define GFX_CMD_NTSC_PRINTCHAR 1
#define GFX_CMD_NTSC_GETX
#define GFX_CMD_NTSC_GETY
#define GFX_CMD_NTSC_CLS
// vga commands
#define GFX_CMD_VGA_PRINTCHAR 8
#define GFX_CMD_VGA_GETX
#define GFX_CMD_VGA_GETY
#define GFX_CMD_VGA_CLS
// keyboard commands
#define KEY_CMD_RESET
#define KEY_CMD_GOTKEY
#define KEY_CMD_KEY
#define KEY_CMD_KEYSTATE
#define KEY_CMD_START
#define KEY_CMD_STOP
#define KEY_CMD_PRESENT
// mouse commands
#define MOUSE_CMD_RESET
#define MOUSE_CMD_ABS_X
#define MOUSE_CMD_ABS_Y
#define MOUSE_CMD_ABS_Z
#define MOUSE_CMD_DELTA_X
#define MOUSE_CMD_DELTA_Y
#define MOUSE_CMD_DELTA_Z
#define MOUSE_CMD_RESET_DELTA 31 // resets the mouse deltas
#define MOUSE_CMD_BUTTONS
#define MOUSE_CMD_START
#define MOUSE_CMD_STOP
#define MOUSE_CMD_PRESENT
// general data read back commands
#define READ_CMD
// sound commands
#define SND_CMD_PLAYSOUNDFM
#define SND_CMD_STOPSOUND
#define SND_CMD_STOPALLSOUNDS 42 // stops all channels
#define SND_CMD_SETFREQ
#define SND_CMD_SETVOLUME
#define SND_CMD_RELEASESOUND
// propeller local 8-bit port I/O commands
#define PORT_CMD_SETDIR
#define PORT_CMD_READ
#define PORT_CMD_WRITE
// general register access commands, Propeller registers for the SPI driver cog can be accessed ONLY
// but, the user can leverage the counters, and even the video hardware if he wishes, most users will only
// play with the counters and route outputs/inputs to/from the Propeller local port, but these generic access
// commands model how you would access a general register based system remotely, so good example
// these commands are DANGEROUS since you can break the COG with them and require a reset, so if you are going to
// write directly to the registers, be careful.
#define REG_CMD_WRITE
#define REG_CMD_READ
#define REG_CMD_WRITE_BYTE
#define REG_CMD_READ_BYTE
// system commands
#define SYS_RESET
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Commands in this range for future expansion...
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
The commands are fairly straightforward and if there is anything that you want more detail on you can always open up the
Propeller driver file’s spin code and see exactly how the command is processed. Remember, all of these commands work
in the same way; they are sent over the SPI interface to a command dispatching loop on the Propeller, a large case
statement catches the commands and then sends it to the appropriate driver (graphics, sound, keyboard, etc.). So there
are a lot of commands, but each one is rather simple when you follow its complete path from the PIC to the Propeller to
the media driver itself.
The next subset of commands are specific to the default2 driver and support the added graphics abilities of the tile map
engine for NTSC modes. I wrote the tile engine to give you more performance and the ability to do some game like
applications. These commands are more complex and it will take a bit to explain them, but for now, just peruse them
below:
// advanced GFX commands for GFX tile engine
#define
#define
#define
#define
// normal commands
#define
#define
// sub-function constants that are executed when the GPU_GFX_SUBFUNC_STATUS_W command is issued
#define GPU_GFX_SUBFUNC_COPYMEM16 0 // Copies numbytes from src -> dest in wordsize chunks
#define GPU_GFX_SUBFUNC_FILLMEM16 1 // Fills memory with data16, 2 bytes at a time
#define GPU_GFX_SUBFUNC_COPYMEM8
#define GPU_GFX_SUBFUNC_FILLMEM8
GPU_GFX_BASE_ID
GPU_GFX_NUM_COMMANDS
GPU_GFX_SUBFUNC_STATUS_R
GPU_GFX_SUBFUNC_STATUS_W
GPU_GFX_TILE_MAP_R
GPU_GFX_TILE_MAP_W
9
10
11
16
17
18
19
20
21
22
24 // resets the mouse and initializes it
25 // returns the absolute X-position of mouse
26 // returns the absolute Y-position of mouse
27 // returns the absolute Z-position of mouse
28 // returns the delta X since the last mouse call
29 // returns the delta Y since the last mouse call
30 // returns the delta Z since the last mouse call
32 // returns the mouse buttons encoded as a bit vector
33 // starts the mouse driver, loads a COG with it, etc.
34 // stops the mouse driver, unloads the COG its running on
35 // determines if mouse is present and returns type of mouse
36
40 // plays a sound on a channel with the sent frequency at 90% volume
41 // stops the sound of the sent channel
43 // sets the frequency of a playing sound channel
44 // sets the volume of the playing sound channel
45 // for sounds with infinite duration, releases the sound and it enters the "release" portion of ADSR envelope
48 // sets the 8-bit I/O pin directions for the port 1=output, 0=input
49 // reads the 8-bit port pins, outputs are don't cares
50 // writes the 8-bit port pins, port pins set to input ignore data
56 // performs a 32-bit write to the addressed register [0..F] from the output register buffer
57 // performs a 32-bit read from the addressed register [0..F] and stores in the input register buffer
58 // write byte 0..3 of output register g_reg_out_buffer.byte[
59 // read byte 0..3 of input register g_reg_in_buffer.byte[
64 // resets the prop
2
3
4
192
37
(0+GPU_GFX_BASE_ID) // Reads the status of the GPU, Writes the GPU Sub-Function register and issues a high level
(1+GPU_GFX_BASE_ID) // Writes status of the GPU, Writes the GPU Sub-Function register and issues a high level
(2+GPU_GFX_BASE_ID) // Reads 16-bit tile map ptr which points to the current tile map displayed.
(3+GPU_GFX_BASE_ID) // Writes 16-bit tile map ptr which points to the current tile map displayed.
2 // Copies numbytes from src -> dest in byte size chunks
3 // Fills memory with low byte of data16, 1 bytes at a time
// starting id for GFX commands to keep them away from normal command set
// number of GFX commands
// command like copy, fill, etc.
// command like copy, fill, etc.
© 2009 NURVE NETWORKS LLC “Exploring the Chameleon PIC 16-Bit”
0..3 ]
0..3
]
162

Related parts for Chameleon-PIC