Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

[closed] Pollin LCD 20*4 SPLC780D1

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

Bascom Member



Joined: 13 Apr 2005
Posts: 89

PostPosted: Sat May 09, 2015 8:51 pm    Post subject: [closed] Pollin LCD 20*4 SPLC780D1 Reply with quote

Hi,

did anyone have any luck getting the LCD to work with BASCOM??

http://www.pollin.de/shop/dt/MjEzOTc4OTk-/Bauelemente_Bauteile/Aktive_Bauelemente/Displays/LCD_Modul_TC2004A_01T.html

I checked all the connections, and the code/pcb has previously been used with a 20*04 by another supplier (Ks077)

I have tried various startup timings and also with/without the chipset=ks077
The contrast interface works, as I can see the two black bars becomming darker slowly

Code:


$regfile = "m32def.dat"
$crystal = 16000000

$swstack = 96
$hwstack = 64
$framesize = 96




'############## LCD Stuff
Dim Bright As Byte
Dim Contrast As Byte
Config Timer1 = Pwm , Prescale = 8 , Compare A Pwm = Clear Up , Compare B Pwm = Clear Down
Config Portc = Output                                       ' lcd
Config Portd.4 = Output
Config Portd.5 = Output

Config Lcd = 20 * 4, chipset= Ks077
Config Lcdbus = 4
Config Lcdpin = Pin , Db4 = Portc.6 , Db5 = Portc.5 , Db6 = Portc.7 , Db7 = Porta.7 , E = Portc.4 , Rs = Portc.3

Dim Si As Byte

Enable Interrupts
Disable Int0
Disable Int1
Disable Int2

'####### Initialize everything
Contrast = 20
Bright=128



Waitms 1500

cls
waitms 100
Initlcd
Waitms 500
Cursor Off
cls

Waitms 500
Start Timer1
ocr1a = contrast
Ocr1b = Bright

Do

'contrast setting loop
for si= 1 to 255

ocr1a=si
locate 1,1
lcd si
locate 2,1
lcd si
locate 3,1
lcd si
locate 4,1
lcd si

waitms 100

next
loop



end




 


(BASCOM-AVR version : 2.0.7.8 )


Last edited by Sebastian.Heyn on Sat May 09, 2015 9:44 pm; edited 1 time in total
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 6198
Location: Holland

blank.gif
PostPosted: Sat May 09, 2015 9:11 pm    Post subject: Reply with quote

when you write
Quote:
I checked all the connections, and the code/pcb has previously been used with a 20*04 by another supplier (Ks077)

you mean you tested THIS pcb with the working ks077 LCD, right?
Or is this a copy of the board? I ask because of the JTAG that could be a problem.
So best to check the fuse bits first for JTAG.

The display itself seems a standard one. Nothing special. The , chipset= Ks077 is not required. Config Lcdbus = 4 is not needed either since you use pinmode.

_________________
Mark
Back to top
View user's profile Visit poster's website
Sebastian.Heyn

Bascom Member



Joined: 13 Apr 2005
Posts: 89

PostPosted: Sat May 09, 2015 9:37 pm    Post subject: Reply with quote

Ok,

I checked the fuses (again, this has cost me 2 working days with another project before Embarassed )


I wonder, as I cannot get any further than the two (l1+l3) black lines, which usually means initialisation wrong, correct??

No. THIS PCB was not tested using another display. Layout is same however. - I checked each pin on the display itself using my scope to see if I had any bad connection or something
Back to top
View user's profile
Sebastian.Heyn

Bascom Member



Joined: 13 Apr 2005
Posts: 89

PostPosted: Sat May 09, 2015 9:43 pm    Post subject: Reply with quote

Hi Albert,

you're my hero. I rechecked the pcb under the microscope.

It works now after removing some flux
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 6198
Location: Holland

blank.gif
PostPosted: Sat May 09, 2015 9:48 pm    Post subject: Reply with quote

if this pcb is not known to be good, i advise to connect it to the known good lcd. you could also connect this new lcd to a working pcb. you then know if the problem is in the lcd or the board/soft.
usually i check all connections one by one with a simple pin that i let toggle ;
do
toggle portc.6 'measure with scope
waitms 500
loop

this is simple but effective. I have pulled out hairs with the STK200 because for some chips the connections are not what you expect. but this simple test procedure solves this.
sometimes a simple ohm meter is ok too ; measure connections one by one. sometimes you get blind when busy for too long.

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

Administrator



Joined: 09 Apr 2004
Posts: 6198
Location: Holland

blank.gif
PostPosted: Sat May 09, 2015 10:01 pm    Post subject: Reply with quote

i see my post crossed yours. but i leave it there for others. these are common problems.
great that you found it. yes flux can be a problem. heard about that before. use 'noclean' type when possible. not an option for production but nice @home.

_________________
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 -> 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