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

2 separate frequencies

Hello!

I have a problem, and no idea how to solve it. Maybe someone can help
me?
System: 80C537, 12MHz
Problem: I have to generate 2 separate frequencies, that have to be
changed independently. For example could one frequency have a
constant value, and in the meantime the second frequency could be
increased or decreased. Worst case would be that both frequencies
have to be changed at the same time.

I am using Timer 0 and Timer 1 for this, and the ISRs switch output
ports to generate the frequencies.
The problem that comes up is that if one of the frequencies is changed,
there will be (many) cases that the execution of both ISRs will
"interrupt" each other. That causes for example the constant frequency
to change, if the other frequency is changing, because the first ISR is
being influenced by the second one.

That whole thing looks for me as if there's no solution to prevent this.
I would greatly appreciate any help or suggestion!
Holger Warzelhan

0