Chameleon-AVR Nurve Networks, Chameleon-AVR Datasheet - Page 197

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

Chameleon-AVR

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

Specifications of Chameleon-AVR

Processor To Be Evaluated
AVR 328P
Data Bus Width
8 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
24.0 Keyboard 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 is the only features we can
access via the AVR 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 Keyboard) 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 keyboards (and mice) is they are really SLOW, thus its typically a problem reading them, since your CPU has to
slow down to do so; therefore, its really nice for a core on the Propeller to completely handle the keyboard and queue up
key presses for you.
For the keyboard, we decided to use a base driver from the original Propeller objects development that was designed to
communicate to a standard PS/2 keyboard, 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 keyboard is:
However, I only exposed a portion of its abilities thru the current SPI messages, no need to waste messages. You can
always add more. Therefore, the abilities you see exposed in the following API are just a taste of what it can do. In other
words, if you need more functions that the driver supports then you will have to add messages to the SPI driver and add
them yourself.
With that in mind, if you want to use the keyboard driver then you need the following files added to your project:
24.1 Header File Contents Overview
The “Keyboard” module header CHAM_KEYBOARD_DRV_V010.h has no #defines or globals itself since it literally
nothing more than wrapper functions that call thru to the Propeller side driver. But, its worth while to take a look at some of
the constants in the actual Spin/ASM code keyboard driver – KEYBOARD_010.spin. There are two very large tables at
the end of the driver that define the keys in terms of scan codes and ASCII codes. The tables are too long to list, but
here’s a excerpt from the first table:
keyboard_010.spin – Basic PS/2 keyboard driver originally written by Parallax.
CHAM_AVR_KEYBOARD_DRV_V010.c
CHAM_AVR_KEYBOARD_DRV_V010.h
- Main C file source for “Keyboard” module.
- Header file for “Keyboard” module.
© 2009 NURVE NETWORKS LLC “Exploring the Chameleon AVR 8-Bit”
197

Related parts for Chameleon-AVR