AMcTools Forum 
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
Simulating a HD44780 LCD with only 4 data pins (Read 6759 times)
Seb
YaBB Newbies
*
Offline

I Love YaBB 2!

Posts: 2

Simulating a HD44780 LCD with only 4 data pins
05/13/09 at 10:31:27
 
Hello,

I'm trying to compile the WinAVR avr-libc sample called stdiodemo.
This sample show how to use an HD44780 LCD controller for stdout and serial com for stderr.
I'm using the same uC than in the sample (ATmega16)
This example is present at
C:\WinAVR\doc\avr-libc\examples\stdiodemo

The defines.h file show this
/* HD44780 LCD port connections */
#define HD44780_PORT A
#define HD44780_RS PORT6
#define HD44780_RW PORT4
#define HD44780_E  PORT5
/* The data bits have to be in ascending order. */
#define HD44780_D4 PORT0
#define HD44780_D5 PORT1
#define HD44780_D6 PORT2
#define HD44780_D7 PORT3

so the LCD controller is  only connected with 4 data pins.

By default VMLAB provide a way to simulate LCD with 8 data pins
X[inst_name]  LCD(chars lines oscil_freq) RS RW E D7 D6 D5 D4 D3 D2 D1 D0

Is there a way to make it run with only 4 data pins.

Kind regards

Sebastien
Back to top
 
 
  IP Logged
Eddy-B
YaBB Newbies
*
Offline

0100010101100100
0110010001111001

Posts: 20
Netherlands
Gender: male
Re: Simulating a HD44780 LCD with only 4 data pins
Reply #1 - 05/19/09 at 20:22:04
 
Please check the LCD project in your VMLAB\AVR_DEMO folder, it shows you how to use the [b]NC[/b] nodes with your lcd, just as you would leave these nodes unconnected on the real thing.
Back to top
 
 

[b][size=16][url=http://www.eddy-b.com]www.Eddy-B.com[/url][/size][/b]
WWW   IP Logged
Seb
YaBB Newbies
*
Offline

I Love YaBB 2!

Posts: 2

Re: Simulating a HD44780 LCD with only 4 data pins
Reply #2 - 05/20/09 at 05:28:37
 
Thanks I will have a look at this
Back to top
 
 
  IP Logged
turbo
YaBB Newbies
*
Offline

I Love YaBB 2!

Posts: 3

Re: Simulating a HD44780 LCD with only 4 data pins
Reply #3 - 08/12/09 at 14:55:58
 
I think I am late to answer to this
but for others I leave the way how to
It is from the demo project as it was said

You have to add this in you prj file

XLCD0  LCD(16 2 250K) PB0 PB7 PB1 PB5 PB4 PB3 PB2 nc3 nc2 nc1 nc0

use nc* for the pins you don't use
Back to top
 
 
  IP Logged
culibin_100
YaBB Newbies
*
Offline

I Love YaBB 2!

Posts: 16
u.a  donbass
Re: Simulating a HD44780 LCD with only 4 data pins
Reply #4 - 03/01/11 at 11:01:42
 
Tell please the display works if to write and then to show the symbols created by me in memory CGRAM? Symbols after record in memory it is visible and a display window pure

:-/
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print