151-0153 Rabbit Semiconductor, 151-0153 Datasheet - Page 77

no-image

151-0153

Manufacturer Part Number
151-0153
Description
ASSEMBLY - RABBITFLEX CABLES
Manufacturer
Rabbit Semiconductor
Series
RabbitFLEX™r
Datasheet

Specifications of 151-0153

Accessory Type
Cable Assembly
For Use With/related Products
BL300F
Lead Free Status / RoHS Status
Vendor undefined / Vendor undefined
Note that the keypad’s software name is always flex_keypad.
Next, you should configure the keys on your keypad. This is what the flexKeyConfig() function
does. When a key is pressed, the flexKeyGet() function will get a specific key code before returning
which key was pressed. The keycode is calculated as follows:
The flexKeyConfig() function takes the key code as a parameter to determine which key you are
configuring. The other parameters let you configure the actual char value that flexKeyGet() will
report when the corresponding key is pressed, as well as whether or not a key should repeat if held down.
To drive the keypad driver, you must continuously call the flexKeyProcess() function.
6.3.7 LCD
All LCD functions begin with “flexDisp.” To use the LCD software support, you must first initialize the
LCD. Use the flexDispInit() function. Here is an example:
Note that the LCD’s software name is always flex_lcd.
Also note the second parameter in flexDispInit(). Your LCD display may have different properties
from the standard LCDs that we support. The second parameter lets you configure some of the parameters
for your attached LCD. This initialization parameter is of type Flex_LCDConf. Here is the structure
definition for Flex_LCDConf:
If your display has a specific number of columns and rows, then you can set that with the num_cols and
num_rows parameters. The documentation for your LCD module should indicate at which address each
row begins—these can be specified with the row_addresses array. The anaout_contrast_min
and anaout_contrast_max parameters can be ignored—contrast on the RabbitFLEX BL300F is cur-
rently set via a PWM output. pwm_contrast_min and pwm_contrast_max can be used to restrict
the range of the contrast settings, whereas def_contrast can be used to set the default contrast value.
So, for a 2x20 display, you might initialize it as follows:
RabbitFLEX User’s Manual
[output #] * [num outputs] + [input #]
flexDispInit(&flex_lcd, NULL);
typedef struct {
} Flex_LCDConf;
Flex_LCDConf my_lcd;
// Number of columns on the display
my_lcd.num_cols = 20;
char num_cols;
char num_rows;
char row_addresses[4];
float anaout_contrast_min; // Minimum voltage for contrast control
float anaout_contrast_max; // Maximum voltage for contrast control
int pwm_contrast_min;
int pwm_contrast_max;
char def_contrast;
// Number of columns on the display
// Number of rows on the display
// Starting address of each row (up to 4 rows)
// Minimum duty cycle for contrast control
// Maximum duty cycle for contrast control
// Default scaled value for contrast control (0-255)
www.rabbit.com
71

Related parts for 151-0153