Hi,
I have been searching the net for some help, and stumbled upon this site that appears to have a wealth of information, and some rather intelligent people on it I have carried out a search, but to no avail
I have this project to do:
Turn a pot, which in turn communicates with a PIC18F252 to carry out PWM in order to move a motor/gearbox, using a bridge chip. The motor/gearbox has another pot connected to the shaft, which needs to send a feedback signal to the PIC.
I'm fairly happy with how most of the program will work, with the exception of applying a control algorithm to control the PWM, therefore altering how the motor/gearbox responds to the input pot. My best guess is that I need to update a memory location with the algorithm writing to it, and the PWM reading from it, therefore setting the duty cycle as required.
I will be using MATLAB to devise my control algorithm, and have been informed that it is fairly easy to transform this into the Z domain for the PIC.
My ultimate question is how would I implement this Z code in a way that is suitable for C???
I have limited experience with C, so please bear with me. I have been thrown into the deep end!
Any guidance is appreciated