Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

LCD 20x4 problem

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Various
View previous topic :: View next topic  
Author Message
Rens

Bascom Member



Joined: 09 Sep 2010
Posts: 9
Location: Barendrecht

netherlands.gif
PostPosted: Sun Jul 26, 2020 12:49 pm    Post subject: LCD 20x4 problem Reply with quote

Hello,

I am trying to get a type 2004A lcd 20x4 to work on bascom AVR. using a atmega32.
I have tried al the possible commands in bascom AVR (version 2.0.8.1) but have no result.

The display is connected on lines D4 to D7, E and RS. (see the code example)
Is it possible to get this display type to work with only te standard lcd commands?


I hope someone can help me

Rens
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5921
Location: Holland

blank.gif
PostPosted: Sun Jul 26, 2020 2:28 pm    Post subject: Reply with quote

where did you connect WR to?
you can best connect it to ground.

But the problem is most likely the JTAG interface which is on some of the pins you use.
In your code use : DISABLE JTAG

to disable JTAG by software.
Or as an option change the fuse bit to disable JTAG

_________________
Mark
Back to top
View user's profile Visit poster's website
Rens

Bascom Member



Joined: 09 Sep 2010
Posts: 9
Location: Barendrecht

netherlands.gif
PostPosted: Sun Jul 26, 2020 3:54 pm    Post subject: Reply with quote

Hello Albertsm,

Yes i have connected WR to ground and also D0 up to D3.
I have tried the Disable Jtag command you mentioned and removed the Jtag fusebit with my kamprog programmer, still no result.

When i search for documentation of the type 2004A lcd i find it contains a KS0073 chipset.
This is not one of the options in Bascom AVR.

So i still wonder what commands to use 20x4 or 20x4A, and if i can use the KS077 chipset.


Rens
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5921
Location: Holland

blank.gif
PostPosted: Sun Jul 26, 2020 6:53 pm    Post subject: Reply with quote

you best post a link to a PDF of the LCD.
Most text LCD are compatible.

Then i do not know the hardware you use but it is always a good idea to measure the wiring with a DVM.
Then you can test all used pins. for example Db4 = Portc.0

make some code :

config portC.0=output

do
toggle portc.0
waitms 100
loop

then check if the port pin actually toggles. check with a DVM or a led with series resistor

then there is the matter of contrast : do you see something or nothing? and is the contrast properly adjusted?

_________________
Mark
Back to top
View user's profile Visit poster's website
Rens

Bascom Member



Joined: 09 Sep 2010
Posts: 9
Location: Barendrecht

netherlands.gif
PostPosted: Sat Aug 01, 2020 5:26 pm    Post subject: Reply with quote

Hello Albertsm,

Solved the problem.

I found a bad connection and a wrong contrast setting.
The lcd functions propperly now
with the settings lcdtype 20x4 and the lcdpin command.

Thanks for your input.
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5921
Location: Holland

blank.gif
PostPosted: Sun Aug 02, 2020 7:36 pm    Post subject: Reply with quote

thanks for the feedback. these kind of errors happen more often then you might think.
_________________
Mark
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Various 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