音影先锋亚洲天堂网|电影世界尽头的爱完整版播放|国产 熟女 91|高清无码免费观看欧美日韩|韩国一区二区三区黄色录像|美女亚洲加勒比在线|亚洲综合网 开心五月|7x成人在线入口|成人网站免费日韩毛片区|国产黄片?一级?二级?三级

登錄 免費注冊 首頁 | 行業(yè)黑名單 | 幫助
維庫電子市場網(wǎng)
技術(shù)交流 | 電路欣賞 | 工控天地 | 數(shù)字廣電 | 通信技術(shù) | 電源技術(shù) | 測控之家 | EMC技術(shù) | ARM技術(shù) | EDA技術(shù) | PCB技術(shù) | 嵌入式系統(tǒng)
驅(qū)動編程 | 集成電路 | 器件替換 | 模擬技術(shù) | 新手園地 | 單 片 機(jī) | DSP技術(shù) | MCU技術(shù) | IC 設(shè)計 | IC 產(chǎn)業(yè) | CAN-bus/DeviceNe

小弟剛接觸pic,自己編了一段程序,但是有警告望高手指點

作者:pest224420 欄目:單片機(jī)
小弟剛接觸pic,自己編了一段程序,但是有警告望高手指點
pcl equ 02h
status equ 03h
  rp0 equ 05h
  rp1 equ 06h
  irp equ 07h
ra equ 05h
  an0 equ 00h
rb equ 06h
  rb0 equ 00h
rc equ 07h
rd equ 08h
re equ 09h

trisa equ 85h
trisb equ 86h
trisc equ 87h
trisd equ 88h
trise equ 89h

adresh equ 1eh
adresl equ 9eh
adcon0 equ 1fh
adcon1 equ 9fh
incon equ 0bh
  gie equ 07h
  peie equ 06h
  rbie equ 03h
  rbif equ 00h
pir1 equ 0ch
  idif equ 06h
pie1 equ 8ch
  ADIE equ 06h

adresult equ 40h


num1 equ 20h
num2 equ 21h
num3 equ 22h
shownum1 equ 23h
shownum2 equ 24h
shownum3 equ 25h


   org 0000h
   goto main
   org 0050h
main  
   clrf adresult
   clrf num1
   clrf num2
   call delay
   nop
   bsf status,rp0
   bcf status,rp1
   bcf status,irp
   clrf trisc
   clrf trisd
   bcf status,rp0    
   bcf status,rp1
   movlw 05h
   movwf shownum1
   movlw 06h
   movwf shownum2
   movlw 07h
   movwf shownum3     
   call ledshow
stop goto stop

ledshow

   movlw 01h
   movwf rc
   movf shownum1,0
   andlw 0fh
   call convert
   movwf rd

   movlw 02h
   movwf rc
   movf shownum2,0
   andlw 0fh
   call convert
   movwf rd

   movlw 04h
   movwf rc
   movf shownum3,0
   andlw 0fh
   call convert
   movwf rd
   return

delay
   movlw 02h
   movwf num2
delay1
   movlw 08h
   movwf num1
delay2
   incf adresult,1
   decfsz num1,1   
   goto delay2
   decfsz num2,1
   goto delay1
   nop
   return

convert
   addwf pcl,1
table retlw 3fh
      retlw 06h
      retlw 5bh
      retlw 4fh
      retlw 66h
      retlw 6dh
      retlw 7dh
      retlw 07h
      retlw 7fh
      retlw 6fh

end

下面是調(diào)試信息,我看過手冊了,使用體0只要使rp1rp0=00就可以了啊,但是弄不懂為什么還有警告?/
Compiling ORG.ASM:
Command LINE: "C:\PROGRA~1\MPLAB\MPASMWIN.EXE /e+ /l+ /x- /c+ /p16F877 /q E:\PIC\PIC\ORG.ASM"
Warning[207] E:\PIC\PIC\ORG.ASM 3 : Found label after column 1. (rp0)
Warning[207] E:\PIC\PIC\ORG.ASM 4 : Found label after column 1. (rp1)
Warning[207] E:\PIC\PIC\ORG.ASM 5 : Found label after column 1. (irp)
Warning[207] E:\PIC\PIC\ORG.ASM 7 : Found label after column 1. (an0)
Warning[207] E:\PIC\PIC\ORG.ASM 9 : Found label after column 1. (rb0)
Warning[207] E:\PIC\PIC\ORG.ASM 25 : Found label after column 1. (gie)
Warning[207] E:\PIC\PIC\ORG.ASM 26 : Found label after column 1. (peie)
Warning[207] E:\PIC\PIC\ORG.ASM 27 : Found label after column 1. (rbie)
Warning[207] E:\PIC\PIC\ORG.ASM 28 : Found label after column 1. (rbif)
Warning[207] E:\PIC\PIC\ORG.ASM 30 : Found label after column 1. (idif)
Warning[207] E:\PIC\PIC\ORG.ASM 32 : Found label after column 1. (ADIE)
Message[302] E:\PIC\PIC\ORG.ASM 57 : Register in operand not in bank 0.  Ensure that bank bits are correct.
Message[302] E:\PIC\PIC\ORG.ASM 58 : Register in operand not in bank 0.  Ensure that bank bits are correct.
Warning[205] E:\PIC\PIC\ORG.ASM 122 : Found directive in column 1. (end)

Build completed successfully.

2樓: >>參與討論
張明峰
小問題
標(biāo)號定義應(yīng)該頂格,把:
  rp0 equ 05h
改成
rp0 equ 05h
其他類似。

關(guān)鍵詞,指令等不要頂格,如:把最后一行
end
改成
        end


3樓: >>參與討論
ghostami
既然要求指點,就應(yīng)該加上注釋,拔一毛而利天下,何樂而不為?
 
4樓: >>參與討論
huiyixx
小錯誤了,有例程序的話,認(rèn)真看一下就可以的了.
 
5樓: >>參與討論
pest224420
謝謝版主,問題已經(jīng)解決
 
6樓: >>參與討論
咖啡伴侶
怎么這么苛刻
 
7樓: >>參與討論
aderm
又小寫,看得很費事//問題不大,格式格式!
 
8樓: >>參與討論
king99112
小弟我想問一下,
小弟我想問一下,你main 后面的clrf,能不能實現(xiàn)清零啊,我遇到了執(zhí)行clrf后,寄存器的東西還是原來的狀態(tài),
小弟我困惑不解
好有就是我跟軟件自帶的程序,但是我照寫了一個自己編就通不過,
我高手指點

9樓: >>參與討論
mcu2002
to:king99112
register bank is convert?

參與討論
昵稱:
討論內(nèi)容:
 
 
相關(guān)帖子
請求幫助!關(guān)于我的手機(jī)
PIC有沒有帶兩路PWM或DA的便宜貨?/空
關(guān)于pic的外擴(kuò)ram和rom
關(guān)于PIC開發(fā)工具
這樣的定義在mcc18下通不過為什么?
免費注冊為維庫電子開發(fā)網(wǎng)會員,參與電子工程師社區(qū)討論,點此進(jìn)入


Copyright © 1998-2006 m.58mhw.cn 浙ICP證030469號