View previous topic :: View next topic |
Author |
Message |
Rens
Joined: 09 Sep 2010 Posts: 9 Location: Barendrecht
|
Posted: Sun Jul 26, 2020 12:49 pm Post subject: LCD 20x4 problem |
|
|
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 |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5922 Location: Holland
|
Posted: Sun Jul 26, 2020 2:28 pm Post subject: |
|
|
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 |
|
|
Rens
Joined: 09 Sep 2010 Posts: 9 Location: Barendrecht
|
Posted: Sun Jul 26, 2020 3:54 pm Post subject: |
|
|
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 |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5922 Location: Holland
|
Posted: Sun Jul 26, 2020 6:53 pm Post subject: |
|
|
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 |
|
|
Rens
Joined: 09 Sep 2010 Posts: 9 Location: Barendrecht
|
Posted: Sat Aug 01, 2020 5:26 pm Post subject: |
|
|
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 |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5922 Location: Holland
|
Posted: Sun Aug 02, 2020 7:36 pm Post subject: |
|
|
thanks for the feedback. these kind of errors happen more often then you might think. _________________ Mark |
|
Back to top |
|
|
|