Hi to all. I want to use a rotary encoder with a 18f252, and i have a lot of troubles. I want to use interupts, so my only solution PORTB or I can use Portc also?
I made a pcb and I made the connections to PORTC, and I also use a debounce circuit, which I think causes problems. Anyone has a snipset code cause I do not have any expieriance with encoders?
5v
__|__
| |
/ /
\ \
/10k / 10K
\ \
| A | B ENC
- -
| |-------------------------------
\ |
/10K \
\ /10K
/ \
|--------------------- |--------------------
PORTC.2 | PORTC.3 |
---- ----- 100nF
---- -----
| |
--------- -----------
----- -----
- -




Bookmarks