pinout difference of UNO and Duemilanove

Hi, I have a TFT LCD and I found the driver of it on this forum and all works fine when I connect it to my UNO, but if I connect it to my Duemilanove and upload the same code, the display stays white.

Now I'm going to setup a breadboard Arduino and connect this display to it and I want to know how to setup all to have them working. I had success with setting up on the breadboard by this tutorial: http://arduino.cc/en/main/standalone

Some questions please: 1. Why the LCD works with UNO but not with Duemilanove or where could I get pinout difference information? 2. What should I do so that the breadboard setup will work with LCD, i.e. it will be an UNO but not a Duemilanove?

EDIT: My Duemilanove has an Atmega 328P-PU, that's why I expected that the LCD code must run on both

It should be the same on both. The Uno is an updated version of the Duemilanove. How did you test it ? With a breadboard ? Some breadboards have bad contacts. Do you need a lot of current, perhaps that is the difference between the Uno and the Duemilanove.

Something unexpected is going on. The boards are almost identical, only the power/reset/usb-serial section is a little different. And the Uno R3 version has extra I2C pins of course.

http://www.arduino.cc/en/Main/arduinoBoardUno http://arduino.cc/en/Main/arduinoBoardDuemilanove

but if I connect it to my Duemilanove and upload the same code, the display stays white.

Did you change the 'board' setting in the IDE? The bootloaders may be different.

Don

Hi,
Thank you for respond I really need it now!

My Duemilanove and UNO are both standard boards, no breadboard.
Yes, I changed board and port in IDE when switching between them.

My confusion is there alive and bothering: I upload same code to Duemilanove and UNO, no error no where, upload finishes successfully. LCD goes blank on Duemilanove but on UNO works as expected (with all the tests run ok).

I attach output of both Duemilanove and UNO in screenshot.

As you see, in Duemilanove the display control chip is recognized wrong: 101, while by UNO it is recognized correctly, as 7733.

If I run Duemilanove without the LCD stacked on it, the same 101 is there on serial, which means that the display is not seen at all.

The Duemilanove board is healthy and the MCU in both is the same (Atmega328).

What can I test please?

I can think of just one more thing: pin 13 The Duemilanove has a resistor and led, and the Uno is improved and has a logic gate. That means that pin 13 behaves different when it is used an an input pin on the Duemilanove. Do you use it as input pin ?

If that is not the problem, can you make photo's of the boards with the display ?

I don’t think so, because the 13th pin on my LCD connector is connected to SD_SCK, which is responsible for SD-card but I loaded the test program that only tests LCD lines.

Could you suggest any test please that could hopefully reveal what the problem is?

Do you mean that UNO and Duemilanove are fully pin-to-pin compatible and it really MUST work?

I also attach an image of my lcd for reference.

Pin 13 as output for SD_SCK is okay. The Uno and Duemilanove are pin-to-pin compatible.

Could you measure the voltage of the 5V pin and the 3.3V pin on both boards with the display attached ?

The womart displays are on the forum for heaving troubles:

Perhaps there is a difference in power, do you see a potentionmeter ? http://forum.arduino.cc/index.php?topic=147444.msg1149771#msg1149771

For the Arduino Due, someone added code : http://forum.arduino.cc/index.php?topic=167839.msg1249901#msg1249901

Perhaps your Duemilanove has a bad pin, or the display software has something very timing critical.

Thanks Peter_n,

Could you measure the voltage of the 5V pin and the 3.3V pin on both boards with the display attached ? Yes please: UNO: 3vPin output: 4.0v 5vPin output: 4.8v

Due: 3vPin output: 3.3v 5vPin output: 4.7v (all I measured from top of LCD which was stacked, as you kindly instructed)

But isn't it that if power is less than needed, I must have the display black? In my case, in Due the display is full bright white! Only program does not run and in serial I have the output that proves that the display chip is not recognized, which bends reasoning more toward your last point of "pin problem with Due".

Perhaps your Duemilanove has a bad pin, or the display software has something very timing critical. Could be the case, as I'm using this Due board from 2009 up to now. I have yet another custom Arduino board. I made the pcb with my cnc machine and it is a simple chip-driver as suggested in the datasheet without altering anything but only pin-naming for Arduino! I will also replace a brand new Atmega328. I will report the results.

edit: Also, my display has no pot.

Meanwhile if any other test comes to your mind please kindly let me know. Thank you.

I have reburned the bootloaders on my Duemilanovas to be the UNO optiboot so I don't have to change board selections when working with them and they effectively become UNOs on the software side. I can't believe that the different bootloaders are any part of your problem, but if you are out of any other ideas you could try.

I followed this proceedure http://arduino.cc/en/Tutorial/ArduinoISP

The Due is a faster board. Please don't shorten Duemilanove to Due. Someone made it work with the Due by setting the pins extra as output, that means that timing or sequence or voltage level can be critical.

The 4.7V for the Duemilanove is low. I don't run my 5V projects with 4.7V. Can you add a power supply to the power jack. Some displays need 5.0V or maybe 4.9.

A 3.3V pin can never be 4.0V. If that is the case, something is very wrong. But that is with the working Uno ? I'm getting more and more confused.

I can't see the wood because for the trees. If a power supply doesn't help, I would buy a new display from Adafruit, and a new Arduino and get that working.

Peter_n: The Due is a faster board. Please don't shorten Duemilanove to Due. Someone made it work with the Due by setting the pins extra as output, that means that timing or sequence or voltage level can be critical.

The 4.7V for the Duemilanove is low. I don't run my 5V projects with 4.7V. Can you add a power supply to the power jack. Some displays need 5.0V or maybe 4.9.

A 3.3V pin can never be 4.0V. If that is the case, something is very wrong. But that is with the working Uno ? I'm getting more and more confused.

I can't see the wood because for the trees. If a power supply doesn't help, I would buy a new display from Adafruit, and a new Arduino and get that working.

I still did not return to the new test but I sure do, meanwhile I have to say: 1. Yes, the 3.3v pin shows 4v on the "working" UNO (I was surprised too) 2. I have 3 of those LCDs and all showing same effect! 3. absolutely agree: I must switch to my custom Duemilanove and test again and publish results here 4. I will never ever again shorten Duemilanove to Due as you insructed!

Thanks everybody, I'd try to soon return to this post with new information!

Hi, I'm back with another failed test

I again tested the 3v3 pin on my UNO: - when the LCD is NOT connected, it is exactly 3v3 - when the LCD IS connected, it swings between 3v9 to 4v01 constantly

I used my custom Arduino board which is just a chip-driver with the Arduino bootloader running the chip. The LCD didn't work.

I tested (traced) my original Duemilanove and this custom one pin by pin to make sure everything is connected and found no flaws. In both wrods I can upload sketches. I have nothing to suspect with them.

To make more sure about the power issues, I connected the 3v and 5v and GND of the "working UNO" board (which drives LCD correctly) to the LCD and had the GND shared with my custom board which was to run the LCD. Again nothing but a half-bright LCD.

On my Duemilanove and custom boards I have Atmega328 PU and the UNO has Atmega328 AU.

Edit: 1. UNO in serial reads the chip driver correctly as 7783 2. Duemilanove reads the chip driver wrongly as 3703

Could you please give some ideas? I don't know what else to do but really need to make LCDs run on Duemilanove!

Edit: 1. UNO in serial reads the chip driver correctly as 7783 2. Duemilanove reads the chip driver wrongly as 3703

Could you elaborate on what you mean by this?

ardutry:
Sure! Please:

#include <Adafruit_GFX.h>
#include "SWTFT.h"
//...
SWTFT tft;

void setup(void) {
  Serial.begin(9600);
  Serial.println(F("TFT LCD test"));



  tft.reset();

  uint16_t identifier = tft.readID();// !!!!!!!! HERE IT READS THE CHIT DRIVER ID  !!!!!!!!

  
    Serial.print(F("LCD driver chip: "));
    Serial.println(identifier, HEX);
    

  tft.begin(identifier);

  Serial.println(F("Benchmark                Time (microseconds)"));

//...

  Serial.println(F("Done!"));
}

//...

As the seller noted, the real LCD driver is a 7783 one, so UNO finds it correctly. This means that the problem can not be the power but something more evil! I more suspect my old chips.

Also, there are some more point I further found:

  1. my UNO has a 12k crystal while both my custom and original Duemilanove own 16k ones
  2. my UNO is brand new, but both those boards are old and chips (Atmega328 PU) I replace (all those I have) are some years old even though in working state. Maybe there indeed is a problem in all my chips!

To prove this I ordered some Arduino mini boards and they must come in some days and I’d repeat all with them. At least their chip is exactly the same as the one on UNO (328 AU).

Anyway, If you kindly suggest any test I could do to reveal the truth I’d be happily appreciate it.

Edit:
suspicion increased on old chips:
I have some ESP8266 modules. I drived them on UNO and they work as expected. They fail on both my old chips. Perhaps something is wrong by those chips but what? Why for instance my PIR sensor works ok with both UNO and my old boards, but ESP8266 and LCD only with UNO? I don’t have oscilloscope to do proper testing unfortunately.
Best thing is perhaps to receive the mini ones and see their attitude, as I can’t mind other test now!

I can help with this concern of yours:

  1. my UNO has a 12k crystal while both my custom and original Duemilanove own 16k ones

Well first of all they are 12MHz and 16MHz (not KHz).

Your UNO also has a 16MHz crystal or resonator for the Mega328. The 12MHz crystal is for the other processor which deals with the USB interface.

Don

Hello again and thank you all for your support,

I finally did the test with my LCD and a brand new Nano and all ok.

So perhaps my old (2009) Duemilanove has some slight problems that it works with motors, sensors etc. but not with LCDs!

Anyway, as new Nanos work and are cheap to plug in every such project, no question remains.

Thank you again, you all and Arduino!