16F913 setup


Closed Thread
Results 1 to 32 of 32

Thread: 16F913 setup

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Driving 2, 7-Segment LCD displays w/16F913

    Hi Mr. E and all others!

    I am new to the LCD "modules" in the 16F913 chip. I'm trying to get a basic breadboard going here using the minimum setup required to just send 2 digits to 2 displays. From there I can figure out everything else the chip needs to do. It's these damn module parameters that is screwing with my head. Specific pins to displays can be any arrangement for now.

    The App Note AN1070 and chip data leaves me confused when it comes to using PBP (v2.60) since data references are all in Assembler. Has anyone worked with this chip to arrive at a simple setup to map the pins, and how to setup the "mapping"? Do you need to create a lookup table to output the digits you want. The more I read the more I'm either missing the boat or reading too much into the minimums required to talk to the displays.

    Mega thanks, Frank

  2. #2
    Join Date
    Jan 2009
    Posts
    78


    Did you find this post helpful? Yes | No

    Default

    ...digits to 2 displays...????
    post the schematic please (...or lcd model # ... ext osc ?)

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Here is some code I wrote for a 4 digit display and a PIC16F914. There
    is no cut and paste solution using these on chip LCD modules. Each LCD
    has different number of segments, commons and duty. The best way
    to get going is the worksheet located in the LCD section of the data
    sheet. Using the LCD data sheet you assign each segment to an LCD register. I can probably help some if you supply the LCD data sheet.

  4. #4


    Did you find this post helpful? Yes | No

    Default

    Code did not attach the first try
    Attached Files Attached Files

  5. #5


    Did you find this post helpful? Yes | No

    Default Re: 16F913... mapping done! Does this look right to you?

    Quote Originally Posted by mark_s View Post
    Here is some code I wrote for a 4 digit display and a PIC16F914. There
    is no cut and paste solution using these on chip LCD modules. Each LCD
    has different number of segments, commons and duty. The best way
    to get going is the worksheet located in the LCD section of the data
    sheet. Using the LCD data sheet you assign each segment to an LCD register. I can probably help some if you supply the LCD data sheet.
    Using the Data Sheet's pin addressing to function names, here's what I've come up with and verified "ok".

    COM-0 LCD FUNCTION ADDRESS LCD SEGMENT IC Pin
    SEG0 LCDDATA 0,0 Segment "C" 21
    SEG1 LCDDATA 0,1 Segment "D" 22
    SEG5 LCDDATA 0,5 Segment "E" 7
    SEG6 LCDDATA 0,6 Segment "DP" 14
    SEG8 LCDDATA 1,0 Segment "F" 18
    SEG9 LCDDATA 1,1 Segment "A" 17
    SEG10 LCDDATA 1,2 Segment "B" 16
    SEG11 LCDDATA 1,3 Segment "G" 15

    COM-1 LCD FUNCTION ADDRESS LCD SEGMENT IC Pin
    SEG2 LCDDATA 3,2 Segment "G" 23
    SEG3 LCDDATA 3,3 Segment "B" 24
    SEG4 LCDDATA 3,4 Segment "DP" 6
    SEG7 LCDDATA 3,7 Segment "D" 3
    SEG12 LCDDATA 4,4 Segment "E" 2
    SEG13 LCDDATA 4,5 Segment "A" 28
    SEG14 LCDDATA 4,6 Segment "F" 27
    SEG15 LCDDATA 4,7 Segment "C" 5

    Thanks, Frank

  6. #6


    Did you find this post helpful? Yes | No

    Default

    Hi Frank,
    I would need to see a schematic and have the LCD dat sheet to say for
    sure if its correct. It looks like you got the idea.

    Try blinking a segment

    Loop:
    LCDDATA0.6 = 1 'Turn on DP
    Pause 1000
    LCDDATA0.6 = 0 'Turn off DP
    Pause 1000
    Goto Loop
    Last edited by mark_s; - 16th April 2010 at 21:25.

  7. #7


    Did you find this post helpful? Yes | No

    Default Quickie question...

    Most PIC's have a "weak pull up" for the MCLR pin. On the 16F913, I don't see this is an option in any register, however, on page 220 "Configuration Bits" [CONFIG1] there is a reference to MCLR. To tie it to VDD they say to enter "0" for this binary string. Wouldn't this mean that because you'd use a "0", if not entering CONFIG1 at all, it would automatically default to "0" and apply a weak-pull up on MCLR?

    Otherwise, I would have to have a resistor/cap tied to MCLR which I really don't have the room to do if it's not absolutely necessary.

    Frank

  8. #8
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Not sure I understand what you are after but have you
    _MCLRE_OFF
    and made the pin an input?
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. ADCIN - setup of ADCON2
    By Lowell314 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 7th December 2009, 18:41
  2. TMR1 external LP xtal setup check
    By comwarrior in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 13th October 2009, 18:11
  3. ADCIN setup for PIC16F688
    By PixController in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 29th February 2008, 18:38
  4. ADCIN setup help need
    By dangill in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 26th February 2008, 15:22
  5. Use Button For setup
    By tump in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 21st November 2007, 19:43

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts