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 support@ccsinfo.com

interfacing lcd with pic 16f684

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



Joined: 01 Aug 2013
Posts: 8

View user's profile Send private message

interfacing lcd with pic 16f684
PostPosted: Sun Aug 04, 2013 1:02 am     Reply with quote

guys help me to interface a 2x16 lcd .....with 16f684.....
can somebody help me..?????
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

PostPosted: Sun Aug 04, 2013 3:47 am     Reply with quote

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
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Aug 04, 2013 11:50 am     Reply with quote

Quote:
help me to interface a 2x16 lcd

Use the flex lcd driver:
http://www.ccsinfo.com/forum/viewtopic.php?t=24661

If you have problems, read all the links in this post:
http://www.ccsinfo.com/forum/viewtopic.php?t=32244&start=6
anuragtiwari



Joined: 01 Aug 2013
Posts: 8

View user's profile Send private message

PostPosted: Sun Aug 04, 2013 2:04 pm     Reply with quote

@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.....
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Aug 04, 2013 3:04 pm     Reply with quote

http://www.ccsinfo.com/forum/viewtopic.php?t=39731
http://www.ccsinfo.com/forum/viewtopic.php?t=45795
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Aug 04, 2013 3:05 pm     Reply with quote

http://www.ccsinfo.com/forum/viewtopic.php?t=39731
http://www.ccsinfo.com/forum/viewtopic.php?t=45795
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Aug 04, 2013 3:05 pm     Reply with quote

http://www.ccsinfo.com/forum/viewtopic.php?t=39731
http://www.ccsinfo.com/forum/viewtopic.php?t=45795
temtronic



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

View user's profile Send private message

PostPosted: Sun Aug 04, 2013 3:11 pm     Reply with quote

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
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Sun Aug 04, 2013 8:11 pm     Reply with quote

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
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Aug 04, 2013 8:46 pm     Reply with quote

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).
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Mon Aug 05, 2013 12:29 am     Reply with quote

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