Can't get the simplest of programs to run using internal osc and just toggling a pin


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Re: Can't get the simplest of programs to run using internal osc and just toggling a

    See if this will work.

    Code:
    #CONFIG
     __config _INTRC_OSC_NOCLKOUT & _WDT_OFF & _MCLRE_OFF & _IOSCFS_4MHZ & _CP_OFF & _PWRTE_OFF & _IOSCFS_4MHZ & _BOR_OFF
    
     #ENDCONFIG
    
    DEFINE OSC 4 ' keep above your code and registers settings
    Adcon0 = 0 'disable adc
    ANSEL = 0 'gpio all digital
    TRISIO = 0 'all outputs except gpio3
    
     
     do
     'serout2 gpio.5, 396, ["M"]
     high 0
     pause 1000
     low 0
     pause 1000
     loop
     end
    Yes, I forgot the High/Low 0 statements are from the old Basic Stamp days.

  2. #2
    Join Date
    May 2011
    Posts
    42


    Did you find this post helpful? Yes | No

    Default Re: Can't get the simplest of programs to run using internal osc and just toggling a

    No dice. I have tried yet another PIC to make sure I didn't damage the last two and tried a different programmer in the event that was damaged (1 in a million, I know). My gut is that I am missing something oscillator related but cannot figure out what. Thanks for the look at what I have.

Similar Threads

  1. Programs and Verifies, but won't run
    By rsfutch in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 19th July 2013, 18:46
  2. PIC programs, resonator resonates, but does not run code.
    By jmgelba in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 9th August 2012, 01:47
  3. PULSOUT versus toggling a pin
    By RussMartin in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 27th January 2010, 15:59
  4. Internal OSC, how to?
    By PICante in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 7th January 2008, 00:03
  5. Internal Osc help
    By BobK in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 12th January 2007, 20:50

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