Back to the beginning


Results 1 to 40 of 49

Threaded View

  1. #21


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    This is an example that just does not work - OK laugh but once I get through the basics I'll be playing all night.

    ' Name : BLINKXU.pbp
    ' Compiler : PICBASIC PRO Compiler 2.6
    ' Assembler : MPASM
    ' Target PIC : PIC18F4550 or similar type
    ' Hardware : LAB-XUSB Experimenter Board
    ' Oscillator : 20MHz external
    ' Keywords : FOR NEXT
    ' Description : PICBASIC PRO program to blink an LED connected
    ' to PORTD.0 about once a second.
    '

    ' Define LOADER_USED to allow use of the boot loader.
    ' This will not affect normal program operation.


    ' RESET_ORG can be set to move the BASIC program out of the way
    ' of any boot loader running from location 0, such as the
    ' Microchip USB boot loader
    'Define RESET_ORG 800h

    #config
    _config _mclre_on & _CP_OFF & _WDT_OFF
    #endconfig


    mainloop:
    high porta.1 ' Turn on LED connected to PORTD.0 <----- SYNTAX ERROR
    Pause 500 ' Delay for .5 seconds
    Low porta.0 ' Turn off LED connected to PORTD.0
    Pause 500 ' Delay for .5 seconds
    Goto mainloop ' Go back to loop and blink LED forever

    End


    Although the comments box states that it is for a PIC18F452 the selection box on the compiler is set to 12F509.

    Even if the poor 12F509 does not have enough memory for the task in hand I shouldn't get syntax errors ?
    Last edited by AndyFreestone; - 6th April 2013 at 16:16.

Similar Threads

  1. Beginning USB How to/Whats needed to use it.
    By wdmagic in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 11th April 2013, 21:11
  2. Missing chars at beginning of LCD display
    By jimbostlawrence in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 20th November 2009, 00:13
  3. 12F629 beginning
    By Davidpower in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 1st October 2007, 22:37
  4. Program returns to beginning at interupt
    By BGreen in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 25th April 2005, 11:20

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