Jump to content
ELFORUM - Forumul electronistilor
GeoMar

Modificare Soft Statie de Lipit

Recommended Posts

Apelez si eu cu incredere,la userii mai priceputi in tainele programarii AVR-urilor.

 

Doresc ca la Statia de Lipit, cea de AICI, sa adaug pe un pin neutilizat de la Atmega8 (pin 27,port PC4) un switch (cel din suportul letconului) pentru trecerea statie in stand-by dupa un timp de neutilizare, prestabilit din soft.

Atunci cand letconul este pus in suport, switch-ul pune pinul/portul pe 0, iar dupa un timp prestabilit (din soft) sa zicem 15 minute de neutilizare (letconul nu a fost ridicat din suport), statia sa treaca automat in Stand-by, la temperatura setata pentru Stand-by (tot din soft).

Statia are aceasta facilitate de Stand-by, dar actionata manual printr-un switch de catre cel care o utilizeaza.

 

Dupa scurgerea unui interval de timp (50 de min ex, sau mai mic/mare), daca se doreste folosirea Statiei de Lipit si se ridica letconul din suport, statia sa porneasca automat pe temperatura presetata inainte de trecerea ei in Stand-by.

 

Daca se foloseste un suport de letcon FARA swicth, statia sa lucreze normal, iar trecerea in stand-by se va face manual ca si acum.

 

 

Analizand schema statiei, am observat ca mai sunt cativa pini nefolositi (pin 2, 3, 9, 10, 15, 28).

Se pot pune switch-uri (si modifica/imbunatati softul) si sa avem cateva memorari (ex=M1,M2,M3,M4,M5,M6) ale unor temperaturi dorite/setate de utilizator?

Nu neaparat 6 memorii, cred ca 3 sunt suficiente. Pe unul din pini sa punem un buzzer ca sa "stim" cand am memorat o temperatura, ceva asemanator cu statia de lipit prezentata AICI de colegul RETY.

Daca se poate face si modificarea acesta cu memoriile/buzzerul, cred ca ar rezulta o statie mul mai buna/fiabila.

 

 

Codul este scris in BascomAVR.

Dupa modificarea softului, ma descurc sa-l compilez pentru a obtine fisierul hex

 

Codul original al statiei:

'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'XXXXXXXXXXX STACJA LUTOWNICZA STEROWANA MIKROKONTROLEREM XXXXXXXXXXXXXXXXXX'XXXXXXXXXXXXXXXXXXXXX AUTOR: KAMIL SZKUTNIK XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX$regfile = "m8def.dat"$crystal = 1000000Config Lcd = 16 * 2Config Lcdpin = Pin , Db4 = Portd.4 , Db5 = Portd.5 , Db6 = Portd.6 , Db7 = Portd.7 , E = Portb.2 , Rs = Portb.0Config Pind.2 = InputConfig Portd.3 = OutputConfig Pinc.0 = InputConfig Pinc.1 = InputConfig Pinc.2 = InputConfig Pinc.3 = InputSet Portc.1Set Portc.2Set Portc.3Grzalka Alias Portd.3Zero_fazy Alias Pind.2Uspienie Alias Pinc.1Wiecej Alias Pinc.2Mniej Alias Pinc.3Config Adc = Single , Prescaler = Auto , Reference = AvccDim Nastawa As SingleDim Wart_ac As WordDim V As SingleDim Wart_nap As String * 2Dim Temp As SingleDim Pamiec As BitDim Temp_lcd As String * 1ClsCursor OffLcd " STACJA"LowerlineLcd " LUTOWNICZA"Wait 1ClsDeflcdchar 1 , 6 , 9 , 9 , 6 , 32 , 32 , 32 , 32Pamiec = 0Start AdcReadeeprom Nastawa , 2DoHomeWart_ac = Getadc(0)Waitms 100V = Wart_ac * 0.0049Temp = V * 260Temp = Temp + 25Temp_lcd = Fusing(temp , "#.&")If Temp > 500 ThenHomeLcd " Podlacz raczke "LowerlineLcd " lutownicy "ElseIf Pamiec = 1 ThenLowerlineLcd " USPIENIE "ElseLowerlineLcd "Nastawa: "Lcd NastawaLcd Chr(1)Lcd "C"End IfHomeLcd "Temp: "Lcd Temp_lcdLcd Chr(1)Lcd "C"End IfIf Wiecej = 0 And Mniej = 0 And Uspienie = 1 ThenNastawa = 250Bitwait Wiecej , SetEnd IfIf Nastawa > Temp ThenBitwait Zero_fazy , SetGrzalka = 1ElseGrzalka = 0End IfIf Uspienie = 0 And Pamiec = 0 And Wiecej = 1 And Mniej = 1 ThenWaitms 25If Uspienie = 0 ThenNastawa = 130Set PamiecBitwait Uspienie , SetEnd IfEnd IfIf Uspienie = 0 And Pamiec = 1 And Wiecej = 1 And Mniej = 1 ThenWaitms 25If Uspienie = 0 ThenReadeeprom Nastawa , 2Reset PamiecBitwait Uspienie , SetEnd IfEnd IfIf Wiecej = 0 And Pamiec = 0 And Mniej = 1 And Uspienie = 1 ThenWaitms 25If Wiecej = 0 ThenGosub Wiecej_prBitwait Wiecej , SetEnd IfEnd IfIf Mniej = 0 And Pamiec = 0 And Wiecej = 1 And Uspienie = 1 ThenWaitms 25If Mniej = 0 ThenGosub Mniej_prBitwait Mniej , SetEnd IfEnd IfLoopEndWiecej_pr:Nastawa = Nastawa + 10Waitms 100Writeeeprom Nastawa , 2ReturnMniej_pr:Nastawa = Nastawa - 10Waitms 100Writeeeprom Nastawa , 2Return
In speranta ca nu am solicitat prea mult, multumesc anticipat userilor care imi pot acorda ajutor in solutionare :da
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.Terms of Use si Guidelines