Cannot get blink example to work via PICBASIC PRO, but works via MPLAB IDE


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Cannot get blink example to work via PICBASIC PRO, but works via MPLAB IDE

    How do you have the configuration set when using PBP? The ASM code is using the internal OSC while the default in PBP for the 16F628A uses an external OSC.
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Nov 2012
    Posts
    6


    Did you find this post helpful? Yes | No

    Default Re: Cannot get blink example to work via PICBASIC PRO, but works via MPLAB IDE

    Dave,

    Thanks for the lightning fast response!!! Wow.

    I was planning on using the internal oscillator. Since you pointed out the potential issue I am trying to determine how to change PBP to use the internal one. I have been messing around with the PIC16F628.PBPINC file with this instead

    #CONFIG
    ifdef PM_USED
    ;device pic16F628, xt_osc, wdt_on, pwrt_on, mclr_on, lvp_off, protect_off
    device pic16F628, _INTRC_OSC_NOCLKOUT, wdt_on, pwrt_on, mclr_on, lvp_off, protect_off
    else
    ;__config _XT_OSC & _WDT_ON & _PWRTE_ON & _MCLRE_ON & _LVP_OFF & _CP_OFF
    __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_ON & _LVP_OFF & _CP_OFF
    endif
    #ENDCONFIG
    But to no avail. Am I barking up the wrong tree? Where can I set this to internal? Thanks so much for your help with this! I really cannot believe I cannot figure this out.

    Patrick

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Cannot get blink example to work via PICBASIC PRO, but works via MPLAB IDE

    In your first post you were working with the 16F628A , but the you have the 16F628.inc file posted?

    And do not forget to set OSCCON in your code for the speed.
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Cannot get blink example to work via PICBASIC PRO, but works via MPLAB IDE

    Sorry, the 16F628A only has one internal speed.

    Comment out the config lines in the *.inc file and add this to your code near the beginning.
    Code:
    '16F628A
     @ __config _INTRC_OSC_NOCLKOUT & _WDT_OFF & _MCLRE_OFF & _LVP_OFF & _CP_OFF
     DEFINE OSC 4
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Wake from sleep (Well, sorta) 16F88, PICBASIC PRO
    By SFOdesigns in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th November 2012, 15:43
  2. Simple Blink program doesnt work.
    By sccoupe in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 1st March 2009, 21:30
  3. Replies: 3
    Last Post: - 7th June 2008, 22:17
  4. Can't get blink circuit to work :(
    By Techbuilder in forum mel PIC BASIC Pro
    Replies: 21
    Last Post: - 31st January 2008, 14:00
  5. blink.bas help cant make any 18f's work
    By Bonxy in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 13th December 2004, 22:28

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