PIC24FJ64GA102 : I/O pins not working as i would to drive an actuator
i would like to drive an actuator. I used 2 signals Verin_Sens (pin RB2) and Verin_ON (pin RB11).
The driving of these 2 signals are done in _SPI1Interrupt()
To know the position of the actuator, 2 signals are listened to : signal VerinSignA on RB4 and Verin SignB on RA4.
For the moment, only RA4 is treated in CNInterrupt().
To open the actuator, i write RB2 = 1 and RB11 = 1. To close it, i write RB2 = 0 and RB11 = 1.
The actuator is driven when you push a button on pin RB9.
One problem is even if i wrote 0 on RB11, the actuator kept on going in the same direction without stopping.
Is anybody can help me to find what is wrong in my code ?
The applicaiton is attached (BDCOrder2.zip)