Home > other >  Refer to 51 microcontroller great god
Refer to 51 microcontroller great god

Time:10-10

How to use the timer 0 51 single-chip microcomputer and four different output four different square wave output

CodePudding user response:

All have no, specific model USES PWM

CodePudding user response:

reference 1st floor forget345 response:
specific models all have no, use PWM

Stc51 microcontroller, useless PWM, I'm with external interrupt to change two output pulse frequency, timer 0 first output pulse control, control the second timer 2 square wave, but the two square wave duty ratio has been changed

CodePudding user response:

Timer 0 each interrupt, assignment to four different IO foot, went, every four interrupt, loop again.
But I think your question should not be so simple, may be you didn't describe the requirements clearly

CodePudding user response:

reference JSHZP reply: 3/f
0 timer interrupt at a time, to the four different IO foot assignment, went, every four interrupt, loop again.
But I think your question should not be so simple, may be you didn't describe the requirements clear

to output square wave completely different

CodePudding user response:

I did get method, phase, is staggered, do you want to cycle is different?

CodePudding user response:

references to come back next year, 4/f response:
Quote: refer to the third floor JSHZP response:
0 timer interrupt at a time, to the four different IO foot assignment, went, every four interrupt, loop again.
But I think your question should not be so simple, may be you didn't describe the requirements clear

to output square wave completely different


Open four variable, assign a different initial value, is used to count, when the timer interrupt, minus 1, the variables which variables are reduced to zero, is to change the corresponding pin level, this cycle is different

CodePudding user response:

Hold on STC official STC - ISP. Exe, there are many routines, including PWM, should be able to find you want

CodePudding user response:

CodePudding user response:

Elder brother, you mean using the timer interrupt, when the interrupt function is greater than a given value of a certain number of yourself and then output to reverse, and then give the number to assignment, can you send me a clear program, to deepen our understanding

CodePudding user response:

https://bbs.csdn.net/topics/392649190

CodePudding user response:

At your post is a stopwatch function of 4 kinds of expanded.

CodePudding user response:

The find some routine study whole out!

CodePudding user response:

Get out, is freescale chip have problem again
  • Related