Simplest hardware and code to blink a LED with PIC18F4620


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: Simplest hardware and code to blink a LED with PIC18F4620

    Well, here's another thought. I don't see CONFIG3H in your configs. If I read the datasheet correctly the PBADEN needs to be set so PortB goes to all digital after a reset. I remember Darrel saying if you set any configs PBP overwrites them all and replaces them with your configs. So after a reset all the ports become analog if the PBADEN isn't set correctly. Again, if I read that f.... datasheet correctly.

    I hope I quoteth the great and omnipotent one correctly. Better yet, I hope I'm right.

  2. #2
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: Simplest hardware and code to blink a LED with PIC18F4620

    Sorry. For some reason I thought you were using PortB.0. After pulling my head out it looks like your LED is on PortE.0. My apologies.

  3. #3
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: Simplest hardware and code to blink a LED with PIC18F4620

    I thought I'd fire up the old Proteus and see if I could duplicate the problem. Granted, this doesn't always reflect real world situations but this program and schematic will blink an LED on porte.0 and porte.1.

    Code:
    CLEAR
    
    start_here:
    
    HIGH porte.0
    PAUSE 500
    LOW porte.0
    PAUSE 500
    HIGH porte.1
    PAUSE 500
    LOW porte.1
    PAUSE 500
    
    GOTO start_here
    
    END
    Attached Images Attached Images

  4. #4
    Join Date
    Jun 2011
    Posts
    37


    Did you find this post helpful? Yes | No

    Default Where is ALLDIGITAL.pbp

    Where can I find "ALLDIGITAL.pbp"? Either download the file or get the code?
    Thanks

  5. #5
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: Where is ALLDIGITAL.pbp


Similar Threads

  1. Replies: 12
    Last Post: - 1st November 2013, 13:32
  2. Led blink and interrupt
    By critix in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 24th April 2012, 11:31
  3. PIC18F4620 , what's wrong with my A/D converter code
    By Porcusoru in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 2nd July 2009, 20:35
  4. Newbie: Trying to blink a LED
    By JackPollack in forum General
    Replies: 6
    Last Post: - 29th March 2007, 06:31
  5. Can't get a 12F629 to blink a led
    By Sharky in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 27th June 2005, 11:28

Members who have read this thread : 1

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