ASM - Problem at first step!


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Re: ASM - Problem at first step!

    Compiles and works fine in MPLAB SIM. PORTC bits 4,5,2,3 all get set. Post your Protous file and we can have a look for you.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  2. #2
    Join Date
    Nov 2009
    Location
    London
    Posts
    251


    Did you find this post helpful? Yes | No

    Default Re: ASM - Problem at first step!

    16f676.zip

    My DSN file attached.

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


    Did you find this post helpful? Yes | No

    Default Re: ASM - Problem at first step!

    I don't use ISIS/Proteus, but as per your configuration fuses, you must tie you MCLR pin to Vdd... make sure it is done.

    Another thing... It's nogt a bad Idea to finish your program with an endless loop, so the LED will stay on.

    I bet this will work, if you haven't tied you MCLR pin to Vdd
    Code:
        LIST P=16F676
        #include <p16F676.inc>
        __CONFIG   _CP_OFF & _CPD_OFF & _BODEN_OFF & _MCLRE_OFF & _WDT_OFF & _PWRTE_ON & _INTRC_OSC_NOCLKOUT
        
        CLRF    PORTC
        BSF    STATUS,RP0
        CLRF    TRISC
        CLRF    ANSEL
        BCF    STATUS,RP0
        BSF    PORTC,4
        BSF    PORTC,5
        BSF    PORTC,2
        BSF    PORTC,3
        goto $
        END
    And from what I do remember of my venture with ISIS, you need to specify the osc speed... set it to 4MHz and try the above without specifying the configuration word value. If it's still not working, tie your MCLR pin to Vdd. Ought to work ... or throw away ISIS
    Steve

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

  4. #4
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Re: ASM - Problem at first step!

    Steve is correct You need to either turn off MCLR or tie it high. As a side note, you have some hardware issues that will make you think the program doesn't work. It has to do with tying all the LED's together then through 1 resistor to ground. Also I think you have to edit the properties for the GND symble and assign it the name "GND" to make it be ground.

    I am Very new to ISIS, but that has caused me trouble in the past.

    Sorry bout taking so long to reply, had trouble getting on the forum yesterday.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

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


    Did you find this post helpful? Yes | No

    Default Re: ASM - Problem at first step!

    ..., had trouble getting on the forum yesterday.
    Me too, and I guess everybody has too. Bah, it happen once in a while. No problem, nobody will die of it
    Steve

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

  6. #6
    Join Date
    Nov 2009
    Location
    London
    Posts
    251


    Did you find this post helpful? Yes | No

    Default Re: ASM - Problem at first step!

    Thanks for the help. I tied MCLR to VDD & named the ground terminal 'GND'. Worked fine. I almost started having suicidal thoughts becoz of this. Thanks again.

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


    Did you find this post helpful? Yes | No

    Default Re: ASM - Problem at first step!

    I almost started having suicidal thoughts becoz of this.
    Don't do that again, no SIM worth that much attention
    Steve

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

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