PIC18F2550 RB0 RB1 RB5 input problem

General discussion on mikroC.
Post Reply
Author
Message
aron
Posts: 7
Joined: 06 Mar 2009 13:04

PIC18F2550 RB0 RB1 RB5 input problem

#1 Post by aron » 11 Jun 2011 17:11

Hi!

I noticed a strange behaviour. When turning RBPU=0 and TRISB = 0xFF, PORTB pins rise to logical 1 (as documented).
But when TRISB = 0b11011111 then RB0 RB1 RB5 remains low.

If TRISB2_bit is set to true, everything woks as expected.

Is this behaviour documented somewhere ?

Registers:

Code: Select all

  USBEN_bit = 0;
  RBPU_bit = 0;
  ADCON0 = 0b00000000;
  ADCON1 = 0b00001111;

  TRISA = 0x00;
  TRISB = 0b11011111;
  TRISC = 0b00000001;

Muphy
Posts: 318
Joined: 24 Feb 2008 14:05
Location: Stonehaven Scotland

Re: PIC18F2550 RB0 RB1 RB5 input problem

#2 Post by Muphy » 14 Jun 2011 20:47

Hmmm,

Do not have same chip but tested on 18F452 and it behaved as expected i.e. LED for B5 went out when the TRIS set it to an output. Remember, these are weak pull ups, you are not trying to pull the pins down anywhere else??

Perhaps someone with an 18F2550 can also test this.

Curious


M

Post Reply

Return to “mikroC General”