Termostat

Sve vezano za mikrokontrolere

Moderators: pedja089, stojke369, [eDo], trax

User avatar
Smjesko
Stariji član
Stariji član
Posts: 4012
Joined: 26-12-2005, 17:12

Re: Termostat

Post by Smjesko »

@Feko, gdje taj "tip" operira? U kojem selu?
User avatar
Feko
Stariji član
Stariji član
Posts: 4394
Joined: 23-07-2008, 06:18
Location: Hrvatska, Slavonija, Selo moje malo...

Re: Termostat

Post by Feko »

Donji Miholjac
User avatar
EvilMax
Pocetnik na forumu
Pocetnik na forumu
Posts: 43
Joined: 22-10-2009, 08:44

Re: Termostat

Post by EvilMax »

Ja se izvinjavam dragi prijatelji ali ako nekoga ne mrzi da nanovo uploaduje ceo projekat jer osim linkova za firmware nijedan drugi link ne radi....Unapred zahvalan na razumevanju...
Shit happens....
User avatar
Feko
Stariji član
Stariji član
Posts: 4394
Joined: 23-07-2008, 06:18
Location: Hrvatska, Slavonija, Selo moje malo...

Re: Termostat

Post by Feko »

evo ga!
http://rapidshare(dot)com/files/376913393/termostat_v2.rar" onclick="window.open(this.href);return false;
User avatar
sindja1204
Odlično uznapredovao
Odlično uznapredovao
Posts: 792
Joined: 03-05-2009, 11:57
Location: Beograd

Re: Termostat

Post by sindja1204 »

Feko wrote:RiJEŠENO ! 8)
http://www.picbasic.co.uk/forum/showthread.php?t=10345" onclick="window.open(this.href);return false;
Samo iz sourcea u drugom postu treba iskomentirati što što piše i otkomentirati drugo
@Feko, sta ti tacno znaci ovo, tj, koji deo koda si promenio da bi dobio ispravno ocitavanje.
Da li je ovako dobro.
http://img530.imageshack.us/img530/7272/49428084.png" onclick="window.open(this.href);return false;
User avatar
Feko
Stariji član
Stariji član
Posts: 4394
Joined: 23-07-2008, 06:18
Location: Hrvatska, Slavonija, Selo moje malo...

Re: Termostat

Post by Feko »

Ne bih znao jer sam ja odrađivao hardware a kolega kojem sam jednog pravio je ovo uspio prokužiti i ispraviti :roll:
Ja sve što znam je samo upucati HEX u PIC :roll:
Čitaj onaj thread kojeg sam linkao, tamo je rješenje...koristi se source odande, ne onaj elektorov.
I ne moraš skoro ništa mijenjati u njemu, osim eventualno odabrati rezoluciju
Last edited by Feko on 11-10-2010, 21:25, edited 1 time in total.
User avatar
Feko
Stariji član
Stariji član
Posts: 4394
Joined: 23-07-2008, 06:18
Location: Hrvatska, Slavonija, Selo moje malo...

Re: Termostat

Post by Feko »

Sad sam se cuo sa kolegom...kaze da zaboravis orginalnu verziju i koristis samo onu sa linka a oko rezolucije je napisao slijedece:
"ne sjećam se sto posto, ali u ovome dijelu...
DS18B20_9bit CON %00011111 ' 93.75ms, 0.5°C
DS18B20_10bit CON %00111111 ' 187.5ms, 0.25°C <-- My favorite
DS18B20_11bit CON %01011111 ' 375ms, 0.125°C
DS18B20_12bit CON %01111111 ' 750ms, 0.0625°C (default)
tu se bira rezolucija i MISLIM da se to radi tako da ostaviš samo onaj koji hoćeš.
A iskomentiraš s ' i/ili obrišeš ostale."
User avatar
sindja1204
Odlično uznapredovao
Odlično uznapredovao
Posts: 792
Joined: 03-05-2009, 11:57
Location: Beograd

Re: Termostat

Post by sindja1204 »

Pogledacu i taj drugi kod. Pre ove izmene temperatura je bila trocifrena. Kada sam smanjio mnozenje sa 100 na 10 ocitavanje je dvocifreno, ali je pitanje koliko je tacno...
picresor
Posts: 18
Joined: 07-05-2007, 22:32
Location: Pula, Hrvatska

Re: Termostat

Post by picresor »

Napravio sam Fekin termostat ali krivo mi očitava. Onda sam programirao PIC sa Elektorovim .hex-om i radi dobro. Hmmm.

Možda je greškom na rapidshare stavljena nedovršena verzija .hex-a?

Pozdrav,
User avatar
Feko
Stariji član
Stariji član
Posts: 4394
Joined: 23-07-2008, 06:18
Location: Hrvatska, Slavonija, Selo moje malo...

Re: Termostat

Post by Feko »

Ako ti radi sa elektorovim hex-om onda si očito nabavio DS1820 ili DS18S20.
Ja sam imao DS18B20 pa je zato trebalo izmjeniti kod....
picresor
Posts: 18
Joined: 07-05-2007, 22:32
Location: Pula, Hrvatska

Re: Termostat

Post by picresor »

Točno. Iskoristio sam DS1820. Znači tu je kvaka.
Hvala na odgovoru.
User avatar
electron
Pravo uznapredovao :)
Pravo uznapredovao :)
Posts: 225
Joined: 28-02-2009, 19:20
Location: Serbia

Re: Termostat

Post by electron »

Uradio sam Fekin termostat, ali i meni krivo ocitava. Iskoristio sam 16F877A i DS18B20 kao na slici sve je O.K. samo sto pokazuje +183,68 nemogu nikako da nadjem gde se to u kodu podesava? Jel ima neko sa DS18B20 ne hex, nego code?
http://img130.imageshack.us/i/sdc10136q.jpg/" onclick="window.open(this.href);return false;
B0 = Mode switch in (In)
B1 = + switch in (In)
B2 = - switch in (In)
B3 = Not connected (Out)
B4 = LCD Bit 4 (Out)
B5 = LCD Bit 5 (Out)
B6 = LCD Bit 6 (Out)
B7 = LCD Bit 7 (Out
A0 = LCD Enable (Out)
A1 = LCD RS (Out)
A2 = "Warm" Output (Out)
A3 = "Cold" Output (Out)
A4 = DQ DS18B20 (In)
PIC16F877A
User avatar
sindja1204
Odlično uznapredovao
Odlično uznapredovao
Posts: 792
Joined: 03-05-2009, 11:57
Location: Beograd

Re: Termostat

Post by sindja1204 »

Hajde probaj ovako:
http://img51.imageshack.us/img51/7272/49428084.png" onclick="window.open(this.href);return false;
User avatar
electron
Pravo uznapredovao :)
Pravo uznapredovao :)
Posts: 225
Joined: 28-02-2009, 19:20
Location: Serbia

Termostat bez i sa jednom decimalom

Post by electron »

Gledajuci ovaj kod, kako je moguce podesiti prikaz na LCD, da bude sa jednom decimalom ili bez?

Code: Select all

'   OPIS: Program cita temperaturu sa digitalnog senzora DS1820
'   i prikazuje je na LCD displeju
	
	    DEFINE  LCD_DREG    PORTD	 ' I/O port na kome se nalazi LCD
	    DEFINE  LCD_DBIT    4       
	    DEFINE  LCD_RSREG   PORTD
	    DEFINE  LCD_RSBIT   2	     ' Register select pin
	    DEFINE  LCD_EREG    PORTD
	    DEFINE  LCD_EBIT    3	     ' Enable pin
	    DEFINE  LCD_BITS    4	     ' 4-bitni data bus 
	    DEFINE  LCD_LINES   2 	     ' LCD ima dva reda karaktera
    	symbol  DQ = PORTE.2      	 ' Dq linija je povez. na pin RE2
    	
    	temperatura  Var Word     	 ' Promen.za cuvanje izmer. temp.
	    count_remain Var Byte	     ' Ostatak 
	    count_per_c  Var Byte	     ' Ostatak po stepenu C
	    ADCON1 = 7			         ' PORTA i PORTE su digitalni
    	pause 100               	 ' Pauza za start LCD-a
Pocetak:
	    OWOut DQ, 1, [$CC, $44]      ' Start merenja temperature
Cekaj:	OWIn DQ, 4, [count_remain]	 ' Provera da li jos traje
	    If count_remain = 0 Then Cekaj
	    OWOut DQ, 1, [$CC, $BE] 	 ' Procitaj izmerenu temperaturu
	    OWIn DQ, 0, [temperatura.LOWBYTE, temperatura.HIGHBYTE, Skip 4, count_remain, count_per_c]
	
	   ' Prikazi temperaturu u DEC obliku
	
	   temperatura = (((temperatura >> 1) * 100) - 25) + (((count_per_c - count_remain) * 100) / count_per_c)
	   Lcdout $fe, 1, "   TEMPERATURA"
	   Lcdout $fe, $C0, "      ", DEC (temperatura / 100), ".", DEC2 	temperatura, " C"
       Pause 5000		             ' Zadrzi pet sekundi
       
	   Goto Pocetak		             ' Ponovi sve
	   End               	         ' Kraj programa
User avatar
MHN
Pravo uznapredovao :)
Pravo uznapredovao :)
Posts: 350
Joined: 11-03-2005, 22:02
Location: Sarajevo

Re: Termostat

Post by MHN »

U ovoj liniji je to odredjeno, pa malo s njom experimentisi sta ti treba. Ako hoces bez decimale obrisi ovaj dio DEC2 ...

Code: Select all

Lcdout $fe, $C0, "      ", DEC (temperatura / 100), ".", DEC2    temperatura, " C"
User avatar
[eDo]
Odlično uznapredovao
Odlično uznapredovao
Posts: 794
Joined: 13-02-2007, 17:17
Location: Beograd/Vranje
Contact:

Re: Termostat

Post by [eDo] »

Druze Feko moze ponovo upload svega na sendspace svi linkovi su mrtvi :) Koliko me secanje sluzi ovo tvoja skalamerija je mogla da meri temperaturu i da pali i gasi relej na zadatoj temperaturi zar me? Trebam kod strica da odradim elektroniku koja bi merila temperaturu i otvarala zatvarala ventil od solarnog grejanja na zadatoj temperaturi. Stric je reshio da sam napravi solarno grejanje pa me je kontaktirao :) Ajde kad si slobodan upload-uj da bacim pogled molim te ;)
"Master, I am here to serve you!!!"

http://www.dodaj.rs/f/2p/D2/3gK0C7Ua/do ... admins.jpg
User avatar
Feko
Stariji član
Stariji član
Posts: 4394
Joined: 23-07-2008, 06:18
Location: Hrvatska, Slavonija, Selo moje malo...

Re: Termostat

Post by Feko »

Ova varijanta ima mogučnost namještanja hystereze do maksimalno 2 stupnja. Njemu bi vjerojatno bilo bolje da ima mogučnost odvojenog namještanja temperature paljenja i gašenja.
Mislim da je bila varijanta na forumu sa takvim hex-om. Možda varijanta termostata od @MHN je radila na taj način (ako me sjećanje ne vara :roll: )
Mrsko mi dizati to na server, pa mi pošalji mail na PM da ti to pošaljem :wink:
User avatar
Feko
Stariji član
Stariji član
Posts: 4394
Joined: 23-07-2008, 06:18
Location: Hrvatska, Slavonija, Selo moje malo...

Re: Termostat

Post by Feko »

edit: Mislim da je ipak u pitanju termostat od @DaTi-a...ili je njegova varijatna bila bez hystereze :?:
Uglavnom ako ti odgovara održavanje željene temperature u rezoluciji +-2 stupnja ili manje onda ti odgovara ovaj termostat.
User avatar
sindja1204
Odlično uznapredovao
Odlično uznapredovao
Posts: 792
Joined: 03-05-2009, 11:57
Location: Beograd

Re: Termostat

Post by sindja1204 »

Davno sam pravio ovaj termometar, radilo je sve kako treba. ali ovih dana mi je trebalo da nastelujem temperaturu na oko 120 stepeni. Medjutim maksimum je na 75. Nasao sam u kodu gde je to limitirano, i uspeo da povecam do 99 stepeni. za sve temperature preko 99, izbacuje gresku prilikom kompajliranja.
@Feko , da li ti na tvom termostatu mozes da ides preko 75. Inace prilikom merenja temperature, on uredno izmeri i do 127 stepeni, problem je samo u namestanju temperature.

Sta bi jos trebalo promeniti u kodu da temperatura moze da se steluje do 125 Stepeni.

Code: Select all

'* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
'* Universal thermostat -25/+75 C.  by R.T.G. van Steenis                  *
'* Compiler : PicBasic Pro 2.45                                            *
'* B0 = Mode switch in (In)            A0 = LCD Enable    (Out)            *
'* B1 = + switch in    (In)            A1 = LCD RS        (Out)            *
'* B2 = - switch in    (In)            A2 = "Warm" Output (Out)            *
'* B3 = Not connected  (Out)           A3 = "Cold" Output (Out)            *
'* B4 = LCD Bit 4      (Out)           A4 = DQ DS1820     (In)             *
'* B5 = LCD Bit 5      (Out)                                               *
'* B6 = LCD Bit 6      (Out)                                               *
'* B7 = LCD Bit 7      (Out            PIC16F628 Code size = 1124 Words    *
'*                                                                         * 
'* Oscillator XT (4 MHz.) - Power up timer enabled - MCR enable            *
'* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


'*****************************************************************************
'*                  LCD Defines for EasyPic5 & 16F877A                                *
'*****************************************************************************

@ ERRORLEVEL -306
@ __config _HS_OSC & _WDT_ON & _PWRTE_ON & _BODEN_ON & _LVP_OFF & _CP_OFF 
  
    DEFINE LCD_DREG PORTB               ' I/O port where LCD is connected
    DEFINE LCD_DBIT 0
    DEFINE LCD_RSREG PORTB
    DEFINE LCD_RSBIT 4                  ' Register select pin
    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 5                   ' Enable pin
    DEFINE LCD_BITS 4                   ' 4-bit data bus
    DEFINE LCD_LINES 2                  ' LCD has 2 character lines
 
    DEFINE OSC 8
    DEFINE BUTTON_PAUSE 100
    
'*****************************************************************************
'Pinout for EasyPic5

	
	Heat			Var PORTC.2
	Cool 			Var PORTC.0
    DQ				Var	PORTE.2		' One-wire data pin
    
    Mode_B			Var PORTA.0
    UP_B			Var PORTA.1
    DOWN_B			Var PORTA.2
    
'*****************************************************************************
'Configs EasyPic5
'*****************************************************************************

ADCON1 = 7			          	' Set PORTD and PORTE to digital
CMCON  = 7						' Comparators OFF

PORTA = %00000111
PORTB = 0
PORTC = 0
PORTD = 0
PORTE = 0

TRISA = %00000111
TRISB = 0
TRISC = 0
TRISD = 0
TRISE = %00000010
'*****************************************************************************   
  
    
'*****************************************************************************
'*****************************************************************************
' Elektor LCD Defines

'@ __CONFIG _XT_OSC & _WDT_ON & _PWRTE_ON & _MCLRE_ON & _BODEN_OFF & _LVP_OFF & _CP_OFF
'
'
'
'DEFINE LCD_DREG PORTB                   ' LCD on port B
'DEFINE LCD_DBIT 4                       ' Data bits B4..B7
'DEFINE LCD_RSREG PORTA                  ' RS on PORTA
'DEFINE LCD_RSBIT 1                      ' RS on A1 
'DEFINE LCD_EREG PORTA                   ' E on PORTA
'DEFINE LCD_EBIT 0                       ' E on A0
'DEFINE LCD_BITS 4                       ' LCD 4 bit mode
'DEFINE LCD_LINES 2                      ' 2 line LCD display
'
''*****************************************************************************
''Pinout for Elektor
'
'Heat			Var PORTA.2
'Cool 			Var	PORTA.3
'DQ				Var	PORTA.4		' One-wire data pin
'    
'Mode_B			Var PORTB.0
'UP_B			Var PORTB.1
'DOWN_B			Var PORTB.2
''*****************************************************************************
'' I/o Settings
'
'PORTA = 0
'PORTB = 0
'TRISA= %11110000                        ' RA0..3=Outputs RA4=Input
'TRISB= %00000111 			' RB0..RB2=Inputs, RB3..RB7=Outputs
'CMCON=7                                 ' Disable comparators
'
'*****************************************************************************






'*****************************************************************************
' Variables
'*****************************************************************************

Temperature 	Var	Word		' Temperature storage
TempC			Var Word
Float			Var Word
TargetTemp		Var	Word		' Desired Temperature
Hyst			Var	Word		' Hystereris
V				Var	Word		' Var. for display

B1              Var Byte            ' Byte for TargetTemp calculation 
B2              Var Byte            ' Byte for TargetTemp calculation
'Count_Remain 	Var Byte		' Count remaining
'Count_Per_C 	Var	Byte		' Count per degree C
Sign			Var	Byte		' +/- sign
Mode 			Var	Byte		' 0=Temp. display, 1=Set Temp, 2=Set Hysteresis

Twist			Var Bit

'*****************************************************************************
' Resolution
'*****************************************************************************

DS18B20_9bit  	CON %00011111   	' 93.75ms, 0.5°C
DS18B20_10bit 	CON %00111111   	' 187.5ms, 0.25°C  <-- My favorite
DS18B20_11bit 	CON %01011111   	' 375ms,   0.125°C
DS18B20_12bit 	CON %01111111   	' 750ms,   0.0625°C  (default)

DATA 46, 224, 20                        ' Temp MSB, TEMP LSB, Hysteresis DIV 10

Heat=0                               ' Warm Output Low
Cool=0                               ' Cold Output Low
Mode=0                                  ' Temperature display mode
Twist = 0  

PAUSE 500
LCDOUT $FE, 1, $FE, $0C                 ' Clear display, cursor off
PAUSE 250

'*****************************************************************************
' DS 18B20 Config
'*****************************************************************************

OWOUT DQ, 1, [$CC, $4E, 0, 0, DS18B20_12bit]    'Skip ROM search and write N_bits
'                                                '  resolution to scratch pad


Read 0, B1                              ' Read TargetTemp MSB
Read 1, B2                              ' Read TargetTemp LSB
TargetTemp=B1*256+B2                    ' Calculate TargetTemp value (Default=20.0 C.)
Read 2, B1                              ' Read Hysteresis 
Hyst=10*B1                              ' Calculate Hysteresis value (Default= 2.0 C.)  

MainLoop: 
 If Mode_B=0 then                      ' Mode switch pressed
  Pause 50                              ' Debounce 
  LcdOut $FE, $8F, "*"                  ' Show that command is accepted 
  If Mode_B=0 then MainLoop            ' Wait until button is released  
  Mode=Mode+1                           ' Increment mode
  If Mode=2 then                        ' Save Target Temperature (Mode1 -> Mode2)
   Write 0, TargetTemp / 256		' TargetTemp MSB
   Write 1, TargetTemp MOD 256          ' TargetTemp LSB
  EndIf
  If Mode > 2 Then                      ' Save Hysteresis (Mode 2 -> Mode 0) 
   Mode=0               		' Only 0, 1, 2 are valid
   Write 2, Hyst / 10                   ' Divide Hyst value to fit in Byte
  EndIf
 EndIf

 If Mode =1 then                        ' Set Target Temperature
  LcdOut $FE, $80, "SET TEMPERATURE "   ' Show function
  V=TargetTemp                          ' TargetTemp in V  
  Gosub SelectSign                      ' Select +/blank/- 
  Gosub DisplayTemp                     ' Display Target Temperature
  If (UP_B=0) Or (DOWN_B=0) then    ' Up or Down button pushed
   If DOWN_B=0 then                    ' Down button 
    If TargetTemp > 7500 then           ' Not lower than -25 C. (10000-MinTemp * 100)
     TargetTemp=TargetTemp-25           ' Decrease temperuture with 0.25 C.
    EndIf
   EndIf
   If UP_B=0 then                    ' Up button
    If TargetTemp < 17500 then          ' Not higher than 75 C. (10000+MaxTemp * 100)
     TargetTemp=TargetTemp+25           ' Increase temperature with 0.25 C.
    EndIf
   EndIf
   GoSub SetTargetTemp                  ' Display TargetTemp and delay 0.25 Sec.
  EndIf
 EndIf 

 If Mode=2 then                         ' Set Hysteresis    
  LcdOut $FE, $80, "HYSTERESIS      "   ' Show function
  Sign=" "                              ' No sign  
  V= 10000+Hyst                         ' Set value for V  
  Gosub DisplayTemp                     ' Display Hysteresis
  If (UP_B=0) Or (DOWN_B=0) then    ' Up or down button pushed  
   Sign=" "                             ' No sign for Hysteresis
   If DOWN_B=0 then                    ' Down button
    If Hyst > 10 then Hyst=Hyst-10      ' Not less than 0.1 C.
   EndIf
   If UP_B=0 then                    ' Up button
    If Hyst < 1000 then Hyst=Hyst+10    ' Not more than 10.0 C.
   EndIf 
   V= 10000+Hyst                        ' Set value for V
   Gosub DisplayTemp                    ' Display Hysteresis 
   Pause 250                            ' Delay 0.25 Sec.
  EndIf
 EndIf 

 If Mode > 0 then Mainloop              ' Setting TargetTemperature or Hysteresis

 LcdOut $FE, $80, "TEMPERATURE     "    ' Show function

 Output DQ             			' Make Pin Output
 DQ=0					' OneWire line Low
 PauseUs 480                            ' Keep down for 480 µS  
 Input DQ                               ' Make Pin Input
 PauseUs 70                             ' Wait 70 µS
 If DQ=1 then                           ' No presence pulse from DS1820   
  LcdOut $FE, $1, "** No sensor! **"    ' Show message
  Pause 500                             ' Wait 0.5 Sec. 
  Goto MainLoop                         ' Check again
 EndIf

'*****************************************************************************
' Temp reading
'*****************************************************************************

 OWOut DQ, 1, [$CC, $44 ]       		' Start temperature conversion
 
 
'WaitLoop: OWIn DQ, 4, [Count_Remain]	' Check for still busy converting
' If Count_Remain = 0 Then WaitLoop      ' Busy 
' OWOut DQ, 1, [$CC, $BE]		' Read the temperature
' OWIn DQ, 0, [Temperature.LowByte, Temperature.HighByte, Skip 4, Count_Remain, Count_Per_C]
' Temperature = (((Temperature >> 1) * 100) - 25) + (((Count_Per_C - Count_Remain) * 100) / Count_Per_C)
' if Temperature > 32767 then
'  Temperature= ~Temperature

waitloop: 

	WHILE NOT DQ
	WEND
		
    
    OWOUT   DQ, 1, [$CC, $BE ]                       ' Skip ROM search & read scratchpad 														memory
    OWIN    DQ, 2, [Temperature.Lowbyte, Temperature.Highbyte]' Read two bytes / end comms
      
Convert_Temp:                                       

	IF Temperature.15 THEN
	
	 	Temperature = ~Temperature + 1
		Twist = 1
		
	ENDIF
   											
    TempC =  ( Temperature & $7FF ) >> 4   				' Partie Entière '4
                  
    Float = ((Temperature.Lowbyte & $0F ) * 25 )>> 2    ' Partie décimale 100èmes
    
    Temperature = TempC*100 + Float						'Préparation 1/100 degrés
    
 IF Twist THEN
   
  V= 10000 - Temperature                ' 25 C=12500  0 C=10000  -10 C=9000
  Twist = 0 
 else
  V= 10000 + Temperature
 EndIf

 If V < TargetTemp - Hyst then          ' Below Target temperature - Hysteresis
  Heat=1                             ' Activate   Warm Output
  Cool=0                             ' Deactivate Cold Output
 EndIf

 If V > TargetTemp + Hyst then          ' Above Target temperature + Hysteresis
  Heat=0                             ' Deactivate Warm output
  Cool=1                             ' Activate   Cold Output
 EndIf

 GoSub SelectSign                       ' +/blank/- Sign 
 GoSub DisplayTemp                      ' Temperature to LCD

Goto MainLoop				' Do it forever

' SUBROUTINES:
'----------------------------------------
SelectSign:
 If v = 10000 then                      ' Temperature = 0 C.
  Sign=" " 				' No sign
 Else 
  If v < 10000 then              	' <> 0
   Sign="-"				' Temperature below 0 C. 	
  Else
   Sign="+"				' Temperature above 0 C.
  EndIf
 EndIf
Return

'----------------------------------------
DisplayTemp:
 If V >= 10000 then                     ' Above 0 C.      
  Temperature=V-10000                   
 Else                                   
  Temperature=10000-V                   ' Below 0 C. 
 EndIf
 LcdOut $FE, $C0, Sign, DEC (Temperature / 100), ".", DEC2 Temperature, " ",223,"C "
Return

'-----------------------------------------
SetTargetTemp:
 V=TargetTemp
 Gosub SelectSign
 Gosub DisplayTemp 
 Pause 250
Return

'-----------------------------------------
END

U ovom delu koda sam umesto 75, ukucao 99 i dobio stelovanje do 99 stepeni. Dalje nije moglo

Code: Select all

  If TargetTemp > 7500 then           ' Not lower than -25 C. (10000-MinTemp * 100)
     TargetTemp=TargetTemp-25           ' Decrease temperuture with 0.25 C.
    EndIf
   EndIf
   If UP_B=0 then                    ' Up button
    If TargetTemp < 17500 then          ' Not higher than 75 C. (10000+MaxTemp * 100)
User avatar
Feko
Stariji član
Stariji član
Posts: 4394
Joined: 23-07-2008, 06:18
Location: Hrvatska, Slavonija, Selo moje malo...

Re: Termostat

Post by Feko »

ne mogu provjeriti, nije kod mene...ali gledam orginal iz elektora i piše od -25 do +75 tako da ne može.
Vjerojatno može ako se prepravi kod ali o tome ja nemam blage.... :roll:
Post Reply