IAP Medium-ying single chip

Source: Internet
Author: User

void Int_timer_tf2 (void) Interrupt 7 using 2{... source lines ...}

There is keywords:
Interrupt xDefines the interrupt number. This number tells compiler which vector address of you want. See also the manual "Cx51 Compiler User ' s guide-chapter 3 Language extensions-function declarations-interrupt functi Ons "on p. 125. Look at the table "Interrupt number" to "Adress"!

using xdefines the desired register bank access for the interrupt function.

in the example mentioned above, the function INT_TIMER_TF2 ()Would be called if a TF2 event occurs, because the interrupt vector address is 0x003b. This function is use of the Register Bank 2 (registers in Addr 0x10 to 0x17).

If you want to get other interrupt vectors addresses than the standard one described in the manual you had to define Y Our own interrupt vector addresses with theIntvector and INTERVAL control directives. Please read the manual.

IAP Medium-ying single chip

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.