OR if you have extra i/o (let's say 8), you can even built a cheap D/A converter with resistors and an op-amp.
OR if you have extra i/o (let's say 8), you can even built a cheap D/A converter with resistors and an op-amp.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Melanie,
How? Please help me. I use 16f877 and how must I use hpwm command in my code?
I assume you have a proper copy of PBP and with it came a manual? Look up the HPWM command. It comes complete with examples in the manual. Your PIC16F877 has TWO PWM channels (look at the Datasheet), HPWM will be able to activate either one or both. Once you invoke HPWM, it keeps running in background regardless what else is happening until you change or stop it. This allows you to take new ADC reading and refresh your LED Displays without the PWM interfering.
Yes, of course I have a proper copy of PBP. But, when I changed "PWM portC.2,255,100" line to "HPWM 1,255,10000", I see 3,0V. on the PortC.2 instead of 5,0V. And still I can't understand. ( crystal 20MHz.) I tried on Proteus 6.7...
Best Regard.
Bookmarks