Trích:
Nguyên văn bởi boylikerock197
Em viết chương trình để cho đèn led ở chân số 2 sáng nhưng không chạy
#include <12F629.h>
#FUSES NOWDT //No Watch Dog Timer
#FUSES INTRC_IO //Internal RC Osc, no CLKOUT
#FUSES NOCPD //No EE protection
#FUSES NOPROTECT //Code not protected from reading
#FUSES MCLR //Master Clear pin enabled
#FUSES NOPUT //No Power Up Timer
#FUSES BROWNOUT //Reset when brownout detected
#FUSES BANDGAP_HIGH
#FUSES RESERVED //Used to set the reserved FUSE bits
#use delay(clock=4000000)
void main()
{
while(1)
{
output_low(PIN_A0);//A0=GP0
}
}
|
Bạn đã cấu hình phần cứng cho chân MCLR chưa? (Nối trở với VCC thì phải)