create new project for pic in ccs
FSio said:
wonbinbk,
I believe that your problem are #fuses from uC, They are not defined.
Otherwise, the freq is too much.
Can you send me your project to help you?
Best Regards
Dear FSio!
Thank you for your advice. I will send you my project on English. Hope it useful for you.
My code is wrong. Thank for all your advies.
yeah! I wrote this code too hurriedly.
I test with CCS on the simplest program to check if i could write CCS. And I have a problem on PWM. ADC, I/O ... is Ok! Please help me!
I use CCS to compile, PICsimulatorIDE to simulate it after compiled.
Here the code:
// PIC16F88
// PWM output on RB3. This is the default. I don't know how to change PWM output to RB0.
#include <16F88.h>
#use delay(clock=4000000)
#fuses NOWDT,XT //Thanks FSio!
void main()
{
Setup_CCP1(CCP_PWM);
Setup_Timer_2(T2_DIV_BY_4, 199,1) ; // I want the period is 800us.
Set_PWM1_duty(400); // with duty=400us.
Loop:
Goto loop; //I know this is a weird loop. But If I use the While(1), PICsimu
// not run "loop", just do some instructions, then stop.
}
But when I use PICsimu, and an Oscilo (PICsimu) on RB3, I don't see anything happen except the ray go on "0" logic. Hic! Help me!