Eswara manikanta
New Member
Hii guys! Can you please help me in writing code in any programming language for generating square waveform at 4 different frequencies at 4 ports in any MC.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
No. This is for an interview. They expect you to do it yourself. They want to know what you know, not what we know.If you KNOW please share your knowledge. Anyway that`s a good suggestion
This....If it's for an interview you best do it yourself. This is even worse than asking someone to do your homework for you.
Googled that just now.... code in any programming language for generating square waveform...
boatload of suggestions are for individual generation/particular frequency. I`m struck at generating more than 2 waveforms at a tme.
You rather seem to be missing the point - the interview questions are to sort out unsuitable candidates, you're obviously not suitable for the position you're been interviewed for and your inability to answer the question shows that.
Well, I "managed" to answer the question so I won't bother teaching you how to do it.Managing is different from Teaching!
This more specific type of question is the kind of thing that we are more willing to answer. If you cannot generate more than 2 waveforms at a time, it likely means that your approach is likely to be the wrong one (not useful in practice) One likely reason is because your approach is running in sequence with everything else in the processor which means this approach will not work in a real application where the processor has to be doing other things. But if you are getting these examples off the net, they cannot all be wrong so the other possibility is you don't understand their approach well enough to expand on it (which will be the case if you are just copying and pasting their code).boatload of suggestions are for individual generation/particular frequency. I`m struck at generating more than 2 waveforms at a tme.
Tq sir.!This more specific type of question is the kind of thing that we are more willing to answer. If you cannot generate more than 2 waveforms at a time, it likely means that your approach is likely to be the wrong one (not useful in practice) One likely reason is because your approach is running in sequence with everything else in the processor which means this approach will not work in a real application where the processor has to be doing other things. But if you are getting these examples off the net, they cannot all be wrong so the other possibility is you don't understand their approach well enough to expand on it (which will be the case if you are just copying and pasting their code).
Using a hardware peripheral like a timer interrupt to generate the PWM is the most straightforward method. One for each PWM is best, but if you don't have enough, a single timer interrupt can be made to handle multiple signals shuffling in the appropriate interrupt value every time the interrupt fires. To know which interrupt value needs to trigger next, you need to examine all your signals. The interrupt routine also has to know the value that triggered it since it must behave differently for each value since each value is for a different signal.
After few days of his interview he explained the whole situation. Didn't u seen d previous conversation?What? You don't get to "phone a friend" for help during an interview?
Oooh nice! You also don't know. But difference is I'm trying to know what I don't know. But u r still managingWell, I "managed" to answer the question so I won't bother teaching you how to do it.
Dear! It's not d question for me. It's a question to my friend who failed to do that. He asked me and I too don't know. That's why I'm asking you all. That doesn't mean that I'm depending on you rather I would like to share knowledge. Mind!You rather seem to be missing the point - the interview questions are to sort out unsuitable candidates, you're obviously not suitable for the position you're been interviewed for and your inability to answer the question shows that.
Oooh nice! You also don't know. But difference is I'm trying to know what I don't know. But u r still managing
for x=0 to 15
PORTA = x
next x
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111