RA5/MCLR input in 16f88


Closed Thread
Results 1 to 6 of 6
  1. #1
    kacho's Avatar
    kacho Guest

    Default RA5/MCLR input in 16f88

    Hi ,I have an simple question for 16F88
    Could I change RA5/MCLR pin from reset function to input function using an switch ?
    For example:
    If button is low for more that 5 seconds set RA5 as input
    If button is low for more that 10 seconds set RA5 as MCLR

    Any help ?
    Thanks

  2. #2
    Join Date
    May 2004
    Posts
    30


    Did you find this post helpful? Yes | No

    Default

    NO ! Only software !

    Don Mario

  3. #3
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    Kacho, you can produce what looks like a reset by inserting these lines of code where you need the reset to occur:

    clear
    @ clrf PCLATH
    @ goto 0
    It will nor reset the hardware registers but clear all user variables and start the probram from scratch as if it was just reset.

    Dave Purola,
    N8NTA

  4. #4
    kacho's Avatar
    kacho Guest


    Did you find this post helpful? Yes | No

    Default

    Thanks Dave,

    the question is that :could I change with

    if button > 5 sec then @DEVICE MCLR_OFF .... and later
    If button > 10 sec. then @DEVICE MCLR_ON
    ...

    or this is possible only in the initial declarations ?

    Thxs

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


    Did you find this post helpful? Yes | No

    Default

    i don't believe it's gonna work. These setting are only for the PIC programmer at programming time.
    Steve

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

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


    Did you find this post helpful? Yes | No

    Talking

    A simple clear is to jump to the beginning of the program if pin 5 = xxx
    with very little work , you do what you want for clearing registers ...

    Now, If your program fails, then it's a programming problem ... not a hardware problem.

    Remenber chips never do errors ...

    Alain

Similar Threads

  1. Sony LanC Program
    By l_gaminde in forum Code Examples
    Replies: 2
    Last Post: - 25th September 2009, 18:51
  2. LED "capacitance" won't get lower
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 3rd May 2007, 20:31
  3. Timing input pulses and re-outputting them
    By jamie_s in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 28th February 2007, 01:50
  4. 16f88 - pin RA4 as analog input
    By savnik in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 15th December 2006, 13:55
  5. 16F88 reading Analog Input
    By thunderstrike44 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th August 2004, 22:41

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