Lcd 16207

LCD_16207


About the Driver

The driver is written for the NIOS development board DE2. But should work also on other boards with NIOS.

This driver writes 2x16 characters to the Board even when you have sent another count of characters.
If you send less then the left chars are replaced by spaces and if you send more than only the first 32 are used.
Your program has to take care of that. The time for printing on the display should be approximately 2 ms.
To clear the display take similar time but without printing new chars.

To write to the device you can use the ioctl function like in the example below.
Or you can access the device by fread fprintf ... . So you can readout the message of the display.
It is also possible to change the timing of scrolling (line by line).

Quartus and SOPC Builder

For the kernel driver is the used the altera_avalon_lcd_16207 SOPC component.

Add it and name it "lcd_16207_0". It also works with DE2_NIOS_HOST_MOUSE_VGA project.

Generate a new SOF and download it to the board.

uClinux

Copy the kernel driver (lcd_16207.c, lcd_16207.h) to uClinux-dist/linux-2.6.x/drivers/char.

Edit the file Kconfig in uClinux-dist/linux-2.6.x/drivers/char to contain a section for the lcd module like the following part.

config LCD_16207    # note: in the patched tree this seems to be called NIOS_LCD_16207, watch out.
    tristate "Nios LCD 16207 device support"
    depends on NIOS || NIOS2
    help
      This driver supports the Nios LCD 16207 device.


And add in the Makefile in the same directory one line.

obj-$(CONFIG_LCD_16207)         += lcd_16207.o


Then recompile the uClinux kernel. If you use a module then you have to do modprobe lcd_16207.
If you successfully loaded by the kernel then you should see this message: "Device /dev/lcd16207 registered".

Create device file: mknod /dev/lcd16207 c 250 0

Examples

The example lcd16207 rotates the input string char by char for all 32 positions. The string is always written to the LCD.
If you pass less than 32 chars then they are filled with spaces and if there are mor than 32 - they are truncated to 32.

Start the program like : ./lcd16207 "..... Hello! ....."

There are some little programs for showing how to use fread fprintf.
The example lcdtime set the timing value of the driver for scrolling.

Tag page

Files 2

FileSizeDateAttached by 
 lcd16207-kernel.zip
No description
5.38 kB02:57, 8 Dec 2008AdminActions
 lcd16207_example.zip
No description
5.17 kB02:57, 8 Dec 2008AdminActions
Viewing 4 of 4 comments: view all
I could use some help with this driver. I am using it on the Cyclone II Nios II dev kit. After following the steps descirbed above the code build had several minor errors. I corrected these and successfully built the code. However when the system starts up, I get the console message, "Uncompressing Linux... OK, booting the kernel", over and over. Can anyone tell me what cause this to occur in the boot up process?
Posted 16:49, 30 Jul 2009
lcd is a good way to display something
Posted 02:42, 19 Aug 2009
can any1 tell me how can I print something on LCD by 1st option. fread fprintf
Posted 06:48, 18 Sep 2009
There are her louis vuitton suitcases, one of which was specially designed to hold shoes – many of them Louis Vuitton Handbag Sale; the designs by Pucci and Givenchy; and, of course, louis vuitton online, New York high-society couturier, Valentina, who lived in the same apartment building on East 52nd Street, louis vuitton online shop which became a Garbo signature, and encouraged her to dress for herself and for amusement, not for others.It is the louis vuitton purses for sale of the Auckland Festival of Sailing, which also includes the louis vuitton Trophy and the BMW Sailing World Cup final.
Posted 01:21, 9 Mar 2010
Viewing 4 of 4 comments: view all
You must login to post a comment.
SourceForge.net