Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Arduino Mega2560 + LCD Keypad Shield

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-ARDUINO
View previous topic :: View next topic  
Author Message
Hypno

Bascom Member



Joined: 27 Dec 2005
Posts: 4
Location: Lublin

poland.gif
PostPosted: Tue Nov 13, 2018 9:45 am    Post subject: Arduino Mega2560 + LCD Keypad Shield Reply with quote

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
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 4660
Location: Holland

blank.gif
PostPosted: Tue Nov 13, 2018 10:09 am    Post subject: Reply with quote

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
View user's profile Visit poster's website
Hypno

Bascom Member



Joined: 27 Dec 2005
Posts: 4
Location: Lublin

poland.gif
PostPosted: Tue Nov 13, 2018 11:31 am    Post subject: Reply with quote

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
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 4660
Location: Holland

blank.gif
PostPosted: Tue Nov 13, 2018 2:38 pm    Post subject: Reply with quote

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
View user's profile Visit poster's website
Hypno

Bascom Member



Joined: 27 Dec 2005
Posts: 4
Location: Lublin

poland.gif
PostPosted: Tue Nov 13, 2018 3:04 pm    Post subject: Reply with quote

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
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 4660
Location: Holland

blank.gif
PostPosted: Tue Nov 13, 2018 3:13 pm    Post subject: Reply with quote

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
View user's profile Visit poster's website
Hypno

Bascom Member



Joined: 27 Dec 2005
Posts: 4
Location: Lublin

poland.gif
PostPosted: Tue Nov 13, 2018 3:21 pm    Post subject: Reply with quote

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
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-ARDUINO All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum