world leader in high performance signal processing
Trace: » blackfin_twi_lcd_hd44780_based_driver


TWI LCD test application in userspace

TWI LCD test application based on i2c-dev interface without a kernel space driver, for details refer to the kernel document linux-2.6.x/Documentation/i2c/dev-interface. Different board may use different TWI port, please check the schematics. Use -n to specify the correct TWI port for your board, example:

1)BF537: twilcd_userspace_test -p 0 -n 0 “string”

2)BF548: twilcd_userspace_test -p 0 -n 1 “string”

3)BF527: twilcd_userspace_test -p 0 -n 0 “string”

Note: For BF527 board jumper “STAMP_ENABLE” must be shorted to turn on the TWI signal.

Kernel Configuration for TWI/I2C support

[*]   Enable compatibility bits for old user-space
<*>   I2C device interface
[*]   Autoselect pertinent helper modules
      Hardware Bus support  --->
[ ]   I2C Core debugging messages
[ ]   I2C Algorithm debugging messages
[ ]   I2C Bus debugging messages

Device Drivers

Moved to user space based on the i2c-dev interface so there is no longer kernel space driver for the lcd. This part is now implemented in: user/blkfin-test/twi_lcd-test/twilcd_userspace_test.c.

For BF533 or BF561

*** I2C system bus drivers (mostly embedded / system-on-chip) ***
<*> GPIO-based bitbanging I2C
< > OpenCores I2C Controller

For BF534, BF536 or BF537

<*> Blackfin TWI I2C support
(50)  TWI clock (kHZ)
< > Parallel port adapter (light)
< > I2C/SMBus Test Stub
< > PCA9564 on an ISA bus

Blackfin test programs

 [ ] PPI test program
 [*] TWI LCD test program
 [ ] TWI KEYPAD test program
 [ ] Sqlite test program


root:~> twilcd_userspace_test -h
 TWI LCD Test Application

Usage: twilcd_test [-h?v] [-c] [-d CONTROLLER] [-p POSITION] [Message String]
        -h?            this help
        -v             print version info
        -c             Clear Display
        -d Number      use 1,2,3 for CONTROLLER 1,2,BOTH
        -p Char POS    Position where to put the string

Example: twilcd_test -p 0 "Hello World !"
LCD panel adjustment

adjust LCD voltage to display

Application Example System Monitoring 'Uptime'
root:~> twilcd_userspace_test  -p 0 "`uptime`"
 TWI LCD Test Application

 Position               : 0
 Message                :  07:31:29 up 2 min, load average: 0.00, 0.00, 0.00
Application Example System Monitoring 'Date'
root:~> twilcd_userspace_test  -p 4 "`date`"
 TWI LCD Test Application

 Position               : 4
 Message                : Thu Jan  1 07:31:43 UTC 1970
Application Example System Monitoring reading /proc entries
root:~> twilcd_userspace_test "`cat /proc/interrupts | grep BFIN_UART_TX`"
 TWI LCD Test Application

 Message                :  19:        186   BFIN_UART_TX

Using the test Application

Complete Table of Contents/Topics