This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to use the interrupt keyword in 8051 C code.

Hi,

There is an application note on using the interrupt vectors in C51 c programming for 8051. It goes like this-

unsigned int int_count;
unsigned char second;

void timer0 (void) interrupt 1 using 2
{ if (++int_count == 4000) { /* count to 4000 */ second++; /* second counter */ int_count = 0; /* clear interrupt counter */ }
}

Can anyone explain what does that "using 2" at the end of the function denote?

I understand that interrupt 1 specifies that this is the ISR for interrupt number for timer0 overflow at adress 000Bh. Does the last keyword "using 2" denote the polling priority of the interrupt?

TIA,
Mrunmoy

Parents
  • I mean the hardware design work is cool but I need to know about the software too. I am not able to change my job because nobody wants hardware engineers today? My employer pays too less and we are just two of us in the company to do hardware design. We have to work 14-16 hours daily cuz there are no one else to do it. I have my family and I am not able to give them time.

    if you "work 14-16 hours daily", then how come "nobody wants hardware engineers". it sounds to me like your boss need to hire more of them.

    That said, the real champs of small micro design know both HW and SW, so a dual capability is definitely an advantage.

    Erik

    PS stop the cuzzing, it is VERY annoying

Reply
  • I mean the hardware design work is cool but I need to know about the software too. I am not able to change my job because nobody wants hardware engineers today? My employer pays too less and we are just two of us in the company to do hardware design. We have to work 14-16 hours daily cuz there are no one else to do it. I have my family and I am not able to give them time.

    if you "work 14-16 hours daily", then how come "nobody wants hardware engineers". it sounds to me like your boss need to hire more of them.

    That said, the real champs of small micro design know both HW and SW, so a dual capability is definitely an advantage.

    Erik

    PS stop the cuzzing, it is VERY annoying

Children
No data