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

A problem with AT89C51

Hi:
I use AT89C51,I have a problem in my software to useit and that's the time that one instruction takes to execute,I mean it's so long, I think that is because of multiply instruction(ASM:MUL AB).Please let me know if it is right or not?

if freq>60HZ >> int0&int1 don't work
my chip's frequency is 8MHz.
Thank you

Parents
  • Hi,
    nope, MUL AB takes 48 clock cycles, here it is 6,0mks only. 60Hz is about 17ms so MUL is about 0.036% of timers frequncy.
    If you use ASM-language so probably your problem is that you do not save some using registers while timers ISR --- PSW is the first candidate which has not been saved often and often by ASM programmers (=

    good days!

Reply
  • Hi,
    nope, MUL AB takes 48 clock cycles, here it is 6,0mks only. 60Hz is about 17ms so MUL is about 0.036% of timers frequncy.
    If you use ASM-language so probably your problem is that you do not save some using registers while timers ISR --- PSW is the first candidate which has not been saved often and often by ASM programmers (=

    good days!

Children
No data