Hi to all.
In my project I've used external interrupt. Rising edge on RB0 causes to occure an Interrupt. In the ISR, data are read from serial EEPROM. I've used a micro switch for determining the direction of movement. For example rising edge (1 to 0) implies right direction and falling edge (0 to 1) left direction. I need both of edge change detection. It means that in right direction should be done one thing and in left direction another thing. Unfortunately I can only detect one of directions: right or left! (By setting of OPTION register). How can I determine direction of movement?
At the first I wanted to implement it by PORTB chane interrupt (RBIE). I defined all of pins of portB as output except for RB0. But it didn't work and it was so unstable.
Please help me.
Thanks alot
Bookmarks