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

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
if (Keyboard_GotKey()==1)
_________________________________________________________________________________________________
Function Prototype:
Description:
Example(s):
if (Keyboard_GotKey())
_________________________________________________________________________________________________
Function Prototype:
Description:
Example(s):
// test for scancode right arrow
if (Keyboard_State( 0xC1E6 ))
25.0 Mouse Library Module Primer
The basic premise of the Chameleon design is that it leverages drivers running on the Propeller chip to do all the media
and graphics. Thus, whatever features the particular driver running on the Propeller side does is the only features we can
access via the PIC side. That doesn’t mean we can’t abstract functionality and add higher level functions that build on the
sub-functions, however, this probably isn’t productive since you will want to change drivers, re-write the Propeller driver
and so forth. Thus, for the majority of the “media/IO” drivers all the API functions do (including the Mouse) is expose some
of the base functionality in nice function calls so you don’t have to send SPI messages yourself. Now, the one thing about
mice (and keyboards) is they are really SLOW, thus its typically a problem reading them, since your CPU has to slow
down to do so; therefore, it’s really nice for a core on the Propeller to completely handle the mouse for you.
For the mouse, we decided to use a base driver from the original Propeller objects development that was designed to
communicate to a standard PS/2 mouse, nothing fancy. The same driver is used in both Default1 and Default2, so the
same idea apply to either driver you load on the Propeller (CHAM_DEFAULT1_DRV_112.SPIN or
CHAM_DEFAULT2_DRV_112.SPIN). The actual driver object used for the mouse is:
{
// do something…
} // end if
{
// read key
key = Keyboard_Key();
// do something with hey
} // end if key ready
{
// do something…
} // end if
int Keyboard_Key(void);
int Keyboard_State(int key);
mouse_010.spin – Basic PS/2 mouse driver originally written by Parallax.
Read the key out of the queue and do something
Test if right arrow is down?
Keyboard_State(…) tests if keycode key is depressed (1) or released (0) and returns the values.
Keyboard_Key() reads the next keycode out of the keyboard buffer, returns 0 if no key is available.
© 2009 NURVE NETWORKS LLC “Exploring the Chameleon PIC 16-Bit”
201

Related parts for Chameleon-PIC