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 ?
How to get the RB0INT to work ??
Moderator: Benj
How to get the RB0INT to work ??
- Attachments
-
- 10 RB0 interrupts.FCF
- (6 KiB) Downloaded 267 times
Best regards
KSor, Denmark
KSor, Denmark
- Steve
- Matrix Staff
- Posts: 3434
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
Re: How to get the RB0INT to work ??
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.