I am using the PWM command to create a 0-5V output that corresponds to 0-100% on my display. The Pic Pin has a RC filter 10K and 1uf cap into a rail to rail op amp. The op amp is powered off of the 5V supply that powers the PIC. I can only get about 4.5V out of the op amp when the cout is at 100. Is there a better way to do this or am i missing something?
' b1 varies from 0-100 which is converted to 0-255
Normal:
if sw1 = 1 then up
if sw2 = 1 then dwn
if sw3 = 1 then foff
if sw4 = 1 then fon
lx = b1
d1 = ((b1*100)/39)
pwm out,d1,100
call display
pause 250
goto normal
Thanks,
Terry
Bookmarks