I been scouting around looking at PWM circuits and found this forum. Thought I would stop in and say hi to all........
I drew up a binary controlled PWM circuit (attached). Before I build it, comments from any experts are needed and/or appreciated. I am rusty with my circuits. Been retired too long.
I haven't calculated the PWM oscillator frequency, but it looks like the circuit will work as is. You'll want to add some bypass caps on the power supply leads and the junction of R8 & R9 for stability and noise suppression. The FET won't turn fully on with a 5V supply. Either use a logic level FET or a higher supply voltage. Welcome to the forums!
add an oscillator and a counter and you have a pure digital PWM, unless you are going to be picky and say an the timing is analog and makes it not fully digital.
I haven't calculated the PWM oscillator frequency, but it looks like the circuit will work as is. You'll want to add some bypass caps on the power supply leads and the junction of R8 & R9 for stability and noise suppression. The FET won't turn fully on with a 5V supply. Either use a logic level FET or a higher supply voltage. Welcome to the forums!
I am using this circuit to overcome the timing loop of the BS2 PIC. Using the PWM feature of the BS2 works, but gets you into real time problems especially in critical timing controls. I have several BS2s, so I am putting them back to work. They retired with me......
I'm not familiar with the Basic Stamp PICs, but ordinary PICs with hardware PWM require no software overhead once the PWM is setup and running. The software only has to update a register when the PWM duty cycle needs to be changed. If you need more speed and timing is critical, then programming in assembler on an ordinary PIC is the way to go. I do understand the appeal of raiding the junk box though.
I'm not familiar with the Basic Stamp PICs, but ordinary PICs with hardware PWM require no software overhead once the PWM is setup and running. The software only has to update a register when the PWM duty cycle needs to be changed. If you need more speed and timing is critical, then programming in assembler on an ordinary PIC is the way to go. I do understand the appeal of raiding the junk box though.