18F8722 and MPASM confusion!


Closed Thread
Results 1 to 5 of 5
  1. #1
    Jackson's Avatar
    Jackson Guest

    Question 18F8722 and MPASM confusion!

    Hi all,

    I'm using a 18F8722 with PBP and MPASM, and can't for the life of me get port E to act like a normal digital I/O port.

    The datasheet for the PIC says that after a power up reset the port comes up in digital I/O mode, but then goes on to say that in 80-pin devices, the EBIDS bit (7) of MEMCON must be cleared first!

    Well, MPASM is absolutely new to me, and I see all those names called out in a 'P18F8722' file in the MPASM directory, but don't really know what to do next. Do I need to include this file somehow in my project before those names will be recognized? How do you do that?

    If not, I can see in the file that the hex address for the MEMCON register is 09FCh. (It says so in the datasheet, and in the MPASM file). I tried just taking a 'shortcut' (not) and including the following:

    @ __CONFIG 09FCH, 10000000B (to set bit 7)

    but the compiler said 09FCh wasn't a good address! Can someone help me make port E a normal digital i/o?

    Thanks very much,
    Jackson

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


    Did you find this post helpful? Yes | No

    Default

    Jackson,TRISE = %11111111 for all pins programmed as inputs or TRISE=%00000000 for all pins programmed as outputs. It works for me......

    Dave Purola,
    N8NTA

  3. #3
    Jackson's Avatar
    Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    oh, that scares me... cause it doesn't work for me! I take it you didn't go through any config monkey business, it just came up in digital. Thanks!!

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    MEMCON isn't a config word setting. It's a special function register.

    @ __CONFIG is only valid for "config word" settings. It has nothing to do with
    "special function registers".

    If you just need to set MEMCON.7, then MEMCON.7 = 1 should be all you
    need.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  5. #5
    Jackson's Avatar
    Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    Thanks Bruce

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