|
Advanced temperature logger code |
|
|
|
|
Written by Stuart Allan
|
|
Sunday, 03 May 2009 18:38 |
|
The biggest difference between this temperature logger (based on the PICAXE 28X1) and the first one I made (based on the 18X datalogger from Microzed) is the use of interrupts. One of the really disappointing things about the X and X1 series of PICAXE chip is that they only allow one interrupt condition to be set. To get around this I had to use another smaller PICAXE chip (the 14M) and an interrupt controller. I used the 14M to constantly scan the user input buttons and let the 28X1 know (via interrupt and serial) which button had been pressed. I could have got the 28X1 to scan the buttons, but this would have slowed down the main program a little and more importantly, there would be times when the program is busy (like during temp reads) that button presses would be ignored. So the only option was be to use another chip to do this work on behalf of the 28X1. The other main feature of this program is the amount of information that is made available to the user. This where an 8bit chip starts to show it's limitations, as calculating how much memory and battery power is left can be quite a challenge to do without overflowing any of the variables you are using (in Basic). But it is possible and actually works out quite well, but with some loss of accuracy in the calculations. Here are the firmware files for the Advanced Temperature Logger. Firmware for the 28X1: Version 1.2 Firmware for the 14M: Version 1.0
|
|
Last Updated on Tuesday, 09 June 2009 22:37 |