Something like this : http://www.picbasic.co.uk/forum/show...7665#post97665
Something like this : http://www.picbasic.co.uk/forum/show...7665#post97665
Oh, I see. OK, but take into account what I noted on the post.
It is slow and may oscillate. I am sure it will. Also depending on the resolution, the dead band may be large. Of course the larger it is the less it will oscillate.
Ioannis
I wrote this :
but the heating start ONLY when w1 < (calibra - 3) !Code:if w1 < (calibra - 3) then pwm mosfet 155, 250 if w1 < (calibra - 1) then pwm mosfet 100, 200
Why don't start when w1 < (calibra - 1) ?!?
Example : if calibra (value for memory, set by user) is 140, the heating start at 137.
I wrote the routine for display those two values : w1 (current temperature) and calibra. The led blink ( PWM out) only when w1 < ( (calibra-3) !
Code:if mode = 2 then call poz char = 16 call PrintChar calibra = vt LcdReg = %10000000 + 25 ' cursor X call PrintCtrlLcd LcdReg = %01000011 + 1 ' cursor Y call PrintCtrlLcd '~~~~~~~~~~~~~~~~~ now display results if (vt dig 2) <1 then char = 16 call Printchar else Char = (vt dig 2) call PrintChar endif Char = (vt dig 1) call PrintChar Char = (vt dig 0) call PrintChar Char = 16 call PrintChar Char = 13 call PrintChar Char = 14 call PrintChar Char = 16 call PrintChar Char = 15 call PrintChar endif
Fratello,can you make a code with MAX6675 thermocouple cold junction sensor?I have one,so I want to use it.
Here, I'm familiar with the MAX6675 so I'll give you a start...
This should read the MAX6675 and display degrees C & degrees F on a LCD display.
(Pin aliases for LCD not shown, only for the MAX6675)
Code:'Alias pins - MAX6675 temp sensor MXSCLK var PORTD.0 'MAX6675 Clock MXCS var PORTD.2 'MAX6675 Chip Select MXSO Var PORTD.3 'MAX6675 Serial Data '--Variables----------------------- kTemp var word 'raw data from MAX6675 tempC var word 'temperature in degrees C tempF var word 'temp C converted to degrees F '-----------Read and display temperature from MAX6675----------- main: LOW MXCS 'chip select low shiftin MXSO, MXSCLK, 0, [kTemp\16] 'shift in the data HIGH MXCS 'chip select high tempC = kTemp >> 5 'side shift to ditch the stuff to the right of the decimal point and just show whole degrees) tempF = ((tempC * 18)/10) + 32 'convert C to F lcdout $fe,1,dec tempC," degrees C ",$fe,$c0,dec tempF," degrees F " 'display the data on LCD pause 500 goto main end
Bookmarks