CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

LCD setting contrast by program

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Jan Noman



Joined: 28 May 2005
Posts: 14

View user's profile Send private message

LCD setting contrast by program
PostPosted: Thu Jul 28, 2005 9:20 am     Reply with quote

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







PostPosted: Thu Jul 28, 2005 9:54 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Jul 28, 2005 11:06 am     Reply with quote

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







PostPosted: Thu Jul 28, 2005 2:18 pm     Reply with quote

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

View user's profile Send private message Send e-mail MSN Messenger

Re: LCD setting contrast by program
PostPosted: Sat Mar 31, 2012 9:45 am     Reply with quote

Hello,
i need help with this drivers.

Finally work fine??? Can you send me this drivers,please??

d761017@hotmail.com
bkamen



Joined: 07 Jan 2004
Posts: 1611
Location: Central Illinois, USA

View user's profile Send private message

Re: LCD setting contrast by program
PostPosted: Sat Mar 31, 2012 12:00 pm     Reply with quote

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

View user's profile Send private message Send e-mail MSN Messenger

Re: LCD setting contrast by program
PostPosted: Sun Apr 01, 2012 12:32 am     Reply with quote

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

View user's profile Send private message

What's the problem?
PostPosted: Tue Apr 03, 2012 8:55 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group