Home

General-purpose Program for Variable Vector Table

image

Contents

1. OR TOR IA IIR IK IK IR III IR IIR IK IK IK IR II HIRI IIR IK IK IA II KIKI KIA IIA CPU R8C Tiny VromTOP EQU Vistack EQU 000660h Vintbase EQU 00D000h FIX_VECTOR EQU Title Variable vector table OOFFDCh Declares start address of ROM Interrupt stack pointer Declares interrupt vector table address Declares fixed interrupt vector address Outline Description example of variable vector table and software interrupt MAIN LDC LDINTB mov B MOV B mov B MOV W MOV B MOV W MOV B MOV B MOV B BSET BSET FSET INT FCLR INT INT VIstack ISP Vintbase 00000000b tcss 00000000B txmr 00000000b tyzmr 100 1 prex 00000001B txic 0E7h prey 3h typr 0 tysc 0000001 0B tyic txs tys 22 23 32 SECTION PROGRAM CODE ORG VromTOP ROM area Sets interrupt stack pointer Sets interrupt table register Timer Source select register Timers X mode Register TimerY Z mode Register Sets timer X counter Sets interrupt level 1 for timer AO Sets timer Y counter Sets timer Y counter Sets timer Y counter Sets interrupt level 2 for timer A1 Timers X start counting Timers Y start counting Enables interrupts Performs timer X interrupt processing TIMER_AO is executed Disables interrupts Performs timer Y interrupt processing TIMER_A1 is executed Performs SOFTINT label interrupt processing REJ05B0392 0100Z Rev 1 00 Decembe
2. Renesas Electronics does not warrant that such information is error free Renesas Electronics assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein Renesas Electronics products are classified according to the following three quality grades Standard High Quality and Specific The recommended applications for each Renesas Electronics product depends on the product s quality grade as indicated below You must check the quality grade of each Renesas Electronics product before using it in a particular application You may not use any Renesas Electronics product for any application categorized as Specific without the prior written consent of Renesas Electronics Further you may not use any Renesas Electronics product for any application for which it is not intended without the prior written consent of Renesas Electronics Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for an application categorized as Specific or for which the product is not intended where you have failed to obtain the prior written consent of Renesas Electronics The quality grade of each Renesas Electronics product is Standard unless otherwise expressly specified in a Renesas Electronics data sheets or data books etc Standard Computers office
3. SE NOTUSE NOTUSE NOTUSE word NOTUSE lword lword lword LWORD LWORD SECTION ORG LWORD LWORD LWORD LWORD LWORD LWORD LWORD LWORD LWORD END NOTUSE NOTUSE NOTUSE NOTUSE NOTUSE INTER ROMDATA FIX_VECTOR NOTUSE NOTUSE NOTUSE NOTUSE NOTUSE NOTUSE NOTUSE NOTUSE MAIN vector 34 for user or MR30 vector 35 for user or MR30 vector 36 for user or MR30 vector 37 for user or MR30 vector 40 for user or MR30 vector 41 for user or MR30 vector 38 for user or MR30 vector 42 for user or MR30 vector 39 for user or MR30 vector 43 for user or MR30 vector 44 for user or MR30 vector 45 for user or MR30 vector 46 for user or MR30 vector 47 for user or MR30 Software interrupt number 0 Software interrupt number 1 Declares FOMDATA attribute section of section name INTER Sets location to FFFDCH FFFDC to F Undefined instruction FFFEO to 3 FFFE4 to 7 FFFE8 to B FFFEC to F FFFFO to 3 FFFF4 to 7 FFFF8 to B FFFFC to F 2 Overflow BRK instruction Address coincidence Single stepping Watchdog timer Debugger NMI Reset REJ05B0392 0100Z Rev 1 00 December 2003 Page 5 of 8 QE NESAS R8C Tiny Series General purpose Program for Variable Vector Table 5 Reference HARDWARE MANUAL R8C 10 group HARDWARE MANUAL Acquire the most current
4. To our customers Old Company Name in Catalogs and Other Documents On April 1 2010 NEC Electronics Corporation merged with Renesas Technology Corporation and Renesas Electronics Corporation took over all the business of both companies Therefore although the old company name remains in this document it is a valid Renesas Electronics document We appreciate your understanding Renesas Electronics website http www renesas com April 1 2010 Renesas Electronics Corporation Issued by Renesas Electronics Corporation http www renesas com Send any inquiries to http www renesas com inquiry CENESAS 8 10 11 12 Notice All information included in this document is current as of the date this document is issued Such information however is subject to change without any prior notice Before purchasing or using any Renesas Electronics products listed herein please confirm the latest product information with a Renesas Electronics sales office Also please pay regular and careful attention to additional and different information to be disclosed by Renesas Electronics such as that disclosed through our website Renesas Electronics does not assume any liability for infringement of patents copyrights or other intellectual property rights of third parties by or arising from the use of Renesas Electronics products or technical information described in this document No license express implied or otherwise is grant
5. are interrupts This type of interrupt is generated by the INT instruction Therefore software interrupts are used in the same way as a subroutine by using the INT instruction The INT instruction is executed even when interrupts are disabled After interrupts are disabled FCLR in this program INT 23 and INT 32 are executed regardless of whether or not the interrupt enable flag l is set This program can also be used when operating other microcomputers within the R8C 10 group provided they have the same vector table as the R8C microcomputers However some functions may have been modified Refer to the User s Manual for details Use functions covered in this Application Note only after careful evaluation REJ05B0392 0100Z Rev 1 00 December 2003 Page 1 of 8 QE N ESAS R8C Tiny Series General purpose Program for Variable Vector Table 3 Flowchart Set interrupt stack pointer ISP address Set interrupt table register INTB address TIMER_X TIMER_Y SOFTINT RTS aE REJ05B0392 0100Z Rev 1 00 December 2003 Page 2 of 8 rCENESAS R8C Tiny Series General purpose Program for Variable Vector Table 4 The example of a reference program include sfr_r811 inc special page include file FOR IR TOR TOR FOR IR RK TOK TOR IRR IK TOR FOR IA III RIK IR IIR IK IR IIR IK IK IK IRI IIIA IIR IK IK IA II KIKI KIA IIA R8C Program Collection No 33 FOR IR TOR FOR FOR IR IRR TOK TOR IRR IR T
6. ed hereby under any patents copyrights or other intellectual property rights of Renesas Electronics or others You should not alter modify copy or otherwise misappropriate any Renesas Electronics product whether in whole or in part Descriptions of circuits software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples You are fully responsible for the incorporation of these circuits software and information in the design of your equipment Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from the use of these circuits software or information When exporting the products or technology described in this document you should comply with the applicable export control laws and regulations and follow the procedures required by such laws and regulations You should not use Renesas Electronics products or the technology described in this document for any purpose relating to military applications or use by the military including but not limited to the development of weapons of mass destruction Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose manufacture use or sale is prohibited under any applicable domestic or foreign laws or regulations Renesas Electronics has used reasonable care in preparing the information included in this document but
7. equipment communications equipment test and measurement equipment audio and visual equipment home electronic appliances machine tools personal electronic equipment and industrial robots High Quality Transportation equipment automobiles trains ships etc traffic control systems anti disaster systems anti crime systems safety equipment and medical equipment not specifically designed for life support Specific Aircraft aerospace equipment submersible repeaters nuclear reactor control systems medical equipment or systems for life support e g artificial life support devices or systems surgical implantations or healthcare intervention e g excision etc and any other applications or purposes that pose a direct threat to human life You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics especially with respect to the maximum rating operating supply voltage range movement power voltage range heat radiation characteristics installation and other product characteristics Renesas Electronics shall have no liability for malfunctions or damages arising out of the use of Renesas Electronics products beyond such specified ranges Although Renesas Electronics endeavors to improve the quality and reliability of its products semiconductor products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under ce
8. ging to Renesas Technology Corporation or a third party Renesas Technology Corporation assumes no responsibility for any damage or infringement of any third party s rights originating in the use of any product data diagrams charts programs algorithms or circuit application examples contained in these materials All information contained in these materials including product data diagrams charts programs and algorithms represents information on products at the time of publication of these materials and are subject to change by Renesas Technology Corporation without notice due to product improvements or other reasons It is therefore recommended that customers contact Renesas Technology Corporation or an authorized Renesas Technology Corporation product distributor for the latest product information before purchasing a product listed herein The information described here may contain technical inaccuracies or typographical errors Renesas Technology Corporation assumes no responsibility for any damage liability or other loss rising from these inaccuracies or errors Please also pay attention to information published by Renesas Technology Corporation by various means including the Renesas Technology Corporation Semiconductor home page http Awww renesas com When using any or all of the information contained in these materials including product data diagrams charts programs and algorithms please be sure to evaluate all informat
9. ics products or if you have any other inquiries Note 1 Renesas Electronics as used in this document means Renesas Electronics Corporation and also includes its majority owned subsidiaries Note 2 Renesas Electronics product s means any product developed or manufactured by or for Renesas Electronics CENESAS APPLICATION NOTE R8C Tiny Series General purpose Program for Variable Vector Table 1 Abstract This program shows an example for setting variable vector tables and an example for using software interrupts 2 Introduction This program is an example using R8C 10 group microcomputers A variable vector table is a 256 byte interrupt vector table whose start address IntBase is indicated by the content of the interrupt table register INTB The variable vector table in this program has its start address at ODOOOH The variable vector table has individual vector tables each comprised of 4 bytes and each vector table contains the start address of an interrupt routine There are software interrupt numbers 0 to 63 available for each vector table The INT instruction uses these software interrupt numbers No labels can be used in place of the software interrupt numbers Peripheral I O interrupts are assigned software interrupt numbers 0 to 31 In this program software interrupt number 22 is used for timer X and software interrupt number 23 is used for timer Y Software interrupt numbers 32 to 63 are used for softw
10. ion as a total system before making a final decision on the applicability of the information and products Renesas Technology Corporation assumes no responsibility for any damage liability or other loss resulting from the information contained herein Renesas Technology Corporation semiconductors are not designed or manufactured for use ina device or system that is used under circumstances in which human life is potentially at stake Please contact Renesas Technology Corporation or an authorized Renesas Technology Corporation product distributor when considering the use of a product contained herein for any specific purposes such as apparatus or systems for transportation vehicular medical aerospace nuclear or undersea repeater use The prior written approval of Renesas Technology Corporation is necessary to reprint or reproduce in whole or in part these materials If these products or technologies are subject to the Japanese export control restrictions they must be exported under a license from the Japanese government and cannot be imported into a country other than the approved destination Any diversion or reexport contrary to the export control laws and regulations of Japan and or the country of destination is prohibited Please contact Renesas Technology Corporation for further details on these materials or the products contained therein REJ05B0392 0100Z Rev 1 00 December 2003 Page 8 of 8
11. r 2003 Page 3 of 8 R8C Tiny Series General purpose Program for Variable Vector Table rCENESAS Here is your program jmp MAIN TIMER_X Here is your program REIT TIMER_Y H Here is your program REIT SOFTINT Here is your program REIT NOTUSE Here is your program REIT SECTION SPECIAL ROMDATA ORG Vintbase Variable vector table area p Peripheral I O interrupt vector table REJ05B0392 0100Z Rev 1 00 December 2003 lword NOTUSE BRK instruction vector 0 org Vintbase 52 lword NOTUSE Key input interrupt vector 13 lword NOTUSE A D vector 14 org Vintbase 68 lword NOTUSE UARTO transmit vector 17 lword NOTUSE UARTO receive vector 18 lword NOTUSE UART1 transmit vector 19 lword NOTUSE UART1 receive vector 20 lword NOTUSE INT2 vector 21 lword TIMER_X Timer X vector 22 lword TIMER_Y Timer Y vector 23 lword NOTUSE Timer Z vector 24 lword NOTUSE INT1 vector 25 lword NOTUSE INT3 vector 26 lword NOTUSE Timer C vector 27 org Vintbase 116 lword NOTUSE INTO vector 29 org Vintbase 128 lword SOFTINT vector 32 for user or MR30 lword NOTUSE vector 33 for user or MR30 tENESAS R8C Tiny Series General purpose Program for Variable Vector Table lword lword lword lword lword lword lword lword lword lword NOTUSE NOTUSE NOTUSE NOTUSE NOTUSE NOTUSE NOTU
12. rtain use conditions Further Renesas Electronics products are not subject to radiation resistance design Please be sure to implement safety measures to guard them against the possibility of physical injury and injury or damage caused by fire in the event of the failure of a Renesas Electronics product such as safety design for hardware and software including but not limited to redundancy fire control and malfunction prevention appropriate treatment for aging degradation or any other appropriate measures Because the evaluation of microcomputer software alone is very difficult please evaluate the safety of the final products or system manufactured by you Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product Please use Renesas Electronics products in compliance with all applicable laws and regulations that regulate the inclusion or use of controlled substances including without limitation the EU RoHS Directive Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations This document may not be reproduced or duplicated in any form in whole or in part without prior written consent of Renesas Electronics Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas Electron
13. version from Renesas web site 6 Web site and contact for support Renesas Web site http www renesas com Contact for M16C family microcomputer technical support Mail to support_apl renesas com REJ05B0392 0100Z Rev 1 00 December 2003 Page 6 of 8 QE N ESAS R8C Tiny Series General purpose Program for Variable Vector Table REVISION HISTORY Description Summary Dec 29 2003 First edition issued REJ05B0392 0100Z Rev 1 00 December 2003 Page 7 of 8 QE N ESAS R8C Tiny Series General purpose Program for Variable Vector Table Keep safety first in your circuit designs Renesas Technology Corporation puts the maximum effort into making semiconductor products better and more reliable but there is always the possibility that trouble may occur with them Trouble with semiconductors may lead to personal injury fire or property damage Remember to give due consideration to safety when making your circuit designs with appropriate measures such as i placement of substitutive auxiliary circuits ii use of nonflammable material or iii prevention against any malfunction or mishap Notes regarding these materials These materials are intended as a reference to assist our customers in the selection of the Renesas Technology Corporation product best suited to the customer s application they do not convey any license under any intellectual property rights or any other rights belon

Download Pdf Manuals

image

Related Search

Related Contents

  Traveler HS 9 User's Manual  CARGOMANAGER PDF (printing) manual  Freeze Drying - Fisher UK Extranet  1 - Brother  769-03836A 791900 2Cyc.qxd:Layout 1  Promote® Plus - Sante International SA  Samsung S630 Bruksanvisning    Coby Kyros MID4331 4GB Black tablet  

Copyright © All rights reserved.
Failed to retrieve file