Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

KS108 128x64 do not Initialize

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

Bascom Member



Joined: 04 May 2017
Posts: 18

germany.gif
PostPosted: Wed Mar 13, 2019 4:20 pm    Post subject: KS108 128x64 do not Initialize Reply with quote

I have the Following problem.

Code:
$regfile = "m128def.DAT"'128L 8Mhz version
$crystal = 7372800
$baud = 19200
$eepleave
$loadersize = 512
$hwstack = 100
$swstack = 75
$framesize = 40
$lib "glcdKS108.lib"                                        'Include the library for the KS-108 controler

Config Porte.4 = Output  
Config Graphlcd = 128 * 64sed , Dataport = Porta , Controlport = Portc , Ce = 0 , Ce2 = 1 , Cd = 2 , Rd = 3 , Reset = 5 , Enable = 4
'The dataport is the portname that is connected to the data lines of the LCD
'The controlport is the portname which pins are used to control the lcd
'CE =CS1  Chip select
'CE2=CS2  Chip select second chip
'CD=Data/instruction
'RD=Read
'RESET = reset
'ENABLE= Chip Enable

Config Adc = Single , Prescaler = Auto , Reference = Internal       'Setting up the a/d convertor
Config Timer1 = Timer , Prescal
......ect....

this is a code sample from the mcs Website to drive a 128x64 KS108 Display with Touchsreen.
Nothing happend. I Soldered a LED for Indication if the MCU is Running or if a Timing issue is there.
But the MCU isnt starting. The LED is still off.

So i make a new Code:

Code:
$regfile = "m128def.DAT" '128L 8Mhz version
$crystal = 7372800
$baud = 19200
$eepleave
$loadersize = 512
$hwstack = 100
$swstack = 75
$framesize = 40
$lib "glcdKS108.lib"                                        'Include the library for the KS-108 controler

Config Porte.4 = Output
Config Graphlcd = 128 * 64sed , Dataport = Porta , Controlport = Portc , Ce = 0 , Ce2 = 1 , Cd = 2 , Rd = 3 , Reset = 5 , Enable = 4
'The dataport is the portname that is connected to the data lines of the LCD
'The controlport is the portname which pins are used to control the lcd
'CE =CS1  Chip select
'CE2=CS2  Chip select second chip
'CD=Data/instruction
'RD=Read
'RESET = reset
'ENABLE= Chip Enable

Do

  Wait 1
  Porte.4 = 1
  Wait 1
  Porte.4 = 0

Loop
End


It still isnt running, till i Comment out the
Code:
'Config Graphlcd = 128 * 64sed , Dataport = Porta , Controlport = Portc , Ce = 0 , Ce2 = 1 , Cd = 2 , Rd = 3 , Reset = 5 , Enable = 4

Now the LED is Blinking without Config Graphlcd.
What is wrong with the Config??

I allready set Fuses:

-ext. Crystal to use a 7,372800 Mhz
-Jtag off
-M103 off

Does anyone have a Clue?

(BASCOM-AVR version : 2.0.8.1 )
Back to top
View user's profile
EDC

Bascom Expert



Joined: 26 Mar 2014
Posts: 572

poland.gif
PostPosted: Wed Mar 13, 2019 6:26 pm    Post subject: Reply with quote

Check wirings once again.
Routines for lcd uses some Status_checking. Status is indicated on the DB7 bit of Dataport.
Routine can wait till this bit is low so..maybe some short to VCC or bad connection.
Back to top
View user's profile Visit poster's website
MichaelB.

Bascom Member



Joined: 04 May 2017
Posts: 18

germany.gif
PostPosted: Wed Mar 13, 2019 6:54 pm    Post subject: Reply with quote

EDC wrote:
Check wirings once again.
Routines for lcd uses some Status_checking. Status is indicated on the DB7 bit of Dataport.
Routine can wait till this bit is low so..maybe some short to VCC or bad connection.


there is no short. When the MCU is Running the DB7 Pin is High Level.
Back to top
View user's profile
Evert :-)

Bascom Expert



Joined: 18 Feb 2005
Posts: 2081

netherlands.gif
PostPosted: Wed Mar 13, 2019 7:54 pm    Post subject: Reply with quote

If you use port A as data port you need to connect AVCC(pin 64) to vcc.

Recheck you wiring again and again.

Share a link to the datasheet of your display.

_________________
www.evertdekker.com Bascom code vault
Back to top
View user's profile Visit poster's website
MichaelB.

Bascom Member



Joined: 04 May 2017
Posts: 18

germany.gif
PostPosted: Wed Mar 13, 2019 8:40 pm    Post subject: Reply with quote

Evert Smile wrote:
If you use port A as data port you need to connect AVCC(pin 64) to vcc.

Recheck you wiring again and again.

Share a link to the datasheet of your display.
Back to top
View user's profile
MichaelB.

Bascom Member



Joined: 04 May 2017
Posts: 18

germany.gif
PostPosted: Wed Mar 13, 2019 8:56 pm    Post subject: Reply with quote

If i Set the Overall Voltage from my Bench Powersupply to 2,56V, the white Stripe is moving from the Left side to the Right side, and repeat it. The only thing i have ever seen moving on this screen ^^
Back to top
View user's profile
Plons

Bascom Member



Joined: 24 May 2005
Posts: 432
Location: Hilversum - The Netherlands

netherlands.gif
PostPosted: Wed Mar 13, 2019 10:06 pm    Post subject: Reply with quote

Michael, you haven't connected pin5, Vo. The voltage on that pin defines the LCD operating voltage. See page 10 of your datasheet.

Nard

_________________
Bascom AVR ver 2.0.8.1
ProtectedParallelPortProgrammingDongle: http://www.aplomb.nl/TechStuff/PPPD/PPPD%20English.html
Dragon-lair: http://www.aplomb.nl/TechStuff/Dragon/Dragon.html
"leef met vlag en wimpel, maar hou het simpel"
Back to top
View user's profile
MichaelB.

Bascom Member



Joined: 04 May 2017
Posts: 18

germany.gif
PostPosted: Wed Mar 13, 2019 10:28 pm    Post subject: Reply with quote

Plons wrote:
Michael, you haven't connected pin5, Vo. The voltage on that pin defines the LCD operating voltage. See page 10 of your datasheet.

Nard


Yes you are right, all the suspect unconnected Pins like VCC , K, A, V0 , Vee ect. are Fixed externally.

I bet it is the wrong Lib for that Display controller. The Datasheet of the LCD shows something like an NT7108, but i can not find it in my Bascom Lib Folder. Confused
I have to see it, before i desolder all to replace a new Mega128L8 Shocked
Back to top
View user's profile
kimmi

Moderator



Joined: 24 Feb 2006
Posts: 1920
Location: Denmark

denmark.gif
PostPosted: Wed Mar 13, 2019 11:12 pm    Post subject: Reply with quote

Check that ALL VCC & GND are connected
see images

_________________
/ Kim
Back to top
View user's profile Visit poster's website MSN Messenger
JC

Bascom Member



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

usa.gif
PostPosted: Sun Mar 17, 2019 7:23 pm    Post subject: Reply with quote

Agree, ALL Vcc, AVcc, and Ground pins need to be connected.

Additionally, the display might require some time for its own boot-up, before the micro sends it initialization code.

It would be appropriate to put:
Waitms 500

or even
Waitms 1000

at the start of the program, before you send the initialization sequence to the display.

Alternatively, you can configure the micro's I/O pins, and then insert the wait before sending the initialization code.

Hi Nard, Haven't seen you around in a while.
Hope all is going well for you.

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

Bascom Member



Joined: 04 May 2017
Posts: 18

germany.gif
PostPosted: Thu Mar 21, 2019 12:22 pm    Post subject: Reply with quote

JC wrote:
Agree, ALL Vcc, AVcc, and Ground pins need to be connected.

Additionally, the display might require some time for its own boot-up, before the micro sends it initialization code.

It would be appropriate to put:
Waitms 500

or even
Waitms 1000

at the start of the program, before you send the initialization sequence to the display.



Thx for the info:
Now just the White Stripe is gone. Stll have a Bluescreen.

I found out that is the wrong Libary for this LCD. I need a Libary for a NT7108C Chipset. But i cant find anywhere a Bascom Libary for that Chipset.
Back to top
View user's profile
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