Quote:
Originally Posted by jackbauer
Thanks Chris. Much appreciated. As i say i will have a 2420 tomorrow so will test with that. Not as if i'll be doing the can stuff anytime soon anyway.
|
Ok, but I really don't think this is a PWM bug in the 2480 code. Alvin has the 2480 and he could adjust his after I discovered the rogue line of code that prevented PWM adjustment (back at post #169).
But I definitely think I messed up with the PWM frequency. I am so use to using PIC PWM for a poor man's DAC that I always use 2~4kHz frequencies out of habit...easy to filter with an RC.
So mods as follows:
Under the PWM fuel gauge setup section
line 592- change MOVLW 0x05 to 0x06 ; prescaler change from 4 to 16
(PWM freq should now be 488hz)
Under the Reload SOC section
After line 618 add this line- Call Capstore
(SOC reset value is immediately written to EEPROM)
I'll release another revision after a few more guys build & run this successfully.
We might find more bugs in the meantime.
-Chris