Searching \ for '[PIC]: I /O pin RB6' 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=pic
Search entire site for: 'I /O pin RB6'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: I /O pin RB6'
2001\08\01@085243 by =?iso-8859-1?Q?=C5ke_Neehr?=

picon face
Hello!

I have asked the question before but here is
some fact:

Device: 16F870
In the config line the DEBUG is set to OFF
PORTB 0-3 is output  PORTB 4-7 is input.

To RB6 is a push-button switch connected
to ground and pulled up to + 5V via 10k
resistor.
When i pushing on the button the whole
programm stops running.
If I changed this switch to RB4 the programm
will works ok!
Of course, I can use I /O pin RB4 but I want
to know how the problem will be solved out.
I can´t find anything about this in Microchips
directions either.

Maybe, any members of this list has experience
of the problem and will share that with me ?

Regards
ÅkeN

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\08\01@105640 by electr=F3nico=29?=

flavicon
face
> Hello!
Hello

>
> I have asked the question before but here is
> some fact:
Ok, test this (I assume you're ussing MPLAB & MPASM)

       #include "p16f870.inc"

       ; CP1 CP0 DEBUG - WRT CPD LVP BODEN CP1 CP0 /PWRTE WDTE FOSC1 FOSC0
       ; 1   1   1     1 0   1   0   0     1   1    1     0    x     x
       __config b'11110100111011' & _YOUR_OSC_SETTING

       org 0x0000

       movlw b'11111110'               ;rb6 input, rb0 output
       banksel TRISB
       movwf TRISB

       banksel PORTB
loop    btfss PORTB,6           ;test portb.6 and repeat on portb.0
       bcf PORTB,0
       btfsc PORTB,6
       bsf PORTB,0
       goto loop

       end

And, if it fails, the chip is wrong. But if it works, you have a bug in your
code


Sergi Sanchez
Barcelona Tecnologia S.A.

http://www.piclist.org/techref/member/SSB-BTSA-ES

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


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