Keil Logo

RTX51 TINY: RELOCATING INTERRUPTS


Information in this article applies to:

  • C51 Version 5.50a
  • C51 Version 6.01

QUESTION

How do I relocate the timer interrupt used by RTX51 Tiny?

ANSWER

The interrupt vector for the timer used by RTX51 Tiny is defined in the RTX51TNY.A51 file found in the \c51\rtx_directory.

Open this file with any editor and search for the following:

                RSEG    ?RTX?BITS
?RTX_TS_DELAY:  DBIT    1
?RTX_TS_REQ:    DBIT    1

                CSEG    AT      0BH
                JMP     TIMERINT

?RTX?CODE       SEGMENT CODE

Change the CSEG AT 0BH statement to specify the new address for the interrupt 1. If you relocate your interrupt vectors to 04000H, you should change the 0BH value to 0400BH as follows:

                CSEG    AT      0400BH
                JMP     TIMERINT

Then, you'll have to rebuild RTX51 Tiny and make sure the new library that is create gets copied into the c51\lib directory. You may use the GENRTX.BAT batch file to do that:

REM This file generates the RTX51 TINY LIBRARY
..\bin\a51 right.a51
..\bin\a51 vers.a51
..\bin\a51 rtx51tny.a51 debug
..\bin\a51 conf_tny.a51
..\bin\del rtx51tny.lib
..\bin\lib51 create rtx51tny.lib
..\bin\lib51 add right.obj,vers.obj,rtx51tny.obj,conf_tny.obj to rtx51tny.lib
copy rtx51tny.lib ..\lib

Or you can create a project file. Be sure you add the following files to the RTX51TNY project: RIGHT.A51, VERS.A51, RTX51TNY.A51, and CONF_TNY.A51.

SEE ALSO

FORUM THREADS

The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Monday, December 18, 2000


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.