scgoo
Newbie level 4
i'm the newbie for PIC programming...
i'm using pic16f628. i now trying the simple program on the pic .. but it seems doesnt work. i'm using 20MHz cyrstal and two 3.3uF capacitor.
the LED is on , but it doesnt blink.. any problem with the crystal using??
this is my code
@ DEVICE pic16F628, WDT_OFF
@ DEVICE pic16F628, PWRT_OFF
@ DEVICE pic16F628, MCLR_OFF
@ DEVICE pic16F628, BOD_OFF
@ DEVICE pic16F628, LVP_OFF
@ DEVICE pic16F628, CPD_OFF
@ DEVICE PIC16F628, HS_OSC
@ DEVICE pic16F628, PROTECT_OFF
define OSC 20
CMCON = 7
VRCON = 0
TRISA = %11111101
loop:
PORTA.1 = 1
pause 500
PORTA.1 = 0
pause 500
goto loop
end
i'm using pic16f628. i now trying the simple program on the pic .. but it seems doesnt work. i'm using 20MHz cyrstal and two 3.3uF capacitor.
the LED is on , but it doesnt blink.. any problem with the crystal using??
this is my code
@ DEVICE pic16F628, WDT_OFF
@ DEVICE pic16F628, PWRT_OFF
@ DEVICE pic16F628, MCLR_OFF
@ DEVICE pic16F628, BOD_OFF
@ DEVICE pic16F628, LVP_OFF
@ DEVICE pic16F628, CPD_OFF
@ DEVICE PIC16F628, HS_OSC
@ DEVICE pic16F628, PROTECT_OFF
define OSC 20
CMCON = 7
VRCON = 0
TRISA = %11111101
loop:
PORTA.1 = 1
pause 500
PORTA.1 = 0
pause 500
goto loop
end