Gadgetoid / doglcd-arduino

Automatically exported from code.google.com/p/doglcd
0 stars 0 forks source link

doglcd.h doesn't work with MEGA2560 (works with arduino leonardo) #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.hook up M163 using 4 wire interface to D2-D5 on the Leonardo.
2.Assign pins and print hello world. - Works
3.hook up M163 using same 4 wires on same digital pins D2-D5 on MEGA2560 - 
Doesn't work.  Blank display

What is the expected output? What do you see instead?
Hello World

What version of the product are you using? On what operating system?
Dated 1/7/14

Please provide any additional information below.
I have created a sketch to toggle D2-D5 (digitalWrite (2,X)) and this works on 
both boards.

Original issue reported on code.google.com by chalon...@gmail.com on 29 Jan 2015 at 11:28

GoogleCodeExporter commented 9 years ago
Hi chalon226,
I'm sorry I will probably not be able to help on this, since I have no access 
to a 2560. A have no idea why the library should not work on a 2560 since it 
runs at the same clock-speed as the Leonardo. So there should not be a timing 
issue in the code.

I guess you don't have access to a logic analyzer to look at the output signals 
on the pins? 
There is a way to turn a Leonardo into a simple logic analyzer, but this is a 
time consuming task and I don't know how badly you need the lib to work on the 
MEGA2560.

http://letsmakerobots.com/node/31422

Sorry,I don't have better news for you...

Original comment by e.fa...@wayoda.org on 30 Jan 2015 at 9:43

GoogleCodeExporter commented 9 years ago
Would you have time if I lent you a MEGA2560 to look at the problem?  I would 
be happy to send you a board.

Thanks,
Bob

Original comment by chalon...@gmail.com on 30 Jan 2015 at 3:59

GoogleCodeExporter commented 9 years ago
I would have time to do this, but since the library code itself is pretty 
simple im what it does (toggles a few pins) I doubt that the problem lies in 
the library itself.
So before you invest extra time and money lets try to fix this without the 
mailman.

I just connected my DOG-M163 to a Nano and ran the Sketch from the attached 
file.

Pins used :
2 - SI
3 - Clk
4 - RS
5 - CSB

Optional pins are used for the Reset and Backlight signals. 
11 - Reset
12 - Backlight 

The Backlight handling in the library has nothing to do with the way the code 
talks to the device, so it cannot cause your problem. If your hardware does not 
support Backlight switching thats also fine.

If you don't use a pin for the Reset thats another story:
the Reset (pin 40 on the lcd) must be connected to +5V when you don't toggle it 
from an arduino pin. 

Can you try the sketch from the attachment on your boards? 
Debuggung is much easier when we talk about the same codebase.

Eberhard

Original comment by e.fa...@wayoda.org on 30 Jan 2015 at 8:45

Attachments:

GoogleCodeExporter commented 9 years ago
Hoo! I completly forgot about the old Arduino MEGA I had lying around in one of 
the lower desk drawers. 
Its from the first run made by the Arduino team with an ATMega1280 processor 
instead of the 2560 you have. But it runs the example sketch just like the 
Nano. 

Original comment by e.fa...@wayoda.org on 30 Jan 2015 at 9:55

GoogleCodeExporter commented 9 years ago
I used your .ino file and I am getting the same results.  I looked and the pins 
using a two channel oscope and they look the same on either board when running 
but the display doesn't work on the MEGA2560.  I did do a sanity check and can 
blink the led on the MEGA2560.  I also tried using different pins on the 
MEGA2560.  If you don't mind I will package up the display, Leonardo, and 
MEGA2560 and send them to you.  Can you send me your address?  I'll send them 
UPS with a return label.

Thanks,
Bob

Original comment by chalon...@gmail.com on 2 Feb 2015 at 7:22

GoogleCodeExporter commented 9 years ago
Hi Eberhard,

Any chance I can get your help testing this out?  I have ordered a logic 
analyzer unfortunately it will be a couple weeks for delivery.
Bob

Original comment by chalon...@gmail.com on 5 Feb 2015 at 6:51

GoogleCodeExporter commented 9 years ago
It's much better to invest your money in a logic analyzer than to spend it on 
shipping the board to Germany.

What type of LA did you order, I use a Salea and a Logic Sniffer. I can send 
you some screenshots of the kind of signals you'd expect to see on the SPI 
signal lines.

Let's move the conversation to e-mail : e.fahle@wayoda.org

Cheers
Eberhard 

Original comment by e.fa...@wayoda.org on 5 Feb 2015 at 9:10

GoogleCodeExporter commented 9 years ago
I ordered the Salea Logic Pro 8.  I have verified witht a second MEGA2560 that 
there seems to be in issue with the LCD library or possibly with the MEGA2560 
bootloader.  I will have to wait and see.
Thanks,
Bob

Original comment by chalon...@gmail.com on 6 Feb 2015 at 4:06

GoogleCodeExporter commented 9 years ago
Can I ask you also how I would access one of the other characters available in 
the DOGLCD controller?  I would like to use the character >> which is an ascii 
character in their documentation.  Do I need to use create character?
Thanks,
Bob

Original comment by chalon...@gmail.com on 6 Feb 2015 at 4:26

GoogleCodeExporter commented 9 years ago
"Can I ask you also how I would access one of the other characters available in 
the DOGLCD controller?  I would like to use the character >> which is an ascii 
character in their documentation. "

No you can do something like this:

// this is the arrows pointing left use 0xfc for left pointing arrows
char c=(char)0xfb;
lcd.print(c);

The build in characters of the displays are roughly latin1 but when the 
japanese characters start the symbols like « are not in there usual places, so 
you can't simply copy  the character into your code. 

Eberhard

P.S. Please if there are more questions ask them through e-mail 
"e.fahle@wayoda.org" 

Original comment by e.fa...@wayoda.org on 6 Feb 2015 at 5:10

GoogleCodeExporter commented 9 years ago
The issue was moved to github:
https://github.com/wayoda/DogLcd/issues/2

Google code is shutting down, if there is an update on this please report it 
until April 30 2015. 
If there is no more feedback I will close the issue May 1'st.

Original comment by e.fa...@wayoda.org on 3 Apr 2015 at 10:23