PIC18F2550 Newbie


Results 1 to 10 of 10

Threaded View

  1. #1
    Join Date
    Apr 2007
    Posts
    7

    Default PIC18F2550 Newbie

    I'm quite new to microcontrollers, but have completed a successful project on a PIC16F628A. I need to eventually have USB capability and want to learn the PIC18F2550. To start simply, I wired a circuit with an LED and used a 20Mhz crystal with the following code:

    DEFINE OSC 20

    loop:
    High PORTA.0 ' Turn on LED connected to PORTA.0
    Pause 500 ' Delay for .5 seconds

    Low PORTA.0 ' Turn off LED connected to PORTA.0
    Pause 500 ' Delay for .5 seconds

    Goto loop ' Go back to loop and blink LED forever
    End

    This works but the LED blinks twice as fast as it should. I haven't yet run across anything in the Datasheet that would account for this. I'm sure I'm missing something simple. Any input is appreciated.

    Thanks,
    Jeff
    Last edited by JeffnDana; - 24th April 2007 at 17:15.

Similar Threads

  1. Newbie: Temperature measurements
    By Budda in forum General
    Replies: 10
    Last Post: - 30th March 2007, 09:56
  2. PIC Newbie
    By azmax100 in forum Schematics
    Replies: 7
    Last Post: - 23rd February 2007, 04:52
  3. PIC18F2550 and GSM modem
    By zach in forum GSM
    Replies: 7
    Last Post: - 28th November 2006, 09:01
  4. request for a newbie forum
    By nimonia in forum Forum Requests
    Replies: 1
    Last Post: - 20th May 2006, 09:01
  5. PIC18F2550 ICSP - newbie
    By icicle in forum Off Topic
    Replies: 8
    Last Post: - 9th August 2005, 22:41

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