TRIS E setting for 18F2550


Closed Thread
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    257

    Default TRIS E setting for 18F2550

    Hi Guys,

    I want to use Pin 1 (TrisE/MCLR input) as a digital input and having problems trying to set TRISE.3 as a digital input.

    I get error [113] symbol not previously defined.

    I've set CONFIG MCLRE = OFF in the .inc file to disable MCLR, but that doesn't help.

    I know it's simple but just can't figure it out.....

    Code:
     
        ' SETUP THE PORTS
        ADCON1 = $0F     
        SSPCON1 = 0
        CMCON = $07     
        TRISA = $FF
        TRISB = %00000001
        TRISC = %00000001
        TRISE = %11111111
    Cheers
    Squib

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Squibcakes View Post
    Hi Guys,
    I want to use Pin 1 (TrisE/MCLR input) as a digital input and having problems trying to set TRISE.3 as a digital input.
    I get error [113] symbol not previously defined.
    I've set CONFIG MCLRE = OFF in the .inc file to disable MCLR, but that doesn't help.
    I know it's simple but just can't figure it out.....
    Cheers
    Squib
    If you program and then do a readback of the '2550, is the MCLRE bit still set or reset?
    Sounds to me like the CONFIG isn't being set in the PIC itself.

  3. #3
    Join Date
    Feb 2003
    Location
    Salt Lake City, Utah USA
    Posts
    517


    Did you find this post helpful? Yes | No

    Smile

    Quote Originally Posted by Squibcakes View Post
    I've set CONFIG MCLRE = OFF in the .inc file to disable MCLR, but that doesn't
    Something to try ...try this in your .inc file

    Code:
          __CONFIG    _CONFIG3H, _PBADEN_OFF_3H & _MCLRE_OFF_3H
    EDIT - In the above, I added the "_MCLRE_OFF_3H" to the already exisiting __CONFIG _CONFIG3H line of the inc file
    Last edited by paul borgmeier; - 23rd May 2007 at 06:24. Reason: clarity & format change (& instead of ,)
    Paul Borgmeier
    Salt Lake City, UT
    USA
    __________________

  4. #4
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    257


    Did you find this post helpful? Yes | No

    Default

    Ok thanks guys sussed it.

    I was right in the fist place to use CONFIG MCLRE = OFF , the only thing is that I didn't need to use TRISE = ....., This pin is input only anyway.

    Cheers
    Squib

Similar Threads

  1. TRIS setting for the DS1302
    By Dennis in forum mel PIC BASIC Pro
    Replies: 28
    Last Post: - 3rd March 2010, 01:14
  2. OSCON setting for 18F4520
    By Dennis in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 29th November 2009, 15:18
  3. PICKit2 - warning about configuration words
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 26
    Last Post: - 4th August 2009, 14:01
  4. Help with setting adcon1 for 16f877
    By jessey in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 16th August 2005, 11:13
  5. Is LCDOUT setting always al TRIS ?
    By BigWumpus in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 19th June 2005, 17:02

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