[SOLVED] PID implementation on 8bit microcontroller PIC16f877a

Status
Not open for further replies.

--BawA--

Advanced Member level 1
Joined
Nov 28, 2012
Messages
479
Helped
43
Reputation
86
Reaction score
42
Trophy points
1,318
Location
Noida, INDIA
Visit site
Activity points
4,931
hey , i want to implement the PID on PIC16F877a, i am using mikroc pro for coding.
the input feedback data read by the adc can vary from 0 to 1023 (10 bit),
on the basis of input data from ADC , the pwm will be generated to keep the ouput voltage constant. the duty cycle of pwm can vary from 0 to 250.
0 corresponds to 0 volts at the output , while 250 corresponds to 20v at the output ,
i want to keep the output at 14v constant .
so how to implement the PID in mikroc , can anyone give me some sample code or algo to implemnt this.?
 


The problem is .should i map the 10 bit data to 8bit before implementing the pid or not?
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…