Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Grphic ldc dogm132-5

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

Bascom Member



Joined: 02 Mar 2018
Posts: 31

germany.gif
PostPosted: Sun Mar 12, 2023 3:42 pm    Post subject: Grphic ldc dogm132-5 Reply with quote

HI,

I tried to use the EA DOGM132-5 display. I found the lib glcdEADOGM132x32.lib and included it.
Now, I don't know how to configure.

I used instead of the 132-32-lib: "glcdeadogm128x6.lbx"
If I use the lib "glcdEADOGM132x32.lib", the config statement accepts the "Graphlcd = 128 * 64eadogm", but this may configure the wrong pixel room. I cannot find a configure parameter for "132*32".

Cls works anyway, Pin assignment may be correct. But there doen't appear the Hello world in the upper left corner. Instead of the text there are random pixels over the whole display. But they disapear after about 200ms and the display is cleared.

Can someone please give me an info, how to use the EA DOGM132-5 Display?

This ist my code:
Code:

$regfile = "m328pdef.dat"
$crystal = 8000000
$hwstack = 30
$swstack = 16
$framesize = 40

Config Portb.1 = Output
Config Portb.2 = Output
Config Portb.3 = Output
Config Portb.4 = Output
Config Portb.5 = Output

$lib "glcdeadogm128x6.lbx"
Config Graphlcd = 128 * 64eadogm , Si = Portb.1, Sclk = Portb.2 ,  A0 = Portb.3,  Rst = Portb.4, Cs1 = Portb.5

Initlcd
Cls
locate 1,1        
lcd "Hello world"

do:loop
 


(BASCOM-AVR version : 2.0.8.3 , Latest : 2.0.8.5 )

_________________
CU
Manfred
Back to top
View user's profile Visit poster's website
JC

Bascom Member



Joined: 15 Dec 2007
Posts: 623
Location: Cleveland, OH

usa.gif
PostPosted: Sun Mar 12, 2023 6:16 pm    Post subject: Reply with quote

I am not familiar with that display, but...

Many displays require time to power up and initialize themselves.

For a test, for now, I would put a 2 Second delay after the power up, BEFORE any other code.

I would also put a 2 Second delay after the config command, BEFORE you then send commands to the display.

See if that helps, and then shorten the delays once it works, if that helps to solve the problem.

JC
Back to top
View user's profile Visit poster's website
kartmanne

Bascom Member



Joined: 02 Mar 2018
Posts: 31

germany.gif
PostPosted: Sun Mar 12, 2023 6:26 pm    Post subject: Reply with quote

HI,

no, delays do not change the behavior.

Some time (years....) ago I used the EA DOGM128-6. There were no delays necessary.

Edit: Both use the same lcd-chip ST7565r

hmmm.

_________________
CU
Manfred
Back to top
View user's profile Visit poster's website
musterkonsument

Bascom Member



Joined: 26 Nov 2005
Posts: 3
Location: Illertissen

germany.gif
PostPosted: Sun Mar 12, 2023 11:02 pm    Post subject: Reply with quote

Hi kartmanne,
i miss the fontdefinition. See Samples \ LCDGRAPH \ EADOGM132x32.bas
Musterkonsument
Back to top
View user's profile Visit poster's website
kartmanne

Bascom Member



Joined: 02 Mar 2018
Posts: 31

germany.gif
PostPosted: Mon Mar 13, 2023 10:25 am    Post subject: Reply with quote

HI,

setfont: Yes, that's it.

And thanks for proposing the \ LCDGRAPH \ EADOGM132x32.bas

I checked, now: There are only about 60% dirs and files in my BASCOM folder compared to the older version folders - and no samples dir. Don't know, why. I had some trouble to update from 2.0.8.3 to 2.0.8.5. The 2.0.8.5 doesn't recognize my full licence, so I use the former 2.0.8.3. May be within this trouble there went something wrong.
I copied all missing files and dirs in my 2.0.8.3 installation folder - and... hu... I found the EADOGM132x32.bas Smile

Sorry gents for your time.

_________________
CU
Manfred
Back to top
View user's profile Visit poster's website
kartmanne

Bascom Member



Joined: 02 Mar 2018
Posts: 31

germany.gif
PostPosted: Sun Mar 19, 2023 11:39 am    Post subject: Reply with quote

hI,

did some tests. There is a effect which makes me little bit nervous.
I connected the 132-5 to the STK500, using a atmega328p. The display is powered by a LDO3.3V which is powered by the 5V of the STK500.
The controlling signals (RST,A0,...) are connected via a "level"-shifter made with two Rs: signal-1k-display-2k-GND.

After programming the atmega with bascom avr - the display shows what is programmed. ok.
After pressing the reset button on the skt500 - the display shows what is programmed. ok.
But after alternating the main switch of the STK500 (incl. some waiting to let the STK500 power down) - the display is fully filled chars. I can see, that there will be the programmed Text sent, but the text looks like random pixels.

I used the sample 132x32.bas from the samples folder and adopted some ports because the A-ports of the 324p are not available on the 328p.

Do you know this effect?

If it depends on the STK500 - I can live with. But I'm afrait the same behavior will happen on my target electronics...

Code:

$prog &HFF , &HE2 , &HD0 , &HF8                             ' generated. Take care that the chip supports all fuse bytes.
$regfile = "m328pdef.dat"
$crystal = 8000000
$hwstack = 40
$swstack = 40
$framesize = 40

$lib "glcdEADOGM132x32.lib"
$lib "GLCDSED.lib"
Wait 3
Config Graphlcd = 128x64eadogm , Cs1 = Portb.2 , A0 = Portb.1 , Si = Portb.4 , Sclk = Portb.0 , Rst = Portb.3
Setfont Font8x8
Initlcd
Cls
Do
   Lcdat 1 , 1 , "---123---"
   Wait 1
   Lcdat 1 , 1 , "XXX...XXX"
   Wait 1
Loop
$include "font8x8.font"  
 

_________________
CU
Manfred
Back to top
View user's profile Visit poster's website
musterkonsument

Bascom Member



Joined: 26 Nov 2005
Posts: 3
Location: Illertissen

germany.gif
PostPosted: Sun Mar 19, 2023 11:52 am    Post subject: Reply with quote

Hi,

why the second $lib "GLCDSED.lib"?
I use no STK500.

CU
Hans-Werner
Back to top
View user's profile Visit poster's website
kartmanne

Bascom Member



Joined: 02 Mar 2018
Posts: 31

germany.gif
PostPosted: Sun Mar 19, 2023 12:34 pm    Post subject: Reply with quote

HI,

doesn't matter if the 2nd lib active or not. This was just a trial. Effect is the same.

_________________
CU
Manfred
Back to top
View user's profile Visit poster's website
kartmanne

Bascom Member



Joined: 02 Mar 2018
Posts: 31

germany.gif
PostPosted: Sun Mar 19, 2023 2:18 pm    Post subject: Reply with quote

HI,

step forward....

Looks like it is a problem with the font8x8. If I use the my6_8.font - the effect is not there. Same with my16x12.font. I tried some TT-Fonts - effect occurs.

I try to research for the reasons. If I can solve, I'll post here. But I'll not spend too much time...

_________________
CU
Manfred
Back to top
View user's profile Visit poster's website
Evert :-)

Bascom Expert



Joined: 18 Feb 2005
Posts: 2163

netherlands.gif
PostPosted: Mon Mar 20, 2023 9:34 pm    Post subject: Reply with quote

Try to increase your stack.
Code:
$hwstack = 40
$swstack = 40
$framesize = 40
 

Stack is very low for an application with display

_________________
www.evertdekker.com Bascom code vault
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 -> BASCOM-AVR 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