18F4523 beginner needing help to blink an LED...


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Re: 18F4523 beginner needing help to blink an LED...

    FWIW, Dave your code works in sim, (I don't have that PIC either). 2 things I had to do: comment the configs cuz I was too lazy to go fix the .INC, and I had to tie MCLR high. So question for OP, Do you have MCLR enabled AND tied high? I ask because it's an easy to miss thing.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

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


    Did you find this post helpful? Yes | No

    Default Re: 18F4523 beginner needing help to blink an LED...

    I think the configs are the key here if the OP wants to use the internal OSC.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Re: 18F4523 beginner needing help to blink an LED...

    Well I must admit, being new to proteus, blinking that LED was like I had done it with my first PIC!! I was thinking about MCLR since I assume when I commented the configs it used the PBP default's.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

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


    Did you find this post helpful? Yes | No

    Default Re: 18F4523 beginner needing help to blink an LED...

    I may have to try a sim again, when I tried it a few years ago... well it just plan was not worth the effort.

    The PBP inc configs for this chip are HS on the OSC.

    Does your sim have a resonator or something attached?

    And you may have hit it about MCLR.
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Re: 18F4523 beginner needing help to blink an LED...

    Well see Dave its like this: I have no idea if there is a resonator or not. I am guessing not. I didn't add 1. my entire circuit is the chip, an led, and a wire to Vcc for MCLR. But there are built in things like automatic tie in to pwr and gnd, so MAYBE? and I didn't even put a resistor in series with the LED. So these things make me go Hmmm. But the LED was blinking at what appears 1 sec rate.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

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


    Did you find this post helpful? Yes | No

    Default Re: 18F4523 beginner needing help to blink an LED...

    Very interesting....

    Does the LED burn out after awhile or do you have a place to set VDD to ~3 ?
    Yes... I am being a smart _ _ _ now
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Re: 18F4523 beginner needing help to blink an LED...

    in fact I think I could set it to ~3V, but I hooked her right from pin to ground, with uP at 5V. Left it running for 10 mins and still burning bright.

    This may be a case of don't fully trust the sim. Sorta like the LED thread where Darrels sim showed the different levels of brightness for different resistor values. but in real life, it works great as you and Dhuston? said.

    I don't mind a little smart $$. makes things fun
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

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