Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
If you don't need to adjust the frequency or duty cycle and if your PIC has nothing else to do, then the easiest way to do it is to use timed instruction loops and and four digital outputs.
the duty cycle is constant but the frequency is variable and the pic will get information from key bad and display it in LCD .
so is the time instruction and loop will be good ?
No, you can't use timed instruction loops if the PIC has to handle the keyboard and the display too. Now I think the easiest way to do it would be to set up a timer to make periodic interrupts. At each interrupt advance a state machine variable and set or clear the appropriate output bits to make the four signals come out the way you want.
This method is subject to some phase jitter because it depends on interrupt latency, and it is speed limited because the interrupt rate cannot be faster than the interrupt service routine. When a different frequency is needed, just change the setup of the timer so it interrupts are the appropriate rate.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.