Author |
Message |
Topic: PWM duty calculation |
AbuSaleh
Replies: 14
Views: 25055
|
Forum: General CCS C Discussion Posted: Sat Mar 16, 2013 4:36 am Subject: PWM duty calculation |
I have another question Mr. Ttelmah !
What is the better mode to use with the function setup_adc (mode)
ADC_CLOCK_INTERNAL or ADC_CLOCK_DIV_32 ?
Thanks. |
Topic: PWM duty calculation |
AbuSaleh
Replies: 14
Views: 25055
|
Forum: General CCS C Discussion Posted: Sat Mar 16, 2013 4:13 am Subject: PWM duty calculation |
Thank you very very much ! |
Topic: PWM duty calculation |
AbuSaleh
Replies: 14
Views: 25055
|
Forum: General CCS C Discussion Posted: Sat Mar 16, 2013 3:05 am Subject: PWM duty calculation |
It works well now.
Thank you all again !
I have the following function to read 50 samples of ADC channels and find the average, but I want to make sure whether the delays I'm using in the function i ... |
Topic: PWM duty calculation |
AbuSaleh
Replies: 14
Views: 25055
|
Forum: General CCS C Discussion Posted: Fri Mar 15, 2013 4:05 am Subject: PWM duty calculation |
Thanks alot guys !
I really appreciate your help. |
Topic: PWM duty calculation |
AbuSaleh
Replies: 14
Views: 25055
|
Forum: General CCS C Discussion Posted: Wed Mar 13, 2013 12:36 pm Subject: PWM duty calculation |
The following code is the shortest possible complete, compilable code which gives the 80% duty ratio. Some functions were removed to make it as short and clear as possible.
#include <30f6014a.h&g ... |
Topic: PWM duty calculation |
AbuSaleh
Replies: 14
Views: 25055
|
Forum: General CCS C Discussion Posted: Wed Mar 13, 2013 10:23 am Subject: PWM duty calculation |
Hey guys ! what's wrong ? I used the formula 2*(294+1) to find the maximum duty, but when I put duty=50% I get more than 80% duty in the oscilloscope. I randomly put 300 for maximum duty and I got abo ... |
Topic: PWM duty calculation |
AbuSaleh
Replies: 14
Views: 25055
|
Forum: General CCS C Discussion Posted: Wed Mar 13, 2013 6:57 am Subject: PWM duty calculation |
Thank you for help |
Topic: PWM duty calculation |
AbuSaleh
Replies: 14
Views: 25055
|
Forum: General CCS C Discussion Posted: Wed Mar 13, 2013 4:37 am Subject: PWM duty calculation |
I use dspic30f6014a to generate pwm signal with variable duty cycle but I have a problem to calculate the maximum duty value. The code is:
#include <30f6014a.h>
#device adc=10
#FUSES WPSA8, ... |
Topic: dspic30f programming problem |
AbuSaleh
Replies: 5
Views: 9317
|
Forum: General CCS C Discussion Posted: Mon Mar 11, 2013 1:00 pm Subject: dspic30f programming problem |
Thanks alot ! |
Topic: dspic30f programming problem |
AbuSaleh
Replies: 5
Views: 9317
|
Forum: General CCS C Discussion Posted: Mon Mar 11, 2013 5:13 am Subject: dspic30f programming problem |
Hi Ttelmah !
I went to the PCW pull down menu VIEW | Valid fuses and it showed all fuses with their descriptions. Regarding PUT fuse there are 3 types; PUT4, PUT16 and PUT64. And in the description i ... |
Topic: dspic30f programming problem |
AbuSaleh
Replies: 5
Views: 9317
|
Forum: General CCS C Discussion Posted: Mon Mar 11, 2013 4:45 am Subject: dspic30f programming problem |
Thank you Ttelmah for your quick reply. I have copied your code to my program, but when I compile it by CCS I get the following error:
Error 111 : Unknown keyword in #FUSES "PUT"
What do ... |
Topic: dspic30f programming problem |
AbuSaleh
Replies: 5
Views: 9317
|
Forum: General CCS C Discussion Posted: Mon Mar 11, 2013 3:21 am Subject: dspic30f programming problem |
I'm having a problem with dspic30f6014a programming. I have edited the code using CCS compiler PCW v4.104. When I import the hex file into MPLAB IDE v8.83, I get the following message:
" The con ... |
Topic: PIC18f4550 programming problem |
AbuSaleh
Replies: 3
Views: 5773
|
Forum: General CCS C Discussion Posted: Sun Dec 09, 2012 4:40 pm Subject: PIC18f4550 programming problem |
but I have already generated C code. I used Bloodshed just to check the generated ANSI C code, and now I want to compile this already C code using CCS, that mean I deal with C code not with fuzzy cont ... |
Topic: PIC18f4550 programming problem |
AbuSaleh
Replies: 3
Views: 5773
|
Forum: General CCS C Discussion Posted: Sun Dec 09, 2012 3:50 pm Subject: PIC18f4550 programming problem |
I used Simulink software to design a fuzzy logic controller. After that I used the Simulink built-in tool to generate C code from this model. I used Bloodshed software to compile and evaluate the gene ... |
|