CHAPTER 1 MR.PIC-IDE 1. MR.PIC-IDE... 2. MR.PIC-IDE 3. MR.PIC-IDE
4. MR.PIC-IDE 2. MR.PIC CHAPTER 2 1. MR.PIC
3`. MR.PIC
4. MR.PIC
5....
6. MR.PIC
CHAPTER 3 MR.PIC-IDE 1. MR.PIC-IDE MR.PIC-IDE
2.
...... /...,..,. 3., 3.
Ctrl-B. ( Ctrl- B
. MR.PIC-IDE.
3.
CHAPTER 4 MR.PIC PORT VDD DIODE DIODE 100 Ohm
2. PIC12C50X PIC16C5X 3. PIC12C508/509
OPTION MOVLW B'00001000' ; GP3 TRIS GPIO ; define direction CLRF GPIO LOOP BTFSC GP3 GOTO LOOP BSF GP0 CALL DELAY_RTN BCF GP0 LIST P=12C508 CALL DELAY_RTN BSF GP1 INDF EQU 00H CALL DELAY_RTN TMR0 EQU 01H BCF GP1 PCL EQU 02H CALL DELAY_RTN STATUS EQU 03H BSF GP2 FSR EQU 04H CALL DELAY_RTN OSCCAL EQU 05H BCF GP2 GPIO EQU 06H CALL DELAY_RTN BSF GP4 #DEFINE GP0 GPIO,0 CALL DELAY_RTN #DEFINE GP1 GPIO,1 BCF GP4 #DEFINE GP2 GPIO,2 CALL DELAY_RTN #DEFINE GP3 GPIO,3 BSF GP5 #DEFINE GP4 GPIO,4 CALL DELAY_RTN #DEFINE GP5 GPIO,5 BCF GP5 CALL DELAY_RTN VARIABLE LOOP_CNT1 = 07H GOTO LOOP VARIABLE LOOP_CNT2 = 08H DELAY_RTN ORG 1FFH MOVLW 00H MOVLW. 200 MOVWF LOOP_CNT2 ORG 00H CLRF LOOP_CNT1 MOVWF OSCCAL GOTO START DL_1 DECFSZ LOOP_CNT1 GOTO DL_1 DECFSZ LOOP_CNT2 START GOTO DL_1 MOVLW B'11000111' RETLW 0 ;GP0,GP1,GP3 END ; ;GP0,GP1,GP3 WEEK ;PULL-UPS
BCF GP4 CALL DELAY_RTN BSF GP5 CALL DELAY_RTN BCF GP5 CALL DELAY_RTN GOTO LOOP DELAY_RTN MOVLW.200 MOVWF LOOP_CNT2 CLRF LOOP_CNT1 DL_1 DECFSZ LOOP_CNT1 LIST P=16C56 GOTO DL_1 DECFSZ LOOP_CNT2 INDF EQU 00H GOTO DL_1 TMR0 EQU 01H RETLW 0 PCL EQU 02H END STATUS EQU 03H FSR EQU 04H OSCCAL EQU 05H PORTB EQU 06H #DEFINE GP0 PORTB,0 #DEFINE GP1 PORTB,1 #DEFINE GP2 PORTB,2 #DEFINE GP3 PORTB,3 #DEFINE GP4 PORTB,4 #DEFINE GP5 PORTB,5 VARIABLE VARIABLE LOOP_CNT1 = 07H LOOP_CNT2 = 08H ORG MOVLW ORG MOVWF GOTO 3FFH 33H 00h OSCCAL START_ROUTINE START_ROUTINE MOVLW B'11000111' ;GP0,GP1,GP3 Wake up ;GP0,GP1,GP3 WEEK PULL-UPS OPTION LIST INDF TMR0 PCL STATUS FSR OSCCAL PORTB #DEFINE #DEFINE #DEFINE #DEFINE #DEFINE #DEFINE VARIABLE VARIABLE P=16C58 EQU 00H EQU 01H EQU 02H EQU 03H EQU 04H EQU 05H EQU 06H GP0 PORTB,0 GP1 PORTB,1 GP2 PORTB,2 GP3 PORTB,3 GP4 PORTB,4 GP5 PORTB,5 LOOP_CNT1 = 07H LOOP_CNT2 = 08H MOVLW B'00001000' TRIS PORTB CLRF PORTB LOOP BTFSC GP3 GOTO LOOP BSF GP0 CALL DELAY_RTN BCF GP0 CALL DELAY_RTN BSF GP1 CALL DELAY_RTN BCF GP1 CALL DELAY_RTN BSF GP2 CALL DELAY_RTN BCF GP2 CALL DELAY_RTN BSF GP4 CALL DELAY_RTN ORG MOVLW ORG MOVWF GOTO START_ROUTINE MOVLW OPTION MOVLW TRIS CLRF 7FFH 33H 00H OSCCAL START_ROUTINE B'11000111' B'00001000' PORTB PORTB
4. PIC12CXXX Filter
OSC1 / GP5 OSC2 / GP4 MCLR / GP3 T0CKI / GP2
5. PIC12C67X LIST P=12C671 : (.) ORG 3FFH RETLW ORG CALL 55H 00H 3FFH ;OSCCAL RETLW XX BSF STATUS,5 MOVWF OSCCAL
VCC 10K S/W LED0 LED1 LED2 U? 1 VDD 2 GP5/OSC1/CLKIN 3 GP4/OSC2/AN3/CLKOUT 4 GP3/MCLR/VPP PIC12C67X VSS 8 7 GP0/AN0 GP1/AN1/VREF 6 GP2/T0CKI/AN2/INT 5 LED3 LED4 LIST P=12C671 INDF EQU 00H TMR0 EQU 01H PCL EQU 02H STATUS EQU 03H FSR EQU 04H GPIO EQU 05H PCLATH EQU 0AH INTCON EQU 0BH PIR1 EQU 0CH ADRES EQU 1EH ADCON0 EQU 1FH OPTIONR EQU 01H TRISR EQU 05H PIE1 EQU 0CH PCON EQU 0EH OSCCAL EQU 0FH ADCON1 EQU 1FH
#DEFINE GP0 GPIO,0 #DEFINE GP1 GPIO,1 #DEFINE GP2 GPIO,2 #DEFINE GP3 GPIO,3 #DEFINE GP4 GPIO,4 #DEFINE GP5 GPIO,5 VARIABLE VARIABLE ORG RETLW ORG CALL BSF MOVWF LOOP_CNT1 = 20H LOOP_CNT2 = 21H 3FFH 55H 00H 3FFH STATUS,5 OSCCAL 6. PIC16F877 START_ROUTINE MOVLW B'11000111' OPTION MOVLW 07H MOVWF ADCON1 MOVLW B'00001000' TRIS GPIO BCF STATUS,5 CLRF GPIO LOOP BTFSC GP3 GOTO LOOP BSF GP0 CALL DELAY_RTN BCF GP0 CALL DELAY_RTN BSF GP1 CALL DELAY_RTN BCF GP1 CALL DELAY_RTN BSF GP2 CALL DELAY_RTN BCF GP2 CALL DELAY_RTN BSF GP4 CALL DELAY_RTN BCF GP4 CALL DELAY_RTN BSF GP5 CALL DELAY_RTN BCF GP5 CALL DELAY_RTN GOTO LOOP DELAY_RTN MOVLW.200 MOVWF LOOP_CNT2 CLRF LOOP_CNT1 DL_1 DECFSZ LOOP_CNT1 GOTO DL_1 DECFSZ LOOP_CNT2 GOTO DL_1 RETLW 0 END
CHAPTER 5 1. 2. ME Chip
3. MRPIC-IDE
RB3 RB1 VCC RB5 RB4 RB7 330 * 8 ea VSS RB6 RB2 RB0 VDD LED
CHAPTER 6 MR.PIC-PGM, PRO ENGINE II 1. MR.PIC-PGM
2. PRO ENGINE-II www.comfile.co.kr
3. 4. MR.PIC-PGM
5. 6. MR.PIC-PGM
LIST P=PIC16F877 SIJAK BSF STATUS,5 ; BANK1 MOVLW 00H MOVWF TRISB BCF STATUS,5 ;BANK0 CLRF BF ; BF CLRF PORTB MAIN_LOOP CALL ADDR1 MOVWF PORTB CALL ADDR2 MOVWF PORTB MAIN_1 GOTO MAIN_1 END STATUS EQU 03H PORTB EQU 06H TRISB EQU 06H VARIABLE BF = 20H ORG 0 ; RESET VECROR GOTO SIJAK ; GOTO TEST ORG 2 ADDR1 RETLW 00H ; 0 00H. ADDR2 RETLW 00H ; 0 00H.
7. MR.PIC-PGM 8. PRO ENGINE-II
9. ENG-1214 PIC12 C508
1. CHAPTER 7 FAQ
2. FAQ ( )
PIC16F877 PIC16C77 PIC16C64 PIC16C73 PIC16C65 PIC16C72 PIC16C74 PIC16C63 PIC16C62 PIC16C76 PIC16C67 PIC16C66 PIC16F876 PIC16F874 PIC16F873 PIC16F872
LIST P=16C711 INDF EQU 00H TMR0 EQU 01H PC EQU 02H STATUS EQU 03H FSR EQU 04H PORTA EQU 05H PORTB EQU 06H PCLATH EQU 0AH INTCON EQU 0BH ADRES EQU 09H ADCON0 EQU 08H OPTIONR EQU 01H TRISA EQU 05H TRISB EQU 06H PCON EQU 87H ADCON1 EQU 88H ORG 0 SIJAK BSF STATUS,5 CLRF TRISA ; MOVLW 03H ; MOVWF ADCON1 BCF STATUS,5 CLRF PORTA BSF PORTA,0 MAIN_LOOP BTFSS GOTO PORTA,0 MAIN_LOOP BSF BSF PORTA,1 PORTA,2 BSF PORTA,3 GOTO MAIN_LOOP END
www.comfle.co.kr
CHAPTER 8 MR.PIC Errata & ETC 1. MRPIC-IDE V12.6
2. PIC Micro controller Package Type
3. PIC Family Identification System