程序:<br /><br />status equ 3h<br />portb equ 6h<br />trisb equ 86h<br />portc equ 7h<br />trisc equ 87h<br />data1 equ 20h<br />data2 equ 21h<br />n1 equ d'13'<br />n2 equ 0ffh<br />rp0 equ 5h<br /> org 000h<br /> nop<br /> bsf status,rp0<br /> movlw 00h<br /> movwf trisc<br /> movlw 0ffh<br /> movwf trisb<br /> bcf status,rp0<br /> movlw 00h<br /> movwf portc<br />check btfsc portb,0<br /> goto check<br /> call delay<br /> btfsc portb,0<br /> goto check<br /> incf portc<br />check1 btfss portb,0<br /> goto check1<br /> call delay <br /> btfss portb,0<br /> goto check1<br /> goto check<br />;*******10ms delay***********<br />delay<br /> movlw n1<br /> movwf data1<br />lp0 movlw n2<br /> movwf data2<br />lp1 decfsz data2,1<br /> goto lp1<br /> decfsz data1,1<br /> goto lp0<br /> return<br /> end<br /><br />错误:<br /><br />Programming Target...<br />...Validating configuration fields<br />...Erasing Part<br />...Programming Program Memory (0x0 - 0x1F)<br />...Loading DebugExecutive<br />...Programming DebugExecutive<br />...Programming Debug Vector<br />Verifying...<br />...Program Memory<br />ICD0161: Verify failed (MemType = Program, Address = 0x3, Expected Val = 0x87, Val Read = 0x86)<br />ICD0275: Programming failed.<br />MPLAB ICD 2 Ready<br />请问一下是什么原因啊?软件仿真没有问题的<br /> |
|