High current consumption on input Port A


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2007
    Location
    Santiago, Chile
    Posts
    77

    Unhappy High current consumption on input Port A

    High all,

    Can anyone tell me why Port A and Port E would draw high current when in digital mode connected to +5V to read a DIP switch?

    I have ADCON1 = 7

    and have the 1st 6 bits connected to A0 to A5 and the last 2 bits to E0 and E1.

    I am reading currents of 200mA being drawn by the 16F877A ( frying!)

    I read the datasheet of PortA and it seems that when in digital all is just TTL inputs.

    What have I done wrong?

    Regards

    Chris

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


    Did you find this post helpful? Yes | No

    Default

    Are you sure you have all pins connected to +5V configured as inputs?
    Regards,

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

  3. #3
    Join Date
    Apr 2007
    Location
    Santiago, Chile
    Posts
    77


    Did you find this post helpful? Yes | No

    Default High current into PortA & E

    Yes, I think I have
    ADCON1 is set as 7, trisA=1 and TrisE0=1, trisE1=1 and trisE2=1

    Regards


    Chris

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


    Did you find this post helpful? Yes | No

    Default

    If TRISA = 1 you only have PORTA.0 configured as an input. If you're using A0 to A5 then
    you'll need TRISA = %00111111.
    Regards,

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

  5. #5
    Join Date
    Apr 2007
    Location
    Santiago, Chile
    Posts
    77


    Did you find this post helpful? Yes | No

    Unhappy High current into PortA & E

    Hi Bruce,

    How stupid can I get, I am so used to setting a whole port to outputs with trisA=0 that I forgot that BIN 11111111 = DEC 255.

    Excuse me for wasting your time!

    Regards

    Chris

Similar Threads

  1. SERIN MIDI out of Synch?
    By jncortes in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 9th June 2009, 20:08
  2. Old and beyond help ?
    By DavidFMarks in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 11th December 2008, 15:23
  3. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  4. sample code for M25P32
    By Pedro Santos in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 9th January 2007, 02:37
  5. 16F628A current high during sleep
    By Rubicon in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 9th October 2006, 10:21

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