12F675 MCLR directive MPASM


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2008
    Posts
    4

    Question 12F675 MCLR directive MPASM

    I am starting with PICs and doing some simple programs with a PICKIT1 system. I had a problem where I want to use the pushbutton on the PICKIT, but it is tied to the MCLR line so it causes the micro to reset whenever the button is pressed. So I consulted the internet and this forum and I found a fix that works but only with PBP's internal assembler.

    What am I doing wrong that MPASM doesn't like the directive?


    @ DEVICE PIC12F675, MCLR_OFF
    '@ DEVICE PIC12F675, MCLR_OFF THIS LINE WORKS IF YOU
    'USE MECHANIQUES ASSEMBLER, I'M NOT SURE EXACTLY WHAT
    'YOU WOULD HAVE TO DO TO GET THE MPASM ASSEMBLER TO
    'CORRECTLY IGNORE THE MCLR LINE

    'FOR MPASM
    '@ __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _BODEN_ON
    '@ __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_OFF & _BODEN_ON & _LVP_OFF & _CP_ALL & _DATA_CP_ON
    'ONE SOURCE SAID THE ABOVE LINE WOULD WORK WITH MPASM, BUT
    'I DID NOT HAVE ANY LUCK WITH IT,
    'I GET ERROR[118] .....: OVERWRITING PREVIOUS ADDRESS CONTENTS

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


    Did you find this post helpful? Yes | No

    Default

    Have you seen this?
    http://www.picbasic.co.uk/forum/showthread.php?t=543

    POST #5 should get you going.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    May 2008
    Posts
    4


    Did you find this post helpful? Yes | No

    Default Thanks

    Yes that clears it up. I didn't come across that thread when I was searching the forum last night.

Similar Threads

  1. MCLR as PIN on 12F675
    By rgregor in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th October 2009, 09:46
  2. 12F675 / MCLR use
    By Acetronics2 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 4th September 2009, 10:18
  3. 12F675 won't reprogram or erase
    By modifyit in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 19th May 2006, 05:07
  4. Converting to MPASM
    By btaylor in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 4th November 2005, 01:35
  5. I/O pin and MCLR
    By Dwayne in forum FAQ - Frequently Asked Questions
    Replies: 1
    Last Post: - 15th July 2004, 10:52

Members who have read this thread : 1

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