Jump to content
43oh

Recommended Posts

  • Replies 63
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

74HCT family, such as 74HCT244 and 74HCT125 can be used to convert 3V logic to 5V logic. They have TTL thresholds that are compatible with 3V logic even when running from 5V.   74AHC family such at

Yeah! Got mine working too - including the graphic library. I'm using a 12v wall wart, but it's a cheap one and appears to be putting out about 14v. The screen looks best @ 13v on a 5v supply - sam

For power boost, I was thinking of using something like MC33063A, pretty cheap and common DC/DC. There are several online and app calculators available, like this one.   The code is from few posts b

Posted Images

Did you get it to work yet?

I cannot get it to work and I don't even see anything happening on power up.

 

Nope, not yet. I'm working on porting this library, but I'm not quite done yet.

The contrast pin takes up to -10v, so at GND I'm not seeing anything.

 

The only thing I really see working so far is that I'm getting a good status back from the LCD - at least that's working.

 

I've attached what I have so far - in case it's helpful.

T66963c_Driver.zip

Link to post
Share on other sites
Well, I started all wrong. I guess I should have spent more time reading spec sheet.

 

Ok - I made a little progress! I started looking at the contrast issue - since we weren't seeing anything from the LCD. I did a quick search on contrast voltage on Powertip LCD's and ran across this post. It shows how to generate a negative voltage using a 9v battery. At the end of the post, you'll find a diagram. I connected mine through a 100k pot, but have it turned almost all the way off.

 

So - for now - while the Init code is running, I'm seeing random lines appear on the display. It's not what it's supposed to be displaying, but it's something at least. I did find some references to problems with allocating ram. This device has 8k apparently - I've seen a lot of others that have 32k. I also found another reference to someone having trouble using both graphics and text mode at the same time.

Link to post
Share on other sites

I keep my contrast at GND and I can see random lines when reset is held down. I can read status, but the init is not right I guess.

BTW, to get the negative V, you can use charge pump like TC7660, MAX660, MAX680, CAT661, or TPS60403.

 

Below is my test code, do you see anything wrong with it?

I am beginning to wonder if this is a 5V/3.6V issue. After all, when reading status, 5V is applied to data pins (status looks good though.)

 

EDIT: couple of code updates

#include "msp430g2553.h"

int charIndex = 0;

void write(char data, char commandData);
char readStatus();
#define writeData(data) write(data, 0)
#define writeCommand(data) write(data, 1)

#define READPIN BIT3
#define WRITEPIN BIT4
#define ENABLEPIN BIT5
#define CMDDATAPIN BIT6
#define RESETPIN BIT7

void main(void) {
   WDTCTL = WDTPW + WDTHOLD;                 // Stop WDT

   P2SEL &= ~(BIT6|BIT7);				// port 2 all out
   P2DIR = 0xFF;

   P1OUT = 0xFF;
   P1DIR = 0xFF;

   P1OUT &= ~RESETPIN;
   _delay_cycles(1000000);
   P1OUT |= RESETPIN;

   writeData(0x00);
   writeData(0x08);
   writeCommand(0x40);
   writeData(0x0F);
   writeData(0x00);
   writeCommand(0x41);
   writeData(0x00);
   writeData(0x00);
   writeCommand(0x42);
   writeData(0x0F);
   writeData(0x00);
   writeCommand(0x43);
   writeCommand(0xA8);
   writeCommand(0x80);
   writeCommand(0x9F);

   while(1) {

       charIndex = 0;
       while(charIndex < (1024 * 8)) { // fill 8k with...
           writeData(charIndex & 0xFF); // 0-255
           writeCommand(0xC0);
           charIndex++;
       }
       _delay_cycles(1000000);
   }
}

void write(char data, char commandData) {

   //while((readStatus() & 0x03) != 0x03) {} // ignore status for now, just read it
   //;
   readStatus();
   P2OUT = data;
   commandData ? (P1OUT |= CMDDATAPIN) : (P1OUT &= ~CMDDATAPIN);
   P1OUT &= ~(WRITEPIN + ENABLEPIN);
   P1OUT |= ENABLEPIN + WRITEPIN; 
}

char readStatus() {
   char data;
   P2DIR = 0;
   P1OUT |= CMDDATAPIN;
   P1OUT &= ~(ENABLEPIN + READPIN);
   data = P2IN;
   P1OUT |= ENABLEPIN + READPIN;
   P2DIR = 0xFF;
   return data;
}

Link to post
Share on other sites

Little update.

Still no success, will have to check if my 2553 is still functional (data outputs.)

I am wondering if we should first test those displays with a 5V MCU like PIC.

 

That said, I think a backpack is needed, one that will free up some of the outputs and at the same time act as a 3.3V to 5V level shifter. The two chips I have in mind are MCP23S17 (~$1.20) or MSP430F5131 (~$1.75.) Using MSP430F5131 would reduce serial data overhead and make shifting levels much easier.

Link to post
Share on other sites

I'm starting to think you're right. I've got an atmeta328 that I could grab and use the AVR library I was porting. That would at least let me make sure the LCD is functional.

 

Unfortunately, I've only worked with DIP parts, and I haven't found any logic level converters that are DIP and available for samples. I do have some BSS138's that I could use for logic levels, but not enough for 12 pins, although I guess we only need 8 bi-directional.

 

I do have a few PCF8574's on hand and there's already some LP code written. Unfortunately, because they're the same address, I can't use 2 to get the pins I need.

 

I'll see what I can do about getting code for the ATMega set up.

Link to post
Share on other sites

I am already working on a backpack, something similar to this one from Sparkfun, only better :)

I am trying to decide if I should do a dual row only or dual and single and what pinouts to support. For now, I am targeting powertip display only.

BTW, boards might be delayed by week or two due to Chinese New Year.

Link to post
Share on other sites
Unfortunately, I've only worked with DIP parts, and I haven't found any logic level converters that are DIP and available for samples.

 

74HCT family, such as 74HCT244 and 74HCT125 can be used to convert 3V logic to 5V logic. They have TTL thresholds that are compatible with 3V logic even when running from 5V.

 

74AHC family such at 74AHC244 and 74AHC125 can be used to convert 5V logic to 3V logic. They allow the input voltage to exceed the supply voltage, so they can be powered from 3V and accept 5V logic in.

 

I doubt anyone samples these parts, but they are readily available from many sources in DIP packaging.

 

HCT has 3V compatible threshold when powered at 5V

post-2341-135135534399_thumb.png

 

Ordinary HC does not allow input voltage to exceed supply voltage

post-2341-135135534135_thumb.png

AHC allow 5V input at any supply voltage

post-2341-135135534133_thumb.png

Link to post
Share on other sites

I got it working.

At 5V, Vo must be around -13.0, -13.5V

At 3.6V, LCD works OK and Vo has to be -14.0V, -14.5V.

 

@oPossum, that is a good idea, with 2 buffers you can make bi-directional level shifter, just need one with 5V tolerant inputs and one with 5V outputs. 74LCX245 is another possibility.

 

So now instead of backpack, I will be making power supply/level shifter board (or both.)

Link to post
Share on other sites

Wait - you got it working with the LP? Which code did you use? Too bad it was just a contrast issue...

That's a lot of negative voltage. Are you still looking at a charge pump? Doing a quick search for parts, LM337T comes up as a negative voltage generator.

 

Reducing the number of IO lines necessary would be great - but I'd love to at least get it working first.

 

oPossum - thanks for the logic level parts! I'll save those for later.

Link to post
Share on other sites

For power boost, I was thinking of using something like MC33063A, pretty cheap and common DC/DC. There are several online and app calculators available, like this one.

 

The code is from few posts back, all it does is fills memory with some test value.

I will also try to work at 3.6V for now (unless I see some weirdness) and I will be ordering SN74LVC245A to solve the level problem.

 

post-197-13513553441_thumb.jpg

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...