Saturday, February 23, 2019

pic 12f508 led blinking

pic 12f508 LED Blinking

 PIC 12F508 is a baseline PIC from Microchip Corporation. 

pic 12f508 consist of 8 pins, 5pins can be used for general purposes. how ever the 5th pin (GP2) can only use as a output. 1st pin is 5v+ and 8th pin is GND then the 4th pin is MCLR. 4th pin can be configured to use as a output put once programmed as so, will need a high voltage programmer to reprogram the chip again.

blinking program :

list p=12f508
include “p12f508.inc”
__config 0xFFFE


org 0
movlw 0x08
tris 0x06
movlw 0xDF
option
movlw 0xFF
movwf OSCCAL
START
clrf GPIO
M movlw 0xFF
movwf GPIO
call DELAY
clrf GPIO
call DELAY
goto M
DELAY
movlw 0xFF
movlw 0x10
DELAY1
decfsz 0x10,1
goto DELAY1
decfsz 0x12,1
goto DELAY1
retlw 0
END

-------------------------------------------------------------------

circuit :

 






 

No comments:

Post a Comment