View previous topic :: View next topic |
Author |
Message |
Jan Noman
Joined: 28 May 2005 Posts: 14
|
LCD setting contrast by program |
Posted: Thu Jul 28, 2005 9:20 am |
|
|
Hi everybody !
The contrast on all displays of the EA DOG LCD series can be set only
with a command .How I can change init string in LCD.c driver ?
controller is ST7036 instruction compatible to HD4780
Best regards
Jan |
|
|
Ttelmah Guest
|
|
Posted: Thu Jul 28, 2005 9:54 am |
|
|
Send LCD_INIT first. This ensures the controller is awake, and everything is running. Then just use LCD_SEND_BYTE to send the two contrast control bytes (the high two bits are in the 'power control' command.
I'd suggest storing the value you require for this in an EEPROM location, and allowing the user to 'tweak' them up/down. Though the displays are very stable, there is a tolerance between devices, and especially in cold conditions, the value may need to shift a little.
lcd_init();
lcd_send_byte(0,0x7A);
lcd_send_byte(0,0x52);
Worked on a version some months ago for me as the 'default' values.
You obviously can include these into the 'init_string', but I actually had the bit pattern adjustable, and masked this to form the required bytes.
Best Wishes |
|
|
Jan Noman
Joined: 28 May 2005 Posts: 14
|
|
Posted: Thu Jul 28, 2005 11:06 am |
|
|
Very thank You Ttelmah
sorry I'm "green"
....................................
void main()
lcd_init();
lcd_send_byte(0,0x7A);
lcd_send_byte(0,0x52);
.....................................
LCD.c:
..............................................
BYTE const LCD_INIT_STRING[4] = {0x20 | (lcd_type << 2), 0xc, 1, 6};
LCD is dead
other "normal" LCD works fine
what more can I do ? |
|
|
Ttelmah Guest
|
|
Posted: Thu Jul 28, 2005 2:18 pm |
|
|
Double check the values from the data sheet. The values I gave were (I think...), the ones I used, but it was quite a few months ago, and on a different screen based on the same controller.
Best Wishes |
|
|
diegostreetbob
Joined: 05 Sep 2009 Posts: 11
|
Re: LCD setting contrast by program |
Posted: Sat Mar 31, 2012 9:45 am |
|
|
Hello,
i need help with this drivers.
Finally work fine??? Can you send me this drivers,please??
[email protected] |
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
Re: LCD setting contrast by program |
Posted: Sat Mar 31, 2012 12:00 pm |
|
|
diegostreetbob wrote: | Hello,
i need help with this drivers.
Finally work fine??? Can you send me this drivers,please??
|
I don't think anyone's just going to send you their hard work.
This forum is about helping you get your code running -- not just snagging code from others for free. They put time and effort into their reward of a working project. That has a value. If you just "want someone's code" -- consider purchasing some of the libraries freely available on the internet...
Or, Consider writing your own -- and when it doesn't work, feel free to come back and ask for help.
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
diegostreetbob
Joined: 05 Sep 2009 Posts: 11
|
Re: LCD setting contrast by program |
Posted: Sun Apr 01, 2012 12:32 am |
|
|
I don't understand your response, I only asked for help in a resolved topic.
I am thinking of buying this lcd for a pic training for me, and need to be sure before ordering the pcbs.
I'm sorry if someone can be offended.
Regards |
|
|
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
What's the problem? |
Posted: Tue Apr 03, 2012 8:55 am |
|
|
Quote: |
BYTE const LCD_INIT_STRING[4] = {0x20 | (lcd_type << 2), 0xc, 1, 6};
LCD is dead
other "normal" LCD works fine
what more can I do ?
|
I'm confused about what works, and what does not work.
Can you give a clear explanation?
Like Bkamen says, this is NOT CCS. The forum is for users to freely help each other.
If you haven't already done, so I suggest you read the forum guidelines.
Mike |
|
|
|