• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
:::


Browsing this Thread:   1 Anonymous Users






Re: 18F452 的 FSR怎么用?
#5
資深會員
資深會員


查看用戶資訊
-----------------------------
清除 RAM 0x30 ~0x3F使用間接索引定址方式

    CLRF      FSR0H
    movlw   0x30       
Set the RAM starting point
    movwf   FSR0L      
Set the point to FSR Reg.
Loop:
         
clrf        INDF0         Clear INDF0 (FSR0 Point to the RAM  AddressRegister
         incf      FSR0L
,F       FSR=FSR+1
         btfss     FSR0L
,6     ; >= 0x40?       (*這裡是否是btfss FSR,??)(YES3 只清 8 BYTE)
    ;    
BTFSC    FSR0L 4    ; ( 同樣效果 )
    ;    
BTFSC    FSR0L 5    ; ( 同樣效果 )
         goto 
Loop
:
---------------------------------------------------------------------
這串如果是用PIC18F4620的寫法是如何寫的?
感謝~想知道一個完整的例子觀摩

發表於: 2009/11/13 6:14
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 18F452 的 FSR怎么用?
#4
初級會員
初級會員


查看用戶資訊
想請問一下:
借用版主的例子~
-----------------------------------------------------------------
例: 清除 RAM 0x30 ~0x3F, 使用間接索引定址方式


movlw 0x30 ; Set the RAM starting point
movwf FSR ; Set the point to FSR Reg.
Loop:
clrf INDF ; Clear INDF (FSR Point to the RAM
;Address) Register
incf FSR,F ; FSR=FSR+1
btfss FSR,3 ; >= 0x40? (*這裡是否是btfss FSR,6 ??)
goto Loop
:
---------------------------------------------------------------------
這串如果是用PIC18F4620的寫法是如何寫的?
感謝~想知道一個完整的例子觀摩^^

發表於: 2009/11/11 20:55
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 18F452 的 FSR怎么用?
#3
新會員
新會員


查看用戶資訊
谢谢版主!!!我原来用INDFn存储器,只能存8bits的空间。用POSTINCn,POSTDECn和PREINCn就可以用12bits的空间了。。

發表於: 2005/4/1 7:42
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 18F452 的 FSR怎么用?
#2
版主
版主


查看用戶資訊
不要單獨對 FSR0L 或 FSR0H 操作,單獨操作 FSRL0 是不會進位到 FSR0H 的。它必須用指標操作的計存器如下說明 :
PIC18Fxxxx 總共有三個獨立的指標  FSR0FSR1FSR2
指標為 12 Bits
可定址 4K 的資料空間
指標有兩個暫存器組成 
(FSR0L FSR0H)
  

五種指標的操作方式 (使用不同的虛擬寄存器)需參考data sheet
INDFn    
直接操作指標所指的內容
POSTINCn 
操作指標所指內容後將指標加一
POSTDECn 
操作指標所指內容後將指標減一
PREINCn  
將指標先加一後再對指標所指位址操作
PLUSWn   
將 WREG 的內容作為 Offset 值與 FSRn 相加後 
           以其結果為指標來存取記憶體

發表於: 2005/3/31 18:21
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


18F452 的 FSR怎么用?
#1
新會員
新會員


查看用戶資訊
在用18F 的 FSR 时有两个存储单元 FSR0L/FSR0H,当FSR0L increase 到 OXFF 的时候,FSR0H还是0X00。 有什么办法可以让FSR0H在FSR0L到0XFF的时候自动 increase 吗?谢谢!!

發表於: 2005/3/30 5:55
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------