12F675 / MCLR use


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Never trust the state of any I/O on Power-Up - regardless of what the Datasheet says.

    Always preset your I/O's within your program to what you want them to be as one of the first things you do when initialising the PIC.

  2. #2
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    From the datasheet...
    Figure 3-3 shows the diagram for this pin. The GP3 pin
    is configurable to function as one of the following:
    • a general purpose input
    • as Master Clear Reset
    and...
    bit 5 MCLRE: GP3/MCLR pin function select(5)
    1 = GP3/MCLR pin function is MCLR
    0 = GP3/MCLR pin function is digital I/O, MCLR internally tied to VDD
    and from your config fuses...
    _MCLRE_ON

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


    Did you find this post helpful? Yes | No

    Default

    I think Alain is talking about GPIO.2 having an anomally when you configure GPIO.3 (MCLR) for different states. In theory it shouldn't effect that pin...

  4. #4
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Melanie View Post
    I think Alain is talking about GPIO.2 having an anomally when you configure GPIO.3 (MCLR) for different states. In theory it shouldn't effect that pin...
    Ahhh! I misunderstood and thought he was trying to make GPIO.3 an output although I expected he would know better. I should have known better.

    What happens if the order of the TRISIO = and GPIO = statements are reversed?

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Quote Originally Posted by Melanie View Post
    Never trust the state of any I/O on Power-Up - regardless of what the Datasheet says.

    Always preset your I/O's within your program to what you want them to be as one of the first things you do when initialising the PIC.
    Hi, Mel

    You do know the only one I trust in, is you, Mel ... ( Violins [ON] , Crooner [ON], Rose Petals drop [ON], Champagne [ON] ... )

    I just think you missed my two I/O Config lines ... ( Was late, eh ...)

    I must tell it ALSO affects GPIO.4 ... so, I have to try adding a little PAUSE after those CONFIG Lines, I smell a Power on little issue ... That make BUTTON read a low level when power up ...

    OR May be a " HIGH GPIO.0 " Command before the first BUTTON Command to ensure the High Level ...

    Testing a HIGH level for Button1 pressed is to also an idea ( some capacitive effects on GPIO.0 ??? ... despite it has no load but a Pullup resistor !) ...

    But, that's not something " normal " ...

    Alain
    Last edited by Acetronics2; - 4th September 2009 at 08:40.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Talking Silicon bug ??? The end

    As I smelled ...

    Adding a little PAUSE 50 ( 40 is not enough ! ) just past the I/O config Lines solved the issue ...

    HIGH GPIO.0 didn't work ...

    Alain ( bug killer ...)
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

  1. How to MCLR by code for 16F877
    By fbestepe in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 26th November 2014, 00:51
  2. MCLR as PIN on 12F675
    By rgregor in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th October 2009, 09:46
  3. 12F675 MCLR directive MPASM
    By OLDSCHOOL in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th May 2008, 01:29
  4. 12F675 won't reprogram or erase
    By modifyit in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 19th May 2006, 05:07
  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 : 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