Monthly Archives: July 2015

PIC Gem Blink


LIST P=10F200
#include p10f200
__CONFIG _OSC_IntRC & _WDTE_OFF & _CP_OFF & _MCLRE_OFF

ORG 0
GOTO START
; subs go here
DELAY1 CLRF TMR0
WAIT1 MOVLW .255
SUBWF TMR0,0
BTFSS STATUS,Z
GOTO WAIT1
RETLW 0
; end subs

; main
START MOVLW B'11000111' ; Wake-up on change OFF, Weak Pull-ups OFF,
; internal clock source @ Fosc/4,
; increment on low-high,
; T0 prescaler 1:256
OPTION
MOVLW B'00001000'
TRIS GPIO
NOP
NOP
LOOP BSF GPIO,0
CALL DELAY1
CALL DELAY1
BCF GPIO,0
CALL DELAY1

BSF GPIO,1
CALL DELAY1
CALL DELAY1
BCF GPIO,1
CALL DELAY1

BSF GPIO,2
CALL DELAY1
CALL DELAY1
BCF GPIO,2
CALL DELAY1

GOTO LOOP
END