Page 1 of 1

How to get the RB0INT to work ??

Posted: Tue Mar 09, 2010 4:41 pm
by ksor
I have build up the attached program form scratch similar to one of the tutorials - a pushbutton on the RB0INT should count up and show result on LEDs on port B.

In Flowcode it workes fine but my hardware version is not functioning.

Of cause I have no LED on RB0 pin 6 where my pushbutton is connected to 0V and a 10K resistor to +5V.

I too have a 10K resistor from +5V to pin 4 (MCLR).

I would have expected a count up every time I releases the pushbutton but nothing happens.

I have to use a wire on pin 6 and short it to 0V and then to +5V and back again to 0V to make it count.

My next step was to put a 5V square wave to pin 6 but I want see it counting with the pushbutton first.

Why does the pushbutton do no counting ?

Re: How to get the RB0INT to work ??

Posted: Wed Mar 10, 2010 12:43 pm
by Steve
I think the problem is because in your program you are setting the output of the B0 pin. In your "output" icon, you should use masking and untick the bit "0". This will maintain this pin as an input.

Re: How to get the RB0INT to work ??

Posted: Thu Mar 11, 2010 1:56 pm
by ksor
OK - I got it !