PIC18f452 blinking led ?


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

    Default PIC18f452 blinking led ?

    Hi all,
    Anyone have code and suggestions to begin with PIC18F452 , for simplest case blinking led I will use 4MHZ XT crystal

  2. #2
    Join Date
    Feb 2003
    Location
    Salt Lake City, Utah USA
    Posts
    517


    Did you find this post helpful? Yes | No

    Smile

    how about

    Code:
    Main:
     toggle portb.0
     pause 500
    GOTO Main
    END
    give it a try and reply if you need more
    Paul Borgmeier
    Salt Lake City, UT
    USA
    __________________

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Oky I try this part of code , but nothing is working , always off , I think there is aproblem is defining the oscillator

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by iugmoh View Post
    Oky I try this part of code , but nothing is working , always off , I think there is aproblem is defining the oscillator
    Ya know, we can already read the other thread concerning this issue...

  5. #5


    Did you find this post helpful? Yes | No

    Default

    Oky It's working now with the same code without any changing , I think the problem is that the chip which is not working with code is damaged , I replace it and everything is working now

    define osc 4

    trisb=0

    main:
    portb=0
    pause 1000

    portb=255
    pause 1000

    goto main

    end

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Note: Put all your DEFINE's in all CAPS. I make it a habit of putting the complete DEFINE in all CAPs. That way there's no question in my mind later on.

    As far as the chip dying....Ya...you'll have that... Probably happened to every one of us once or twice...scratch our heads for days on end...asked a millions questions...questioned our own abilities (or lack thereof)...only to find out that the core of the problem is the core of the problem...
    Go figure...

Similar Threads

  1. Simple Blinking LED - WTF!!
    By johnnylynx in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 1st February 2010, 06:19
  2. Blinking an led problem on P16F84
    By aimenbukharie in forum General
    Replies: 1
    Last Post: - 20th March 2009, 05:00
  3. new and need help
    By smeghead in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 3rd November 2008, 20:19
  4. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30
  5. simple LED Blinking project
    By koossa in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 11th December 2004, 01:25

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