blinking basic


Results 1 to 10 of 10

Thread: blinking basic

Threaded View

  1. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Try this
    Code:
            @   DEVICE      INTRC_OSC_NOCLKOUT, WDT_OFF,PWRT_ON,MCLR_OFF
            @   DEVICE      PROTECT_OFF, CPD_OFF,BOD_OFF
            @   DEVICE      IESO_OFF, FCMEN_OFF,LVP_OFF
            @   DEVICE2     BOR21V, WRT_OFF
          
            DEFINE OSC 4
            OSCCON = %01100001
            PORTD = 0
            TRISD = 0
    loop:   
            PORTD.0 = 1 ' Turn on LED connected to PORTD.0
            Pause 500 ' Delay for .5 seconds
            
            PORTD.0 = 0 ' Turn off LED connected to PORTD.0
            Pause 500 ' Delay for .5 seconds
            
            Goto loop ' Go back to loop and blink LED forever
            End
    Also, have a look at this link.
    http://www.picbasic.co.uk/forum/showthread.php?t=543

    HTH
    Last edited by mister_e; - 1st February 2009 at 21:27.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. PIC BASIC TLC5940 code
    By eletrokat in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 8th May 2010, 21:01
  2. Indexer not indexing...a basic PBP problem??
    By jellis00 in forum General
    Replies: 8
    Last Post: - 24th March 2009, 16:53
  3. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  4. Replies: 5
    Last Post: - 17th January 2006, 19:26
  5. vb6 to pic basic
    By Darrenmac in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 19th December 2005, 01:56

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts