Mclr As Input Pin?


Closed Thread
Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2007
    Posts
    7

    Default Mclr As Input Pin?

    how can i define MCLR as input pin in picbasic pro ( my chip is 12c508a)

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


    Did you find this post helpful? Yes | No

    Default

    In the *.inc file for the chip in the PBP directory, change MCLRE_ON to MCLRE_OFF
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Dec 2007
    Posts
    7


    Did you find this post helpful? Yes | No

    Thumbs up

    thanks for your help

  4. #4
    Join Date
    Oct 2004
    Location
    Hangover, Germany
    Posts
    289


    Did you find this post helpful? Yes | No

    Thumbs down

    I have tried it too - but the MPASM reports an error when using porte.3 on a 18f2431, he doesn't know the pin !!!
    PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2

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


    Did you find this post helpful? Yes | No

    Default

    It's not a PBP problem, it's a Microchip p18F2431.inc file problem. Seems they forgot to add it in their LAT/PORT/TRIS list...

    BUT, erm, erm.. let's see a datasheet quote...
    10.5 PORTE, TRISE and LATE
    Registers
    Note: PORTE is only available on PIC18F4331/
    4431 devices.
    on the other hand...seems they also forgot their own quote
    10.5.1 PORTE IN 28-PIN DEVICES
    For PIC18F2331/2431 devices, PORTE is only
    available when master clear functionality is disabled
    (CONFIG3H<7> = 0). In these cases, PORTE is a
    single bit, input-only port comprised of RE3 only. The
    pin operates as previously described.
    So, just add TRISE/LATE/PORTE to the .inc file and i'm sure it will work
    Last edited by mister_e; - 23rd December 2007 at 19:56.
    Steve

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

  6. #6
    Join Date
    Oct 2004
    Location
    Hangover, Germany
    Posts
    289


    Did you find this post helpful? Yes | No

    Angry

    Yes - it's a mistake of MICROCHIP - even the support says, there is a porte.3, but they don't realize to kick the MPASM-kids the ass...
    PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2

  7. #7
    Join Date
    Sep 2007
    Location
    USA, CA
    Posts
    271


    Did you find this post helpful? Yes | No

    Default

    Make sure to read the ds on this pin. I use the mclr as an input in an application, but wasted one before I learned a trick... make sure to pause for a couple seconds before you change the setting to turn it into an input. If you don't, then you may not be able to reprogram it.

  8. #8


    Did you find this post helpful? Yes | No

    Default

    using a jdm programmer?

Similar Threads

  1. Is this a K Type sensor?
    By jessey in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 21st November 2009, 13:55
  2. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  3. 16f88 - pin RA4 as analog input
    By savnik in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 15th December 2006, 13:55
  4. Another RTC, DS1287
    By DavidK in forum Code Examples
    Replies: 0
    Last Post: - 12th December 2006, 17: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 : 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