Searching \ for '[PIC]: Something funny with RB1 on 16F628' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=16F
Search entire site for: 'Something funny with RB1 on 16F628'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Something funny with RB1 on 16F628'
2007\03\14@112500 by Philip Pemberton

face
flavicon
face
[PIC tag added -PAP]

slippyr4 wrote:
>                banksel PORTB  ; set all outputs high
>                movlw   0b11111111
>                movwf        PORTB
>
> when I run that code, RB0 does indeed go high, but RB1 does not. it
> stays firmly low. Currently, these pins are tied to ground via 10K; i
> am testing high and low with my scope.

RB1? That is odd. If you'd said RA1, I'd have suggested turning off the
comparator module (BANKSEL CMCON, MOVLW H'07', MOVWF CMCON)...

The only other thing it could be is that you're turning the UART on somewhere,
but IIRC the UART module doesn't force the pins to the correct I/O state. Or
it could be the USSP module - that uses RB1 for its data I/O line. If it's in
I2C slave mode, it'll continually listen for a start signal and the device
address.

--
Phil.                         |  (\_/)  This is Bunny. Copy and paste Bunny
spam_OUTpiclistTakeThisOuTspamphilpem.me.uk         | (='.'=) into your signature to help him gain
http://www.philpem.me.uk/     | (")_(") world domination.

2007\03\14@132548 by Gerhard Fiedler

picon face
Philip Pemberton wrote:

> [PIC tag added -PAP]
>
> slippyr4 wrote:
>>                banksel PORTB  ; set all outputs high
>>                movlw   0b11111111
>>                movwf        PORTB
>>
>> when I run that code, RB0 does indeed go high, but RB1 does not. it
>> stays firmly low. Currently, these pins are tied to ground via 10K; i
>> am testing high and low with my scope.
>
> RB1? That is odd. If you'd said RA1, I'd have suggested turning off the
> comparator module (BANKSEL CMCON, MOVLW H'07', MOVWF CMCON)...

I haven't seen the other messages in this thread, and maybe it's too
obvious... is TRISB all 0? :)

Gerhard

2007\03\14@134951 by Hans Ruopp

flavicon
face
Gerhard Fiedler wrote:
{Quote hidden}

Have you tried the code in another chip?

Once I had a problem with RB6 in an 877A and in fact the pin was dead.

Just a guess.

Hans

2007\03\16@061046 by Tamas Rudnai

face picon face
Jon,

What type of compiler are you using? For me MPLAB says something wrong with
the 0b11111111 and checking with simulator it turned out it uses the
standard radix which is for me hex. So WREG becomes H'11' instead of
B'11111111'...

Tamas




On 3/14/07, Hans Ruopp <.....hruoppKILLspamspam@spam@bluewin.ch> wrote:
{Quote hidden}

> -

2007\03\16@061451 by Tamas Rudnai

face picon face
Oh, just got it, 0b also a valid hex number, and it said that 10 digit hex
number you gave is just too huge to store in 8 bits - but that's only a
warning in first place.

Tamas


On 3/16/07, Tamas Rudnai <tamas.rudnaispamKILLspamgmail.com> wrote:
{Quote hidden}

More... (looser matching)
- Last day of these posts
- In 2007 , 2008 only
- Today
- New search...