Exact match. Not showing close matches.
'[PIC]: Something funny with RB1 on 16F628'
|[PIC tag added -PAP]
> 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
Phil. | (\_/) This is Bunny. Copy and paste Bunny
philpem.me.uk | (='.'=) into your signature to help him gain piclist
http://www.philpem.me.uk/ | (")_(") world domination.
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 Fiedler wrote:
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.
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
On 3/14/07, Hans Ruopp <bluewin.ch> wrote: hruopp
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.
On 3/16/07, Tamas Rudnai <gmail.com> wrote: tamas.rudnai
More... (looser matching)
- Last day of these posts
- In 2007
, 2008 only
- New search...