View previous topic :: View next topic |
Author |
Message |
Hypno
Joined: 27 Dec 2005 Posts: 12 Location: Lublin
|
Posted: Tue Nov 13, 2018 9:45 am Post subject: Arduino Mega2560 + LCD Keypad Shield |
|
|
Hello,
I have a problem with running it would seem a simple thing. I want to use the Mega2560 and LCD Keypad Shield. And I can not run the LCD ... The program is compiling, however, after loading the LCD does not work.
The Arduino documentation shows that the LCD is connected via digital pins 4, 5, 6, 7, 8 and 9. Translating this on the ports of the Mega2560 processor comes out that in the LCD configuration I should use: PG5, PE3, PH3, PH4, PH5 and PH6 . After entering the appropriate ports and compiling the program, the LCD does not work. Lights up but does not display any characters. Of course, in the same set when I am loading an Arduino sketch, everything works perfectly.
I have a lot of my own programs for years written in BASCOM, I got used to it and I do not want to give up, and here a simple thing stopped me.
Does anyone have any idea what's going on? |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5921 Location: Holland
|
Posted: Tue Nov 13, 2018 10:09 am Post subject: |
|
|
When you post for help, you should wonder if you post enough information so you can get help.
at least you should post your code (in code tags). that is the very minimum.
then it will also help to post a circuit or part of the circuit. especial when dealing with arduino hardware.
and you should have performed a test for the used pins. if you think pg5 is used, just make it toggle and connect a LED to see if it does.
in short you should do maximum your best to provide the readers all the info there is. no room for guessing. _________________ Mark |
|
Back to top |
|
|
Hypno
Joined: 27 Dec 2005 Posts: 12 Location: Lublin
|
Posted: Tue Nov 13, 2018 11:31 am Post subject: |
|
|
I will do it, please do not feel sorry for me. I was digging through the Internet for a week, and in all available Arduino documents with pin mapping, I had the same information. In the examples of BASCOM for Arduino Uno everything was also right. I did not think about checking the correctness of the Arduino documentation. And the definition of LCD in BASCOM is so trivial that I considered it an abuse to paste such code .... |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5921 Location: Holland
|
Posted: Tue Nov 13, 2018 2:38 pm Post subject: |
|
|
while trivial it is really required. my guess is that you do not take into account the WR. but i do not like to guess. _________________ Mark |
|
Back to top |
|
|
Hypno
Joined: 27 Dec 2005 Posts: 12 Location: Lublin
|
Posted: Tue Nov 13, 2018 3:04 pm Post subject: |
|
|
Yes you are right, WR is permanently connected to GND in this schield. I was already thinking about it. However, I would like to avoid PCB modifications. |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5921 Location: Holland
|
Posted: Tue Nov 13, 2018 3:13 pm Post subject: |
|
|
you best do the toggle test, then when that is ok and you are sure that it is wired as in the CONFIG LCD, share this info here.
something else : make sure the $crystal matches the actual processor clock. when you set it to say 1 mhz and it is actual higher, the timing will not be right.
but the toggle test will reveal that quickly when using 1000 mS delay. _________________ Mark |
|
Back to top |
|
|
Hypno
Joined: 27 Dec 2005 Posts: 12 Location: Lublin
|
Posted: Tue Nov 13, 2018 3:21 pm Post subject: |
|
|
I will try to do it tonight. The frequency of the oscillator was also checked and the setting fuse bit for the clock. Everything is OK here. As you wrote, I will check everything to be sure on the LED. |
|
Back to top |
|
|
|