Hailua8x
16-07-2009, 11:45 PM
em tìm ra được một lệnh dùng để nhân tần số fcy trong CCS nhưng hông bít nó haọt động sao, khi em sử dung nó cứ báo lổi hoài:
//application is using a 10Mhz oscillator, but using the 4x PLL
//to upscale it to 40Mhz. Compiler will set H4 config bit.
#use delay(clock=40M, oscillator=10M)
đây là chương trình mà em viết:
#include<16F877A.h>
#fuses NOWDT,PUT,Hs,NOPROTECT
#use delay(clock=40M,oscillator=10M)
void main()
{
while(true)
{
output_high(PIN_B0);
delay_ms(1000);
output_low(PIN_B0);
delay_ms(1000);
}
}
mong được mấy anh giúp đở
//application is using a 10Mhz oscillator, but using the 4x PLL
//to upscale it to 40Mhz. Compiler will set H4 config bit.
#use delay(clock=40M, oscillator=10M)
đây là chương trình mà em viết:
#include<16F877A.h>
#fuses NOWDT,PUT,Hs,NOPROTECT
#use delay(clock=40M,oscillator=10M)
void main()
{
while(true)
{
output_high(PIN_B0);
delay_ms(1000);
output_low(PIN_B0);
delay_ms(1000);
}
}
mong được mấy anh giúp đở