View Single Post
Old 06-03-2011, 12:58 PM   #289 (permalink)
Freyguy
EV Builder
 
Freyguy's Avatar
 
Join Date: Nov 2010
Location: Macungie, PA
Posts: 157
Thanks: 15
Thanked 64 Times in 40 Posts
PWM filter w/buffer

Ian,
Attached is a circuit that you could build on a little breadboard and interface to TB1 of the LCD brd. Filtering should be adequate with these values although you could also change line 592 in the code-
(Under the PWM fuel gauge setup section).
Change MOVLW 0x05 to 0x04 ; prescaler changed from 4 to 1 (PWM freq should now be 7.8kHz rather than 1.95kHz)

The code mod listed in post 285 should still be done to invert PWM.
Short across R20 also.

-Chris
Attached Thumbnails
Click image for larger version

Name:	PWM_Filter_Buffer.jpg
Views:	33
Size:	42.1 KB
ID:	8609  
  Reply With Quote