CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

pic16f916 lcd driver and 7-segment display

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
joelinacio



Joined: 16 Sep 2004
Posts: 9
Location: Brasil

View user's profile Send private message Send e-mail MSN Messenger

pic16f916 lcd driver and 7-segment display
PostPosted: Wed Sep 07, 2016 8:18 am     Reply with quote

Is possible to use the internal lcd module to drive 7-segment displays in multiplexed mode? I don't have the 16f916 to test it. Thanks.
Ttelmah



Joined: 11 Mar 2010
Posts: 19508

View user's profile Send private message

PostPosted: Wed Sep 07, 2016 8:48 am     Reply with quote

That's a read the data sheet one....

Does depend on the actual layout of your display, but:
Code:

Up to four commons:
- Static (1 common)
- 1/2 multiplex (2 commons)
- 1/3 multiplex (3 commons)
- 1/4 multiplex (4 commons)


Up to 15 segments on this chip (seg16, is shared with com3), so you could have a four digit display with four commons, and seven segments, using just eleven pins. If you have a part number for the display, we could then check the data sheet for this.
joelinacio



Joined: 16 Sep 2004
Posts: 9
Location: Brasil

View user's profile Send private message Send e-mail MSN Messenger

PostPosted: Wed Sep 07, 2016 5:14 pm     Reply with quote

I'm worry with the current. Lcd's have low consumption...what type? cathode or anode common?
http://circuitdigest.com/article/7-segment-display
temtronic



Joined: 01 Jul 2010
Posts: 9226
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Sep 07, 2016 5:28 pm     Reply with quote

you'll have to use transistor buffers for the 'digit' lines.
good news is you're not the first guy who'se thought of it so
Use Google and you'll find a guy who did a similar setup for a 'watch'.

My concern is that it may be easier code to not use the LCD peripheral of the PIC. Many have 'muxed' 4 digit LED displays that way.

Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19508

View user's profile Send private message

PostPosted: Thu Sep 08, 2016 1:51 am     Reply with quote

I must admit I assumed you were talking about a 7 segment LCD. You don't say 'LED' anywhere.

No. Multiplexed LCD's have a stepped output voltage. Four steps for 1/4 mux. Not suitable to drive LED's.

Honestly use the peripheral for what it is designed for. If you want to drive multiplexed 7 segment LED's, then there have been loads of code examples here....
temtronic



Joined: 01 Jul 2010
Posts: 9226
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Sep 08, 2016 4:52 am     Reply with quote

hmm..pretty sure I read in the datasheet that the PIC can be configured for different 'step voltage' ''formats", including basic 'on-off' mode. I've never played with one even though I bought raw LCD displays, sigh decades ago.
Too many projects..too little time.
Once the 2by16 LCD modules came out it's been easier all around(mfr/code/HW) to use them ! Now I just use 4x20 displays.With 'big character/number' capability it's a lot easier for me to read stuff across the room.

Jay
joelinacio



Joined: 16 Sep 2004
Posts: 9
Location: Brasil

View user's profile Send private message Send e-mail MSN Messenger

PostPosted: Thu Sep 08, 2016 5:55 am     Reply with quote

I am using 7-segments led displays in project. I have the same project using 16f873. If possible, I will try to change to 916. The state machine to multiplex the 4 displays use a lot of resources...
temtronic



Joined: 01 Jul 2010
Posts: 9226
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Sep 08, 2016 9:59 am     Reply with quote

One option to reduce 'resources' is to 'outsource' the display to a separate PIC ! Any 18 pin PIC will work, 11 pins for the 4 -7 segment displays and 1 for the UART to receive data from the 'master' PIC.
While it does add $1 to the project, you do get a 'stand alone' 4 digit display module that can be used for any other future projects, even a PC could send data to it !
This is what the mfrs that make the LCD modules have done, embedded a micro on their LCD unit to simplify connecting to 'anything'.

Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19508

View user's profile Send private message

PostPosted: Mon Sep 12, 2016 7:45 am     Reply with quote

temtronic wrote:
hmm..pretty sure I read in the datasheet that the PIC can be configured for different 'step voltage' ''formats", including basic 'on-off' mode. I've never played with one even though I bought raw LCD displays, sigh decades ago.
Too many projects..too little time.
Once the 2by16 LCD modules came out it's been easier all around(mfr/code/HW) to use them ! Now I just use 4x20 displays.With 'big character/number' capability it's a lot easier for me to read stuff across the room.

Jay


This is determined by the multiplex setting used. For four digit multiplex, 1/4.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
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


Powered by phpBB © 2001, 2005 phpBB Group