Thanks for answering.I don't want nothing extreme.Just to have a number in PIC16F876(for example 16 degrees or 352.16 degrees,something like that) how many degrees the motor turned. The concept is to make a PD controller.But in order to make the PD controller i must subtract the desire degrees of rotating the motor (turn 5 degrees) with the actual.And i want to control the actual degree.The first i made it with a SERIN2.They said to me that the encoder gives pulses and in order to make them 0 or 1 i must have the HCTL.Is that wrong?
i really didn't understand much from your code (f.e what is >>6).Can you be please more specific?Sorry but i am now beginning....
Bookmarks