CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Search found 11 matches
CCS Forum Index
Author Message
  Topic: here is my question again,...look inside , thanks
gunking88

Replies: 2
Views: 6886

PostForum: General CCS C Discussion   Posted: Tue Aug 10, 2004 9:05 am   Subject: here is my question again,...look inside , thanks
part of my code..
...
signed int16 error=0; // real error read from ADC
...
signed int16 vout=0;
signed int16 vref=204; //204 in 8 bits for 4V, output at 12V

every 50us following executes
...
  Topic: how can I make the table lookup faster? thanks
gunking88

Replies: 7
Views: 13414

PostForum: General CCS C Discussion   Posted: Tue Aug 03, 2004 5:39 pm   Subject: thanks for your reply and finding another mistake in side..
but I checked with break point,
from
error=error+5;
// implement digital PID by reading table.
u=u_1+aerror_1=error;
error_2=error_1;
This looks like an error too, most like ...
  Topic: how can I make the table lookup faster? thanks
gunking88

Replies: 7
Views: 13414

PostForum: General CCS C Discussion   Posted: Tue Aug 03, 2004 3:21 pm   Subject: table lookup+A/D take 40.3us to get a new duty...sigh...
it looks like I have to run at 50us, 20khz.

I would recomend not running this with interupts.

This is what I would do.

While(!PWM_Timer_Interupt_Flag_Set)
{ PWM_Timer_Interupt_ ...
  Topic: how can I make the table lookup faster? thanks
gunking88

Replies: 7
Views: 13414

PostForum: General CCS C Discussion   Posted: Tue Aug 03, 2004 3:16 pm   Subject: yes, here is a mistake...
should be u=u_1+a u=u_1+aIs this your real code or a simplified version of it? Now the index into the three arrays is the same, so you can simplify the calculation by using only a single array instead ...
  Topic: how can I make the table lookup faster? thanks
gunking88

Replies: 7
Views: 13414

PostForum: General CCS C Discussion   Posted: Tue Aug 03, 2004 12:35 pm   Subject: how can I make the table lookup faster? thanks
I have been trying to make a controller for DC/DC converter. and I first try the switching frequency at 40kHz, 25us. I would like the duty cycle can be updated at same frequency, which means only 25us ...
  Topic: problem of table look up.. thanks a lot
gunking88

Replies: 3
Views: 8990

PostForum: General CCS C Discussion   Posted: Mon Aug 02, 2004 9:26 am   Subject: yes, I can just use fixed point
I check the possible value, 0.5 makes no big different at new_dutycycle(0-249). thanks.

Why are you using FLOATING POINT???
Fixed point is MUCH faster. Where speed matters never use floating poi ...
  Topic: Define a string
gunking88

Replies: 14
Views: 22996

PostForum: General CCS C Discussion   Posted: Mon Aug 02, 2004 9:21 am   Subject: hi, Ttelmah, could you check my post at your convenience?thx
at http://www.ccsinfo.com/forum/viewtopic.php?t=20085

thanks a lot,

have a good day

gun
  Topic: problem of table look up.. thanks a lot
gunking88

Replies: 3
Views: 8990

PostForum: General CCS C Discussion   Posted: Sun Aug 01, 2004 7:23 pm   Subject: problem of table look up.. thanks a lot
I am doing a project to using PIC chip to control a dc/dc converter. here is my problem.
when calculation of of new duty cycle involves the PID or other type controller, it employs the floating numb ...
  Topic: Could somebody check the code for me? PWM,PI control. thanks
gunking88

Replies: 7
Views: 19306

PostForum: General CCS C Discussion   Posted: Wed Jun 23, 2004 11:36 am   Subject: Could somebody check the code for me? PWM,PI control. thanks
thank you so much for your massage here.it is quite helpful,and I am checking it now.
since the project you mentioned is quite similar with mine. is it possible for you to send me the source code? or ...
  Topic: Could somebody check the code for me? PWM,PI control. thanks
gunking88

Replies: 7
Views: 19306

PostForum: General CCS C Discussion   Posted: Tue Jun 22, 2004 2:18 pm   Subject: Could somebody check the code for me? PWM,PI control. thanks
I am doing one project for DC/DC converter.40kHz.the following code is a test code for the function feedback and set PWM dutycycle. but I always can't get the good result .could somebody check it for ...
  Topic: 18F452 Enhanced PWM mode setup in CCS
gunking88

Replies: 1
Views: 7175

PostForum: General CCS C Discussion   Posted: Fri Jun 18, 2004 1:49 pm   Subject: 18F452 Enhanced PWM mode setup in CCS
hi, all, I have a question about :18F452 Enhanced PWM mode setup in CCS
is there any built-in function to setup Enhanced PWM mode with two PWM signal output for push pull application? thanks a lot
 
Page 1 of 1
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group