View previous topic :: View next topic |
Author |
Message |
anuragtiwari
Joined: 01 Aug 2013 Posts: 8
|
interfacing lcd with pic 16f684 |
Posted: Sun Aug 04, 2013 1:02 am |
|
|
guys help me to interface a 2x16 lcd .....with 16f684.....
can somebody help me..????? |
|
![](templates/subSilver/images/spacer.gif) |
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
|
Posted: Sun Aug 04, 2013 3:47 am |
|
|
We need more information, LCD type, compiler version.
Read the forum guidelines.
Show us what you've done/tried.
Do a search on this forum, it's been done loads of times before.
Mike |
|
![](templates/subSilver/images/spacer.gif) |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
![](templates/subSilver/images/spacer.gif) |
anuragtiwari
Joined: 01 Aug 2013 Posts: 8
|
|
Posted: Sun Aug 04, 2013 2:04 pm |
|
|
@PCM_PROGRAMMER
thanks very much sir......................
may god bless you.....
i had a little question regarding 7 segment led ... i am not able to interface it with 16f684......
Code: |
#include <16f684.h>
#fuses NOWDT
#use delay(clock=4M)
void main()
{
do
{ output_high(PIN_C0); // a
output_low(PIN_C1); // b
output_low(PIN_C2); // c
output_high(PIN_C3); // e
output_high(PIN_C4); // f
output_high(PIN_C5); // g
output_low(PIN_A0); // d
}
while(1==1);
} |
i wanted to create a look up table and interface ....it with the pic....but i am not getting the concept right.....
please help..... |
|
![](templates/subSilver/images/spacer.gif) |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
![](templates/subSilver/images/spacer.gif) |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
![](templates/subSilver/images/spacer.gif) |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
![](templates/subSilver/images/spacer.gif) |
temtronic
Joined: 01 Jul 2010 Posts: 9174 Location: Greensville,Ontario
|
|
Posted: Sun Aug 04, 2013 3:11 pm |
|
|
think of a 7 segment display being just 7 LEDS in one package. Depending on which ones you turn on, numbers and letters can be displayed.
step one. You need to know whether you hve a common anode or common cathode type of LED display.
step two. If common cathode, then you'll need a 330-500r series resistor between each PIC output pin and the segments( a,b...f)
step three. If common cathode, setting the PIC pin high will turn on the LED segment. Confirm this for all 7 segments.
step 4. create a 'digits' table with '1' being segments 'b' and 'c'.
Manually set the appropriate PIC pins high to confirm you're correct.
step 5. repeat for the digits 0,1,2,...9. test and confirm
There are probably several 'threads' about 7 segement displays here, practice using the 'search' feature to find them.
hth
jay |
|
![](templates/subSilver/images/spacer.gif) |
ezflyr
Joined: 25 Oct 2010 Posts: 1019 Location: Tewksbury, MA
|
|
Posted: Sun Aug 04, 2013 8:11 pm |
|
|
Hi anuragtiwari,
It would be really helpful if you could tell us if you are implementing the 2x16 LCD, and the 7 segment LED in real hardware, or in a Proteus simulation?
Thanks,
John |
|
![](templates/subSilver/images/spacer.gif) |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Aug 04, 2013 8:46 pm |
|
|
Also tell us why, if we give you one solution (such as the Flex driver for
a 16x2 lcd), you immediately give up on that and ask for a driver for
a different type of display (7-segment LED). |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19369
|
|
Posted: Mon Aug 05, 2013 12:29 am |
|
|
Also, have you actually proved your chip is running?. Flash an LED test.
The code posted does not tell the chip what oscillator to use.
With PIC's there are many different oscillator selections. Ranging from just half a dozen, to some chips with literally dozens. The first critical thing in any program, is to make sure you are setting up the oscillator correctly. Hence the repeated suggestions here to do the 'flash an LED' test.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
|