It's been a long time!!!


Results 1 to 9 of 9

Threaded View

  1. #1
    Join Date
    Sep 2008
    Posts
    27

    Default It's been a long time!!!

    It's been a while since I programmed in PicBasic. I would like to get back into it. But I am struggling with the simplest of task.....blinking an LED. Spent 3 hours trying to figure out what I am missing. Maybe someone can show this old newbie what I am missing.

    Code:
    ' PIC18F24K50 Configuration Bit Settings
    #config
      CONFIG FOSC=INTOSCIO
      CONFIG PLLSEL=PLL3X
      CONFIG CFGPLLEN=ON
      CONFIG CPUDIV=NOCLKDIV
      CONFIG LS48MHZ=SYS48X8
      CONFIG IESO=OFF
      CONFIG FCMEN=ON
      CONFIG PCLKEN=ON
      CONFIG BOREN=OFF
      CONFIG nPWRTEN=OFF
      CONFIG nLPBOR=OFF
      CONFIG BORV=220
      CONFIG WDTPS=32768
      CONFIG WDTEN=OFF
      CONFIG MCLRE=OFF
      CONFIG SDOMX=RC7
      CONFIG T3CMX=RC0
      CONFIG DEBUG=OFF
      CONFIG STVREN=ON
      CONFIG ICPRT=OFF
      CONFIG XINST=OFF
      CONFIG LVP=OFF
    #ENDCONFIG
    
    DEFINE OSC 48
    
    OSCTUNE = %10000000 '3X PLL ratio mode selected
    OSCCON =  %01110000  'Switch to 16MHz HFINTOSC
    OSCCON2 = %00010000 'Enable PLL
    
    '*********************** PORT CONFIG ****************************
    TRISA =  0                                   'porta direction 0=OUTPUT 1=INPUT
    PORTA =  0                                   'porta preset
    ANSELA = 0
    '****************************************************************
    '*******************    MAIN PROGRAM     ************************
    '****************************************************************
    while 1
        low PORTA.5
        PAUSE 500
        high PORTA.5
        pause 500
    WEND
    end
    Name:  Untitled.png
Views: 633
Size:  47.2 KB
    Attached Images Attached Images  

Similar Threads

  1. How long... LED on time without resistors?
    By Heckler in forum General
    Replies: 9
    Last Post: - 14th March 2011, 17:49
  2. Hello, long time no post (ADC sample rate)
    By Jhong2 in forum General
    Replies: 0
    Last Post: - 14th April 2009, 04:13
  3. Long start time
    By ttease in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 9th April 2007, 02:45
  4. Replies: 2
    Last Post: - 27th March 2007, 12:48
  5. Using RTC to generate long time delays
    By schlaray in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd January 2007, 00:31

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