16F914 and MPASM


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    Thank you, Bruce. I just tried it again with the following line:

    __config_DEBUG_OFF_FCMEN_OFF_IESO_OFF_BOD_OFF_CPD_ OFF_MCLRE_OFF_PWRTE_ON_WDT_OFF_INTRC_OSC_NOCLKOUT

    It made no difference. Compiles in MPASM with no errors, but will not run:

    __config_DEBUG_OFF_FCMEN_OFF_IESO_OFF_BOD_OFF_CPD_ OFF_MCLRE_OFF_PWRTE_ON_WDT_OFF_INTRC_OSC_NOCLKOUT
    OPTION_REG = %11000000
    INTCON = 0
    PIE1 = 0
    PIE2 = 0
    ANSEL = 0
    TRISA = %00000000
    TRISB = %00100001
    TRISC = %00000000
    TRISD = %00000000
    TRISE = %1000
    OSCCON = %00000001
    CMCON0 = 7
    ADCON0 = 0
    WDTCON = 0

    SSPCON = 0
    CCP1CON = 0
    CCP2CON = 0

    CLEAR

    LCDPS = %00110000
    LCDCON = 0
    LCDSE0 = 0
    LCDSE1 = 0
    LCDSE2 = 0

    PORTA.7 = 1
    LED1 VAR PORTA.7

    Main:

    PORTA.7 = 1
    pause 10
    PORTA.7 = 0
    pause 10
    goto Main

    Any other suggestions?

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


    Did you find this post helpful? Yes | No

    Default

    It shouldn't compile the way you did it... seems odd syntaxe.

    How about
    Code:
    @CFG1 = _DEBUG_OFF & _FCMEN_OFF & _IESO_OFF & _BOD_OFF & _CPD_OFF
    @CFG2 = _MCLRE_OFF & _PWRTE_ON & _WDT_OFF & _INTRC_OSC_NOCLKOUT
    @   __CONFIG CFG1 & CFG2
    Steve

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

  3. #3
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    If you really got this to compile as-is, you definitely have something VERY strange
    going on.

    That config line is really a mess. Try the attached and let me know if it works.
    Attached Files Attached Files
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  4. #4


    Did you find this post helpful? Yes | No

    Default

    Problem finally solved! The config settings were the problem. Thank you, Bruce, your code worked. Thanks also to Charles Leo at MeLabs. You both solved the problem at the same time! Will I ever learn?

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