View previous topic :: View next topic |
Author |
Message |
joelinacio
Joined: 16 Sep 2004 Posts: 9 Location: Brasil
|
pic16f916 lcd driver and 7-segment display |
Posted: Wed Sep 07, 2016 8:18 am |
|
|
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: 19496
|
|
Posted: Wed Sep 07, 2016 8:48 am |
|
|
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
|
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9221 Location: Greensville,Ontario
|
|
Posted: Wed Sep 07, 2016 5:28 pm |
|
|
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: 19496
|
|
Posted: Thu Sep 08, 2016 1:51 am |
|
|
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: 9221 Location: Greensville,Ontario
|
|
Posted: Thu Sep 08, 2016 4:52 am |
|
|
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
|
|
Posted: Thu Sep 08, 2016 5:55 am |
|
|
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: 9221 Location: Greensville,Ontario
|
|
Posted: Thu Sep 08, 2016 9:59 am |
|
|
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: 19496
|
|
Posted: Mon Sep 12, 2016 7:45 am |
|
|
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. |
|
|
|