Thermometer PIC code
Posted: Wed Apr 17, 2013 2:57 pm
For anyone who wants to try tinkering with it, here is the ASM file for the PIC. Usual rules apply - you can do what you want with it as long as it's non-commercial.
Most of the code is safe to play with but don't modify the PWM settings unless you're measuring the current taken by the inverter and are prepared to switch off quick/replace the MOSFET.
As there was plenty of memory available it only uses loops where required, with much of it being linear and I hope easier to follow. Some of the comments will be out of date as things were tweaked later, or pasted from other sections and not modified. An example is the temperature smoothing, the comment still refers to *32 but one bit operation has been remmed out so it currently uses *16 as it settled faster and had little impact on the result.
.
.
.
Most of the code is safe to play with but don't modify the PWM settings unless you're measuring the current taken by the inverter and are prepared to switch off quick/replace the MOSFET.
As there was plenty of memory available it only uses loops where required, with much of it being linear and I hope easier to follow. Some of the comments will be out of date as things were tweaked later, or pasted from other sections and not modified. An example is the temperature smoothing, the comment still refers to *32 but one bit operation has been remmed out so it currently uses *16 as it settled faster and had little impact on the result.
.
.
.