Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

LCD connections

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-8051 Archive
View previous topic :: View next topic  
Author Message
rosco

Bascom Member



Joined: 14 Jul 2004
Posts: 3
Location: UK

uk.gif
PostPosted: Wed Jul 14, 2004 11:23 am    Post subject: LCD connections Reply with quote

Hi,
I have a PCB with the LCD R/W line connected to a Port pin. It is used in 4bit mode. Is there a way to reset this Port pin (R/W = 0) before attempting to perform the Config Lcd function so that it will work ok? It works fine with the R/W line hardwired to 0v.

I need to do this to avoid cutting tracks. Crying or Very sad

Regards Ross
Back to top
View user's profile
Vilko

Bascom Member



Joined: 25 May 2004
Posts: 190
Location: Ljubljana, Slovenia

slovenia.gif
PostPosted: Thu Jul 15, 2004 7:18 am    Post subject: How about Reply with quote

Hi,

Well how about

portpin = 0

if it does not work, then simply hard connect R/W to GND, it will not harm portpin at all. (I think)

Vilko
Back to top
View user's profile
rosco

Bascom Member



Joined: 14 Jul 2004
Posts: 3
Location: UK

uk.gif
PostPosted: Thu Jul 15, 2004 10:07 am    Post subject: Reply with quote

Thanks Vilko

I have allready tried that, both as a BASIC and assembler command but neither work.

I think the compiler must perform the "Config Lcd" first and then sort the rest of the code.
If I connect my scope to the LCD E & R/W pins I can see the E line active high pulses before the R/W line is driven low, allthough the instruction to reset the portpin is placed before the "Config Lcd".

You are right though, it is probably ok to tie the pin to ground, especially if I reset it in my program. It is only like using it as an input.

Ross
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5925
Location: Holland

blank.gif
PostPosted: Sun Jul 18, 2004 11:53 pm    Post subject: Reply with quote

Set the pin to 0, and use LCDINIT command to re-init the display.
_________________
Mark
Back to top
View user's profile Visit poster's website
rosco

Bascom Member



Joined: 14 Jul 2004
Posts: 3
Location: UK

uk.gif
PostPosted: Mon Jul 19, 2004 9:12 am    Post subject: Reply with quote

Thank you Mark, I knew I had seen a way to do it. Just could not remember where!

As usual a case of RTFM. (Read The Flipping Manual).

Regards Ross
Back to top
View user's profile
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-8051 Archive 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