Hi,
I have not succeded in programming PIC12F629. Have anybody a simple code example .asm for experimental board VM111?
Hi,
I have not succeded in programming PIC12F629. Have anybody a simple code example .asm for experimental board VM111?
Hello there !
By judging from the number of views at this topic, maybe, it could be useful with a little
program to get started ?
;========================================================
;= =
;= Simple demo for PIC 12F629 and VM111 / K8048, =
;= =
;= by BRUSHLESS 333, 29/6-'14. =
;= =
;========================================================
INCLUDE P12F629.inc
__CONFIG _CPD_OFF & _CP_OFF & _BODEN_OFF & _MCLRE_ON & _PWRTE_ON & _WDT_OFF & _INTRC_OSC_NOCLKOUT
CBLOCK H'0020'
T1
T2
ENDC
ORG 0
GOTO BOOT
;-------------- DELAY ROUTINE --------------------------
DELAY MOVLW D'140'
MOVWF T1
LOOP_1 MOVLW D'255'
MOVWF T2
DECFSZ T2,F
GOTO $-1
DECFSZ T1,F
GOTO LOOP_1
RETLW 0
;-------------- BOOT-SEQUENCE --------------------------
BOOT MOVLW B'00000111'
MOVWF CMCON
BSF STATUS,RP0
MOVLW B'11000111'
MOVWF OPTION_REG
CLRF INTCON
MOVLW B'11101011'; GP3 cannot be an output !
MOVWF TRISIO
BCF STATUS,RP0
CLRF GP
;-------------- PROGRAM STARTS HERE --------------------
START BTFSS GP,5 ; awaits logic 1 from SW1...
GOTO $-1
;-------------- EFFECT 1 -------------------------------
BSF GP,2 ; turns on LD1
CALL DELAY
BCF GP,2 ; turns off LD1
CALL DELAY
BSF GP,4 ; turns on LD2
CALL DELAY
BCF GP,4 ; turns off LD2
CALL DELAY
GOTO START ; go back and read the switch...
END