Electronic Components Datasheet Search |
|
HT56R67 Datasheet(PDF) 23 Page - Holtek Semiconductor Inc |
|
HT56R67 Datasheet(HTML) 23 Page - Holtek Semiconductor Inc |
23 / 129 page HT56R67/HT56R668/HT56C668/HT56R678/HT56C678/HT56R688 Rev. 1.70 2014-04-04 23 查表范例 以下范例说明在 HT56R678 中,表格指针和表格数据如何被定义和执行。这个例子使用的表格 数据用 ORG 伪指令储存在存储器的最后一页。HT56R678 中,ORG 指令“7F00H”指向的地址是 32K 程序存储器中最后一页的起始地址。表格指针的初始值设为 06H,这可保证从数据表格读取的 第一笔数据位于程序存储器地址 7F06H,即最后一页起始地址后的第六个地址。值得注意的是,假 如“TABRDC [m]”指令被使用,则表格指针指向当前页。在这个例子中,表格数据的高字节等于零, 而当“TABRDL [m]”指令被执行时,此值将会自动的被传送到 TBLH 寄存器。 tempreg1 db ? ; temporary register #1 tempreg2 db ? ; temporary register #2 : : mov a,06h ; initialize table pointer – note that this address ; is referenced mov tblp,a ; to the last page or present page : : tabrdl tempreg1 ; transfers value in table referenced by table pointer ; to tempreg1 data at prog。 memory address 7F06H transferred to ; tempreg1 and TBLH dec tblp ; reduce value of table pointer by one tabrdl tempreg2 ; transfers value in table referenced by table pointer ; to tempreg2 ; data at prog. memory address 7F05H transferred to ; tempreg2 and TBLH ;in this example the data 1A is transferred to ;to tempreg1 and data 0F to register tempreg2 ; the value _00H_ will be transferred to the high byte ; register TBLH org 7F00h ; sets initial address of last page dc 00Ah, 00Bh, 00Ch, 00Dh, 00Eh, 00Fh, 01Ah, 01Bh : : TBLH 寄存器为只读寄存器,不能重新储存,若主程序和中断服务程序都使用表格读取指令, 应该注意它的保护。使用表格读取指令,中断服务程序可能会改变 TBLH 的值,若随后在主程序中 再次使用这个值,则会发生错误,因此建议避免同时使用表格读取指令。然而在某些情况下,如果 同时使用表格读取指令是不可避免的,则在执行任何主程序的表格读取指令前,中断应该先除能, 另外要注意的是所有与表格相关的指令,都需要两个指令周期去完成操作。 |
Similar Part No. - HT56R67_14 |
|
Similar Description - HT56R67_14 |
|
|
Link URL |
Privacy Policy |
ALLDATASHEET.COM |
Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Datasheet Upload | Contact us | Privacy Policy | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
Family Site : ic2ic.com |
icmetro.com |