First time trying to flash one LED


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2013
    Posts
    4

    Default First time trying to flash one LED

    I have wrote and programmed PIC and tested the circuit which very simple yet it wont work,


    LED var portb.0
    trisb = %11111110
    main:
    high led
    pause 1000
    low led
    pause 1000
    goto main
    end

    I have tried fused xt and also hs
    I hope you can help thanks.

    I have done all this before and am now returning but I cant get of square one.

  2. #2
    Join Date
    Dec 2012
    Location
    Tennessee
    Posts
    262


    Did you find this post helpful? Yes | No

    Default Re: First time trying to flash one LED

    which PIC are you using, I had alot of problems the first time doing the same thing. I would set if possible the crystal setting to INT to use internal first. I blew several chips by setting them to xt and such without a crystal attached/attached properly. nowadays for the most part I try to use the internal occillator. also try to keep it even more basic than what you have here, like this

    Code:
    TRISB = 0
    MAIN:
    PORTB.0 = 1
    PAUSE 1000
    PORTB.0 = 0
    PAUSE 1000
    GOTO MAIN
    END
    or

    Code:
    TRISB = 0
    MAIN:
    TOGGLE PORTB.0
    PAUSE 1000
    GOTO MAIN
    END
    dont forget to set fuse settings, I usually turn WDT, BODEN, and MCLRE all to Disabled
    Chris


    Any man who has accomplished anything in electronics at one time or another has said... " STOP! WAIT! NOOO! Dangit.... Oh Well, Time to start over..."

  3. #3
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,598


    Did you find this post helpful? Yes | No

    Default Re: First time trying to flash one LED

    First, what PBP and assembler version, model of PIC, all CONFIGs?

    It would be a good idea to post your entire code. A circuit schematic would also be a good idea, just in case.

    The more info you present, the easier it is to help.

    Side note; is port B digital, analog features disabled?

    Robert


    Edit: don't you hate writing a post at the same time as someone else, and finishing second?
    Last edited by Demon; - 28th December 2013 at 16:41.

Similar Threads

  1. PIC12F629 flash led
    By pmafer in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 9th November 2013, 07:13
  2. How long... LED on time without resistors?
    By Heckler in forum General
    Replies: 9
    Last Post: - 14th March 2011, 17:49
  3. I can't even make an LED flash!
    By George in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 3rd April 2007, 06:39
  4. elapsed time between two led flash...
    By dario in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 5th February 2006, 16:09
  5. can't even flash an LED
    By bruno333 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 28th April 2005, 13:27

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