سلام به همگی
من یه عمره دارم با CCS کد می زنم و مشکلی هم باهاش برنخوردم و تازه دارم dsPIC رو با 30F4013 شروع می کنم اما هر کاری می کنم نمی تونم حتی باهاش یه LED روشن کنم.
اینم کد ابتدایی و ساده ی من:
[code=c]
#include<30F4013.h>
#FUSES NOWDT,HS,NOBROWNOUT,NOPROTECT,NODEBUG
#use delay(clock=14745600)
void main()
{
set_tris_b(0x0000);
output_b(0xffff); //ON Pin in simulator
set_tris_d(0x0000);
output_d(0xffff); //ON Pin in simulator
set_tris_a(0x0000);
output_a(0xffff); //ON Pin in simulator
set_tris_f(0x0000);
output_f(0xffff); //ON Pin in simulator
set_tris_c(0x0000);
output_c(0xffff); //ON Pin in simulator
while(true)
{
}
}
[/code]
اگه کسی میتونه راهنمایی کنه
ممنون
من یه عمره دارم با CCS کد می زنم و مشکلی هم باهاش برنخوردم و تازه دارم dsPIC رو با 30F4013 شروع می کنم اما هر کاری می کنم نمی تونم حتی باهاش یه LED روشن کنم.
اینم کد ابتدایی و ساده ی من:
[code=c]
#include<30F4013.h>
#FUSES NOWDT,HS,NOBROWNOUT,NOPROTECT,NODEBUG
#use delay(clock=14745600)
void main()
{
set_tris_b(0x0000);
output_b(0xffff); //ON Pin in simulator
set_tris_d(0x0000);
output_d(0xffff); //ON Pin in simulator
set_tris_a(0x0000);
output_a(0xffff); //ON Pin in simulator
set_tris_f(0x0000);
output_f(0xffff); //ON Pin in simulator
set_tris_c(0x0000);
output_c(0xffff); //ON Pin in simulator
while(true)
{
}
}
[/code]
اگه کسی میتونه راهنمایی کنه
ممنون
دیدگاه