Author |
Message |
Topic: Scaled Integer Math |
Rodders
Replies: 1
Views: 3427
|
Forum: General CCS C Discussion Posted: Mon Apr 12, 2010 9:58 am Subject: Scaled Integer Math |
Hi guys,
I have been writing a program whereby I need to use integers instead of floats because floating point calculation will take more time in a system I need to be processing data as quickly as ... |
Topic: Float variable for pwm duty |
Rodders
Replies: 10
Views: 11272
|
Forum: General CCS C Discussion Posted: Mon Mar 29, 2010 10:41 am Subject: Float variable for pwm duty |
I am now using scaled integers for my PD settings and the oscillation is almost gone.
For further improvement in the efficiency of my comparator circuit, do you guys recon I should use a more mode ... |
Topic: Float variable for pwm duty |
Rodders
Replies: 10
Views: 11272
|
Forum: General CCS C Discussion Posted: Wed Mar 24, 2010 8:06 am Subject: Oscillation Problem |
Thanks, I was worried much by the prospect that DC motors can't respond to quick PWM changes.
The robot follows the line perfectly fine using just kp, but oscillation becomes a major problem when ... |
Topic: Float variable for pwm duty |
Rodders
Replies: 10
Views: 11272
|
Forum: General CCS C Discussion Posted: Tue Mar 23, 2010 6:15 pm Subject: Float variable for pwm duty |
For our PID control of the robot, sometimes the Robot overshoots when the average speed is set higher. We are currently using kp and kd without ki because whenever we insert ki, the robot is going hay ... |
Topic: Float variable for pwm duty |
Rodders
Replies: 10
Views: 11272
|
Forum: General CCS C Discussion Posted: Mon Mar 22, 2010 9:03 pm Subject: Float variable for pwm duty |
CCS Manual says that the pwm duty cycle value can not be a float and
that only 8 bit or 16 bit integers can be used.
See this recent thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=42010 ... |
Topic: Float variable for pwm duty |
Rodders
Replies: 10
Views: 11272
|
Forum: General CCS C Discussion Posted: Mon Mar 22, 2010 7:01 pm Subject: Float variable for pwm duty |
HI guys,
I have been implementing PID on my line following robot and I've run into the roadblock because the CCS Manual says that the pwm duty cycle value can not be a float and that only 8 bit or ... |
Topic: Changing PWM duty cycles |
Rodders
Replies: 8
Views: 7860
|
Forum: General CCS C Discussion Posted: Fri Mar 05, 2010 4:30 pm Subject: Changing PWM duty cycles |
However, I burned 2 PICS and am wondering should we use 4 diodes
when connecting the the inputs from the H-bridge to the motors?
By "burned", do you mean "destroyed" or &qu ... |
Topic: Changing PWM duty cycles |
Rodders
Replies: 8
Views: 7860
|
Forum: General CCS C Discussion Posted: Fri Mar 05, 2010 2:59 pm Subject: Changing PWM duty cycles |
The code works fine now. I used a Switch case menu and the robot processes fine the line readings and converts them into motion.
However, I burned 2 PICS and am wondering should we use 4 diodes wh ... |
Topic: Changing PWM duty cycles |
Rodders
Replies: 8
Views: 7860
|
Forum: General CCS C Discussion Posted: Thu Mar 04, 2010 7:38 pm Subject: Changing PWM duty cycles |
Look at this table in the 18F26K20 data sheet. What are the SFR addresses ?
TABLE 5-1: SPECIAL FUNCTION REGISTER MAP FOR PIC18F2XK20/4XK20 DEVICES
The exact same addresses I used to set up my p ... |
Topic: Changing PWM duty cycles |
Rodders
Replies: 8
Views: 7860
|
Forum: General CCS C Discussion Posted: Thu Mar 04, 2010 6:34 pm Subject: Changing PWM duty cycles |
Look at this table in the 18F26K20 data sheet. What are the SFR addresses ?
TABLE 5-1: SPECIAL FUNCTION REGISTER MAP FOR PIC18F2XK20/4XK20 DEVICES
The exact same addresses I used to set up my p ... |
Topic: Changing PWM duty cycles |
Rodders
Replies: 8
Views: 7860
|
Forum: General CCS C Discussion Posted: Thu Mar 04, 2010 6:06 pm Subject: Changing PWM duty cycles |
#byte Port_A=0X80 // file address of Port B
#byte Tris_A=0X92 // file address of Tris B
#byte Port_B=0X81 // file address of Port A
#byte Tris_B=0X93 // file address of Tris A
#byte Port_ ... |
Topic: Changing PWM duty cycles |
Rodders
Replies: 8
Views: 7860
|
Forum: General CCS C Discussion Posted: Thu Mar 04, 2010 5:10 pm Subject: Changing PWM duty cycles |
NO MESSAGE |
|