Set the CPU clock to 4 MHz (before: 1 MHz) and changed the timing critical periphery accordingly (USART, timer/counters).
Added measurement of the humidity through the honeywell sensor that is connected to ADC channel 2. The ADC value is converted to humidity (as an integer) on chip.
Enabled global interrupts and added an interrupt handler for RX complete of USART0. At present it only echos the data sent to it.
Reading from the USART through interrupts into buffers and added pseudo commands that are handled in the main routine. It was necessary to reduce the baud rate because the interrupt handler was not fast enough for the old rate.
Changed the commands for the serial interface.
Added a lookup table for converting temperature to ADC values as measured with a Pt1000 in a wheatstone bridge. As of now, wheatstone bridge resistors are of value 1100 Ohm. This will change in the future.
Added a queue for ADC measurements with a timer interrupt that rotates
the inputs. The main routine handles the starting of the ADC. After a
conversion complete interrupt the main routine switches to the next ADC
input. Commands for temperature or humidity readout now use the stored
ADC results instead of starting the ADC themselves.
Changed the serial receiver interrupt handler such that newlines are not
included in the rx buffer. Added also the original command to the error
output when the command was invalid.
Changed the ADC queue in a task schedule that is now responsible also for other things than ADC measurements. In the future the PID algorithm will be scheduled with this method.
Added a conversion from ADC to temperature and using it for computer queries.
Corrected temperature conversion tables by a factor of two.
Added use of the PID controller code. There are two PID controllers, one for heating and one for cooling, one of which is always inactive. Changed the timing of the 16 bit counter to match the schedule of the tasks and added multiple dummy tasks.
Added serial commands to query and set setpoint and Kp values.
Added serial commands for Ki and Kd PID controller factors.
Set the 16 bit timer start value such that the timer reset always occurs just after the PID task is run.
Changed serial command to allow setting the setpoint in degrees instead of ADC units.