simple LED Blinking project


Closed Thread
Results 1 to 5 of 5
  1. #1

    Unhappy simple LED Blinking project

    Hi Picers

    I have developed a few Pic projects without any problems in the past, but
    now I'm struggeling with a simple LED Blinking project.

    I have double check my circuit and replaced every component, but without any
    luck.
    The voltage on the MCLR pin is there, but the LED pin is dead, which tell me
    that the pic did not start.

    Attached is my PCB or it can be viewed at http://www.rieme.co.za/Question/PCB.gif.

    Here is my code:
    _________________________________________________
    Include "Modedefs.bas"

    DEFINE OSC 20 ' Set the Xtal frequency to 20mHz
    MYLED Var PORTB.7 '

    ADCON1 = 7
    Main:
    High MYLED
    Pause 1000
    Low MYLED
    Pause 1000
    goto Main
    end
    __________________________________________________

    Thank you
    Koos
    Attached Images Attached Images  

  2. #2
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    You probably need
    TRISA=00000000

    this tells your chip that all your pins are outputs.


    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  3. #3
    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    237


    Did you find this post helpful? Yes | No

    Post

    Hmmm, deja vu, i've been answering your messages on the mailing list.

    1. Check that your LED isn't the wrong way around.
    2. Make sure that you set HS oscillator in your programmer.

    /Ingvar

  4. #4


    Did you find this post helpful? Yes | No

    Default

    Thank you for your feedback

    I have found the problem.
    The Pic run at 20Mhz and I'm designing everything on a breadboard.

    The copper tracks inside the Breadboard generate it's own capactance and when putting 15pf caps on the Crystal, it does not run.
    If I remove the Caps it run.
    What I did is put the Pic in a 40 Pin IC Socket, cut the 2 pins on the IC Socket for the crystal and directly connect the crystal and 2 caps to the pins on the IC Socket (and not through the breadboard's wholes)

    Now it is running smoothly.

  5. #5
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    Originally posted by Ingvar
    Hmmm, deja vu, i've been answering your messages on the mailing list.
    /Ingvar
    ... I had the same feeling.

    regards

    Ralph

Similar Threads

  1. Conway's Game Of Life
    By wellyboot in forum mel PIC BASIC Pro
    Replies: 45
    Last Post: - 28th May 2020, 07:14
  2. A Serial GLCD 128x64 Simple Project
    By Oldspring in forum Off Topic
    Replies: 0
    Last Post: - 8th March 2010, 21:58
  3. Simple Blinking LED - WTF!!
    By johnnylynx in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 1st February 2010, 07:19
  4. 20 Mhz Crystal, simple blinking LED
    By BenjaminsShinob in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 16th October 2007, 06:06
  5. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 03:30

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