Peltier devices can heat or cool, so a incubation chamber that heats most of the time can switch to cooling mode if the ambient temperature gets too high by reversing the polarity. I made some incubators for a local zoo using this method some years ago, but not with an MCU; it used a special PWM chip and an H-bridge (TI UC3638). An MCU version is certainly possible, requiring for example 2 PWM outputs, or 1 PWM and a heat/cool polarity output. The thermal design is 6" fan on a heatsink on the outside,...
Peltier devices can heat or cool, so a incubation chamber that heats most of the time can switch to cooling mode if the ambient temperature gets too high by reversing the polarity. I made some incubators for a local zoo using this method some years ago, but not with an MCU; it used a special PWM chip and an H-bridge (TI UC3638). An MCU version is certainly possible, requiring for example 2 PWM outputs, or 1 PWM and a heat/cool polarity output. The thermal design is 6" fan on a heatsink on the outside,...
How to Use
I wrote a comparator program in GCB that precisely measures the charge time of a capacitor. It's for an in-circuit tester that must charge the capacitor through an input bridge rectifier, so it measures the charge time between 3 and 4 volts. Charging is controlled via a P-FET on an output pin. I had trouble at first until I realized the comparators have no hysteresis; the ISR was firing several times instead of just once for each test. This was solved by disabling each interrupt in the ISR, and enabling...
This example (http://gcbasic.sourceforge.net/help/_generate_accurate_pulses.html) messed me up for a while. The subroutine at the bottom adds 4 to TMR1L to account for processing delays, which is fine, except it is done after stripping the lower 8 bits. If the lower 8 bits overflow, the pulse is wrong. The example code should be: SUB PULSE_OUT_US (IN Variable as WORD) Variable = 65535 - Variable + 4 TMR1H = Variable_H 'Timer 1 Preset High TMR1L = Variable 'Timer 1 Preset Low Linked example repeated...
If you need the highest speed and also want to protect against the inevitable clock drift between the 2 CPUs, which could result in an occasional 'bit slip', consider a DIY 2-bit synchronous interface (I haven't done this, I'm just dreaming this up). The sender CPU is the master and sets the data bit to the desired value and then sets the clock bit high. The slave CPU monitors the clock bit (maybe with an interrupt) and when it goes high, it reads the data bit. The master has to set the clock low...
(from Stackoverflow.com) Express the exponent as fraction and separate both parts...
(from Stackoverflow.com) Express the exponent as fraction and separate both parts...