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.
.
.
.
Thermometer PIC code
Thermometer PIC code
- Attachments
-
- nixitherm piccode.zip
- (10.37 KiB) Downloaded 1723 times
Re: Thermometer PIC code
Thanks for uploading the code!
I guess I will have to learn more about assembly language ( I'm more familiar with C).
What compiler are you using with this code?
I guess I will have to learn more about assembly language ( I'm more familiar with C).
What compiler are you using with this code?
Re: Thermometer PIC code
Just the standard MPLAB IDE software with a PICKIT3.
Re: Thermometer PIC code
The code posted above is intended for a PIC16F1847 as originally used, the current kits use an 1827 and I've attached the latest version of the code for use with these. The only difference is the loaction of the saved display state has been fixed.
- Attachments
-
- 1827 therm piccode.rar
- (9.69 KiB) Downloaded 1444 times
Re: Thermometer PIC code
The AM2302 sensor is a more accurate substitute for the DHT11 but the data is formatted slightly differently. This is a modified hexfile you can try out if you want to upgrade the current sensor(s) and improve the humidity accuracy.
- Attachments
-
- AM2302 sensor code mod.zip
- (3.85 KiB) Downloaded 1283 times
Re: Thermometer PIC code
And of course a version which should detect and process either a DHT11 or AM2303. The detection may or may not be 100% so consider it V0.1
(it depends on both LSBs of temp and humidity having a non-zero value)
(it depends on both LSBs of temp and humidity having a non-zero value)
- Attachments
-
- Dual sensor code mod.rar
- (3.66 KiB) Downloaded 1406 times
Re: Thermometer PIC code
Hi,
I would like to try the dual sensor mod but my nixie thermometer have the pic16f1847. Can you upload an hex file for the pic16f1847.
Thank you!
I would like to try the dual sensor mod but my nixie thermometer have the pic16f1847. Can you upload an hex file for the pic16f1847.
Thank you!
Re: Thermometer PIC code
This should work:
Re: Thermometer PIC code
Yes, it work great! I get more accurate values with am2302 sensor.
Thanks again.
Thanks again.
Re: Thermometer PIC code
Just in case you can't compile the original .ASM file I've attached the final .hex to this post.
- Attachments
-
- Therm 1827 hexfile.rar
- (3.53 KiB) Downloaded 1020 times