Page 1 of 1

how to write pic code for transfer function in pic?

PostPosted: Wed Nov 23, 2011 7:21 pm
by mrbong
matlab can write transfer function. but how about pic?
can i write code for transfer function in pic?
anyone can guide me?
thanks :D

Re: how to write pic code for transfer function in pic?

PostPosted: Wed Nov 23, 2011 8:31 pm
by Brian Griffin
Depends on the transfer function itself. Transfer functions can be very complex and difficult to be implemented in a small microcontroller/processor.

If it involves filtering, you may need a faster PIC.

Re: how to write pic code for transfer function in pic?

PostPosted: Thu Nov 24, 2011 6:26 pm
by mrbong
ya, my project involve filtering, that is recursive least square filter to minimize the error in a dc motor.
what i do is to develop source code for dc motor, can help me by giving existing example for motor? i need to run the motor with pic, because i am begineer, so i am quite blur with pic command. ;)

Re: how to write pic code for transfer function in pic?

PostPosted: Thu Nov 24, 2011 6:48 pm
by Brian Griffin
mrbong WROTE:ya, my project involve filtering, that is recursive least square filter to minimize the error in a dc motor.
what i do is to develop source code for dc motor, can help me by giving existing example for motor? i need to run the motor with pic, because i am begineer, so i am quite blur with pic command. ;)


If you are using PIC16/18F, it isn't easy to do it because the processor is very limited in nature. You may have to try dsPIC ones.

Have you tested the filter in Matlab first? Make sure it outputs the correct values?