16f688 lcd connection


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Dec 2010
    Posts
    48


    Did you find this post helpful? Yes | No

    Default

    I'm having trouble understanding how to set the config fuses, could you give me an example or at least explain it to me? Thanks.
    Last edited by emerson; - 9th December 2010 at 05:07.

  2. #2
    Join Date
    Dec 2010
    Posts
    48


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by emerson View Post
    I'm having trouble understanding how to set the config fuses, could you give me an example or at least explain it to me? Thanks.
    This is what I have so far, and it compiles with no errors, but it still isn't doing the trick

    'Configuration Fuses
    @__EXTRC_OSC_NOCLKOUT
    @__WDT_OFF
    @__PWRTE_ON
    @__MCLRE_OFF
    @__BOREN_ON
    @__LVP_OFF
    @__CP_ALL
    @__DATA_CP_ON
    @__FCMEN_ON

  3. #3
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    You've not mentioned which version of PBP you are using. I think I'm correct in stating that you can't use the word loop as a label in vers 2.60. Things like "main" are probably OK.

    I've just searched through my PIC samples and don't have the one you are using. Is there any reason why you chose this PIC to use with an LCD as there are lots of other PICs that don't have the amount of functionality crammed into it as the 688.

    As you have stated that you have a flashing LED, this would suggest the code is running, but the LCD isn't responding... this suggests a timing issue. You have used what looks like an external config setting (@__EXTRC_OSC_NOCLKOUT) but in the code it states "internal 4Mhz". Are you using the internal 4Mhz timing or an external crystal, if internal then that fuse should be something like @_INTRC_OSC_NOCLKOUT.

    It's also worth posting up your schematic of how you have the hardware set up

  4. #4
    Join Date
    Dec 2010
    Posts
    48


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by malc-c View Post
    You've not mentioned which version of PBP you are using. I think I'm correct in stating that you can't use the word loop as a label in vers 2.60. Things like "main" are probably OK.
    I'm using PBP v2.47 with the MPASM assembler.

    I've just searched through my PIC samples and don't have the one you are using. Is there any reason why you chose this PIC to use with an LCD as there are lots of other PICs that don't have the amount of functionality crammed into it as the 688.
    Well, I was introduced to pic chips my freshman year in high school and the 16f688 is what we used in electronics class my 4 years there. All we did with them was blink lots of LEDs so we never had to learn much of the configuration steps.

    As you have stated that you have a flashing LED, this would suggest the code is running, but the LCD isn't responding... this suggests a timing issue. You have used what looks like an external config setting (@__EXTRC_OSC_NOCLKOUT) but in the code it states "internal 4Mhz". Are you using the internal 4Mhz timing or an external crystal, if internal then that fuse should be something like @_INTRC_OSC_NOCLKOUT.
    I'm using an external 10MHz oscillator. I didn't notice I had two different oscillator settings, good lookin' out.

    It's also worth posting up your schematic of how you have the hardware set up
    my circuit looks exactly like this with the two exceptions being the reset switch on MCLR (MCLR is still pulled high) and an external 10MHz crystal between pins 2 and 3
    http://embedded-lab.com/blog/?attachment_id=685

  5. #5
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by emerson View Post

    my circuit looks exactly like this with the two exceptions being the reset switch on MCLR (MCLR is still pulled high) and an external 10MHz crystal between pins 2 and 3
    I assume with two small capacitors between each pin and GND - typically 15pf - 33pf ?

  6. #6
    Join Date
    Dec 2010
    Posts
    48


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by malc-c View Post
    I assume with two small capacitors between each pin and GND - typically 15pf - 33pf ?
    What's the purpose of these capacitors? the lowest value I have is 51pf, will this work?
    Last edited by emerson; - 9th December 2010 at 18:10.

  7. #7
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    They are required as part of the timing circuit - take a read of page 9 of the PBP manual.

    You can't simply place a crystal between the two pins, it needs to oscillate and these caps between GND and the pins are required to make the thing resonate

    http://en.wikipedia.org/wiki/Crystal_oscillator

  8. #8
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by emerson View Post
    What's the purpose of these capacitors? the lowest value I have is 51pf, will this work?
    I tend to stick with 22pf. If you google crystal resonators or look at the images most are no higher than 33pf - but you've nothing loose by trying the ones you have

Members who have read this thread : 0

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

Tags for this Thread

Posting Permissions

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