CFAG320240C : Initialization = Feeling Foolish

YeagerTheCat

New member
Dudes,

I have finally cracked open the delightful CFAG320240C (brimming with expectation) today, attaching it up to an atmega128 sitting in its STK501 test home.

I have trawled the forums for pearls of wisdom and snippets of code, but the screen has made me look foolish unfortunately and I am posting here to admit it.

I am in blank screensville, despite my best efforts. I have tested every connection, I have stepped it all through in the debugger, but it still wants nothing to do with me. I pilfered initialization from the parallel port code example to try and ensure I followed the right path after trying the datasheet examples.

There are three things that let me know I am clearly in trouble:

1. After resetting, a cut down version that attempts to MWRITE a few locations and read them back give me nothing but zeros.
2. Attempting to watch for the status bit (D6) to go high (just looking for signs of life) leads me to see a lot of zeros.
3. Unless E is set high (along with the other characters, A0, RW and CS low), it pulls D0-7 low. When you go to make changes from the micro that involve a whole lot of pins going high on D0-7 before , this sucks enough power to cause my JTAG debugger to lock up and checking it out, it can happily pull down (actually sink would be a better word) a high pin to about 0.01 of a volt. I know it is power related 'cause the I can watch the main power LED on the STK500 dim slightly when it occurs. Should I be putting some series resistance on the data lines?

So there it is... it has humbled me. Here I was feeling all cocky 'cause I recently got a Optex DMF-5xxxx unit yakking with the same equipment. Oh well, if you are going to look stupid, you might as well do it properly.

If anyone has any suggestions and/or have got this lovely screen working with an AVR (not that the processor should really matter), I would be most curious.

I guess I can always make up a parallel cable and try the LCD against that for comparison purposes...


Regards,

Andrew
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 
YeagerTheCat said:
3. Unless E is set high (along with the other characters, A0, RW and CS low), it pulls D0-7 low. [snip] I know it is power related ...
This is most suspicious. I will hazard a guess that the ground connection is bad. Do you have a scope to look at waveforms? You shouldn't need series resistors.
 

YeagerTheCat

New member
No... but I have one on order now.

I will be rechecking all wiring again... and decoupling the daylights out of the screen with every cap I can find.

It looks like it wants to work - I just have to convince it that it can!

Thanks,

Andrew
 

YeagerTheCat

New member
No, the direction is OK. I did some further sluthing...

1. The current draw from the LCD is about 100ma. A AT90CAN128 with external memory and all the other goop is good for about 80.... I was simply getting close to the limit of what the STK power supply was happy ot provide.

2. The behavior of the E line (clock it high and suddenly it doesn't sink all the outputs from the AVR) got me thinking... it was acting like it was really the read/write flag rather than the strobe. Looking at the datasheet:

When the 8080 family interface is selected, this signal acts as the active-LOW read strobe. The
S1D13305 series output buffers are enabled when this signal is active.

Sounds a bit like it no?

3. So what is processor is this board really set to? Well it is the brand new version of the board with the S1D13305 on board and possibly a new PCB design.

From the datasheet again...

SEL1 SEL2* Interface A0 RD WR CS
0 0 8080 family A0 RD WR CS
1 0 6800 family A0 E R/W CS

So I should see SEL1 high.... a quick check of the back of the board shows that in fact both SEL1 and SEL2 are low...

So maybe it is thinking it is in 8080 mode instead of 6800? Well here is hoping!

I am too scared to actually try it...

Regards,

Andrew
 
Good sleuthing. These are the kind of details that would make it difficult for someone to help "remotely".
YeagerTheCat said:
I am too scared to actually try it...
Why? If you were gonna blow it up, that would've happened by now.
 

YeagerTheCat

New member
Victory is mine!

So the latest rev screens indeed play to the 8080 side of the datasheet.

Now that I have it working, it is very nice. I do believe our end user is going to like it, a whole lot. Me likey CFAG320*.

Cheers,

Andrew
 
Top