skraceni kurs ucenja picbasica

Rasprava o PIC mikrokontrolerima, PIC projekti i drugo vezano za PIC-eve...

Moderators: pedja089, stojke369, [eDo], trax

Post Reply
nixx994
Pravo uznapredovao :)
Pravo uznapredovao :)
Posts: 248
Joined: 19-03-2011, 18:20
Location: Milutovac/Trstenik/Krusevac
Contact:

Re: skraceni kurs ucenja picbasica

Post by nixx994 »

pozz drugari,evo mene opet :)
poceo opet malo da se zezam sa picovima i da radim nesto (manje-vise) korisno

da objasnim problem:
hteo bih da u odnosu na analognu vrednost na porta.0 menjam duty cycle na portc.1, i isto to da radim sa porta.1 i portc.2
a desava se sledece:
kada oba potenciometra postavim na istu vrednost motori se okrecu brzo,a sto je veca razlika u vrednostima motori se okrecu sve sporije.

edit:
zaboravio sam da napomenem da kad koristim ADC_BITS 8 i var byte,vrednost se "cuva" u 2 bita,a sa ADC_BITS 10 i var word vrednost se cuva u 10(verovatno,jer ispisujem tu vrednost preko 8 ledica na portb i portd i svih 8 komada se pale i gase)



sema:
http://s2.postimg.cc/m70pdilop/adc_pwm.jpg]

Code: Select all

Define  ADC_BITS     8  
Define  ADC_CLOCK    3    
Define  ADC_SAMPLEUS 100

left var byte
right var byte

trisa = %11111111
trisc = %00000000
adcon1 = %10000010 
left = 0
right = 0
pause 300
wai: pause 10

main:
if adcon0.2 = 1 then wai  
adcin 0,left  
if adcon0.2 = 1 then wai  
adcin 1,right 
if adcon0.2 = 1 then wai 
hpwm 1,left,5000
hpwm 2,right,5000

goto main
end
oci mi ispadose od gledanja raznih primera(nisam nasao ni jedan koji koristi adc i pwm) i citanja datasheet-a,a da ne simuliram desavanja u proteusu pravi PIC bi verovatno izgoreo od silnog reprogramiranja.
Kad porastem bicu Feko,ili mozda Pedja!!!:) :) :)
User avatar
pedja089
Administrator sajta
Administrator sajta
Posts: 7876
Joined: 20-02-2007, 14:50
Location: Beočin -Srbija

Re: skraceni kurs ucenja picbasica

Post by pedja089 »

if adcon0.2 = 1 then wai
Cemu to sluzi?
ADCIN odradjuje sve. Manje vise izbaci to, i to je to sto ti treba.
nixx994
Pravo uznapredovao :)
Pravo uznapredovao :)
Posts: 248
Joined: 19-03-2011, 18:20
Location: Milutovac/Trstenik/Krusevac
Contact:

Re: skraceni kurs ucenja picbasica

Post by nixx994 »

if adcon0.2 = 1 then wai
to je za slucaj da ad converzija nije zavrsena(wai je pauza 5 ms) - sada izbaceno

a nasao sam u cemu je greska
http://s15.postimg.cc/x4gr99d8b/adc_pwm_s.jpg
TO SAM ZABORAVIO DA SPOJIM NA - NAPAJANJA ZA MOTORE

sada sve radi (delimicno) kako bi trebalo. jedini problem je sto se motori okrecu znatno sporije ali to cu da vidim sta je i kako je kada stignu pravi picevi,napravim plocicu i sve to isprobam uzivo.
nije ovaj proteus pouzdan bas 100%,jer je nelogicno da pri 8-bitnoj konverziji ulazni napon ima vrednosti 0-3(dodao sam lcd da isprobam to),a pri 10-bitnoj 0-1023
Kad porastem bicu Feko,ili mozda Pedja!!!:) :) :)
Maki
Odlično uznapredovao
Odlično uznapredovao
Posts: 766
Joined: 02-07-2012, 12:54

Re: skraceni kurs ucenja picbasica

Post by Maki »

Pozdrav !
Imam sljedeći problem. Prilikom kompailiranja ovog programa http://www.dt-ints.com/DT_INTS-14/blinky.html javlja mi ovaj error https://db.tt/P9jJ9Mal .
Prethodno sam definirao oscilator te podesio U/I pinove na PIC16F628A.
Ima li možda tko ideju gdje je greška ?
Koristim MicroCode studio 5.0.0.3, a verzija kompailera je 3.0.4.1
Ako treba još što dodati recite.
User avatar
Kukinjos
Pravi forumaš
Pravi forumaš
Posts: 1724
Joined: 28-03-2012, 18:01
Location: Split

Re: skraceni kurs ucenja picbasica

Post by Kukinjos »

Trebaš samo dodat wsave varjablu na početak programa, onako kako ti piše u prvoj liniji greške, ovako:

Code: Select all

wsave VAR BYTE $70 SYSTEM
LED1   VAR  PORTB.1
INCLUDE "DT_INTS-14.bas"     ' Base Interrupt System
INCLUDE "ReEnterPBP.bas"     ' Include if using PBP interrupts

ASM
INT_LIST  macro    ; IntSource,        Label,  Type, ResetFlag?
        INT_Handler   TMR1_INT,  _ToggleLED1,   PBP,  yes
    endm
    INT_CREATE               ; Creates the interrupt processor
ENDASM

T1CON = $31                ; Prescaler = 8, TMR1ON
@ INT_ENABLE  TMR1_INT     ; enable Timer 1 interrupts

Main:
  PAUSE 1
GOTO Main

'---[TMR1 - interrupt handler]--------------------------------------------------
ToggleLED1:
     TOGGLE LED1
@ INT_RETURN
Cezare, star sam i nemoćan, ali poslušaj moj savjet ....
Maki
Odlično uznapredovao
Odlično uznapredovao
Posts: 766
Joined: 02-07-2012, 12:54

Re: skraceni kurs ucenja picbasica

Post by Maki »

To je to ! :)
Radi odlično !
Hehehe, di ćeš većeg veselja od LED koja blinka :)
Hvala vam.
alarmi ns
Penjem se :)
Penjem se :)
Posts: 54
Joined: 29-06-2013, 20:13

Re: skraceni kurs ucenja picbasica

Post by alarmi ns »

Pozdrav svima dali mi neko moze reci gde mogu procitati nesto o tome-slab sam sa engleskm,a treba da povezem pic i eksterni eeprom u eprom treba da naguram tabelu brojeva koju bi iskucao u exelu a pic treba jedan po jedan broj da cita iz tabeele i da ga ispisuje na displej naravno ja bi u picu ispiusao uslove kad ce koji broj ispisivati
alarmi ns
Penjem se :)
Penjem se :)
Posts: 54
Joined: 29-06-2013, 20:13

Re: skraceni kurs ucenja picbasica

Post by alarmi ns »

pozdrav svima dali neko moze da mi pomogne oko racunanja vremena naima treba da vezem pic tako da mi tacno svakih 5 min da jedan impuls,znam da se to sa pauzama moze uraditi al neznam kako to da urdim da mi radi tacno-uredjaj ce raditi mesecima tako,a sa pausama bi kasnijo evo kako sam ja probao da uradim al nije tacan.Dali se to moze nekako izracunati ili moram testirati.radicu sa picem 12f683

Code: Select all

'---------------------------OSIGURACI--------------------------------
 #CONFIG 
     __CONFIG  _INTRC_OSC_NOCLKOUT & _WDT_OFF & _MCLRE_OFF  & _BOD_OFF & _CP_OFF & _PWRTE_ON
    #ENDCONFIG
    DEFINE OSC 4


'-------------------------- PDESAVANJA -------------------------------
    
    ANSEL = $30
    WPU = $37
    
    CMCON0 = 7                ' Analog comparators off

    TRISIO = %100000          '5-ULAZ
 '------------------------PROOGRAM------------------------------------        
 i var word
 
  
    symbol led = GPIO.0      
    LOW led
    
    
   pocetak:
   
   led = 1
   pause 200
   led=0
   
   pause 1000
           
 
 for i = 1 to 290
 pause 1000
 next i
 goto pocetak
 
 
User avatar
mirzza
Odlično uznapredovao
Odlično uznapredovao
Posts: 722
Joined: 05-12-2006, 22:33
Location: Tuzla

Re: skraceni kurs ucenja picbasica

Post by mirzza »

Evo neko moje rjesenje tvog problema, ne bi smjelo imati graske, jedino ako je bitno i ovih 200ms da se uklopi u 5 minuta moze se i to rijesiti. Ja sam testirao u Proteusu gledajuci njegov timer ovaj program je radio savrseno.

Code: Select all

symbol SIGNAL=PORTA.0  ' definisanje izlaznog porta
output signal

'Definisanje brojaca
sek var byte   'varijabla za sekunde
minute var byte  'varijabla za minute

'Inicijalizacija brojaca
sek=0
minute=0

'Postavljanje izlaznog porta na 0 ili LOW stanje
low signal

START:
sek=sek+1 

if sek>=60 then
sek=0
minute=minute+1 
    if minute>=5 then
    minute=0
    high signal
    pause 200 ' Vrijeme trajanja signala
    low signal
    endif
endif

pause 1000

goto start
end
Mozes uzeti REAL TIME modul na Ebayu povezati sa mikrokontrolerom, tu tek ne bi smjelo biti greske.
alarmi ns
Penjem se :)
Penjem se :)
Posts: 54
Joined: 29-06-2013, 20:13

Re: skraceni kurs ucenja picbasica

Post by alarmi ns »

Hvala na odgovoru koristice mi mnogo u projektu koji radim,e sada me jos nesto muci treba da komuniciram sa displejom uz pomoc 12c komunikacije-dve zice,dali neko moze da mi da primer sa tom komunikacijom,ili da mi da link gde je to vec objasnjeno radijo bi sa picem serije 18 ,izmedju pica i lcda ima lcd draivier dali postoji takav displej u proteusu radi simulacije
Attachments
Medija ml lcd.jpg
Medija ml lcd.jpg (29.96 KiB) Viewed 21151 times
alarmi ns
Penjem se :)
Penjem se :)
Posts: 54
Joined: 29-06-2013, 20:13

Re: skraceni kurs ucenja picbasica

Post by alarmi ns »

Pozdrav svima dali mi neko moze reci gde gresim u kodu i u semi,semu sam nasao na neta i precrtao je u proteus medjutim kad pokrenem proteus mi ispise da deo pc8574 nepostoji,znam da treba izdefinisati na koji pin su nakaceni pinovi displeja al nemam ideju kako to da uradim.Okacicu sliku sta ispise u proteusu semu i kod.Namena ovog uredjaja je da seriski ispisuje na displej,treba jedan displej u kolima da prepravim koji preko i2c komunikacije ispisuje evo koda,seme i slike sta proteus ispise.molim nekog da mi pomogne

Code: Select all

 '---------------------------OSIGURACI--------------------------------
 #CONFIG 
     __CONFIG  _INTRC_OSC_NOCLKOUT & _WDT_OFF & _MCLRE_OFF  & _BOD_OFF & _CP_OFF & _PWRTE_ON
    #ENDCONFIG
    DEFINE OSC 4


'-------------------------- PDESAVANJA -------------------------------
    
    ANSEL = $30
    WPU = $37
    
    CMCON0 = 7                ' Analog comparators off

    TRISIO = %100000          '5-ULAZ
 '------------------------PROOGRAM------------------------------------        
 
   	Include "modedefs.bas" ' Include serial modes


   	
   	DPIN Var GPIO.1      ' I2C data pin

	CPIN Var GPIO.0       ' I2C clock pin
	
	
	B0   Var byte

	B1   Var byte

	B2   Var byte

	 

	   For B0 = 0 To 15    ' Loop 16 times

	     I2CWRITE DPIN,CPIN,$A0,B0,[B0]  ' Write each location's address to itself

	     Pause 1000        ' Delay 10ms after each write

	   Next B0
Attachments
greska.jpg
greska.jpg (46.59 KiB) Viewed 21114 times
sema2.jpg
sema2.jpg (40.19 KiB) Viewed 21114 times
User avatar
Kukinjos
Pravi forumaš
Pravi forumaš
Posts: 1724
Joined: 28-03-2012, 18:01
Location: Split

Re: skraceni kurs ucenja picbasica

Post by Kukinjos »

Novija verzija Proteusa rješava problem
http://www.picbasic.co.uk/forum/archive ... -1187.html
Cezare, star sam i nemoćan, ali poslušaj moj savjet ....
alarmi ns
Penjem se :)
Penjem se :)
Posts: 54
Joined: 29-06-2013, 20:13

Re: skraceni kurs ucenja picbasica

Post by alarmi ns »

drugari kolko je stoperica u proteusu tacna?kucam jedan projekat gde mi je vreme jako vazno
User avatar
andrejevica
Pocetnik na forumu
Pocetnik na forumu
Posts: 35
Joined: 07-03-2011, 18:06

Re: skraceni kurs ucenja picbasica

Post by andrejevica »

Da li neko ima kod za pic za can bus komunikaciju koja se koristi u kolima?Kako da primim neki podatak preko can-a?...
User avatar
pedja089
Administrator sajta
Administrator sajta
Posts: 7876
Joined: 20-02-2007, 14:50
Location: Beočin -Srbija

Re: skraceni kurs ucenja picbasica

Post by pedja089 »

Ne moras mi slati i PM. Ako znam ovde cu napisati. Nisam se sa tim nikada igraom ali ne verujem da je tesko... Treba resiti hardver, da se ttl prilagodi na CAN bus. To ne bi trebalo biti tesko.
Druga stvar je sta se salje u kakvim paketima i kojom brzinom. A verujem da to zavisi od modela do modela austa, ili bar od proizvodjaca do proizvodjaca... Tako da bez kopanja po internetu ili detaljne analize paketa nista od programa.
User avatar
electron
Pravo uznapredovao :)
Pravo uznapredovao :)
Posts: 225
Joined: 28-02-2009, 19:20
Location: Serbia

Re: skraceni kurs ucenja picbasica

Post by electron »

Hteo bi da dodam podesavanje za još jednu temperaturu, i histerezu ali mi nešto ne štima: :?: :?: :?:

Code: Select all

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

clear
ANSEL = %00000000           'All digital
 ANSELH = %00000000
 OPTION_REG.7 = 1            'Weak pull-ups enabled
    DEFINE LCD_DREG PORTB               ' I/O port where LCD is connected
    DEFINE LCD_DBIT 4
    DEFINE LCD_RSREG PORTA
    DEFINE LCD_RSBIT 4                  ' Register select pin RA4
    DEFINE LCD_EREG PORTA
    DEFINE LCD_EBIT 2                   ' Enable pin RA2
    DEFINE LCD_BITS 4                   ' 4-bit data bus
    DEFINE LCD_LINES 2                  ' LCD has 2 character lines

    DEFINE OSC 4
    DEFINE BUTTON_PAUSE 100
    
'*****************************************************************************
'Pinout for EasyPic5

   
   Re1         Var PORTB.1    'Relej1
   Re2          Var PORTB.2     'Relej2
   Re3            var PORTA.1      'Relej3
    DQ             Var   PORTB.0     ' One-wire data pin
    
    Mode_B          Var PORTB.3   'Mode 
    UP_B             Var PORTA.0    'Napred
    DOWN_B            Var PORTA.3      'Nazad
    
    
'*****************************************************************************
'Configs EasyPic5
'*****************************************************************************


TRISA=%00001001             '                     1-input
TRISB=%00001001             '                     0-input
'*****************************************************************************
'*****************************************************************************
' Variables
'*****************************************************************************
Temperature    Var   Word      ' Temperature storage
TempC         Var Word
Float         Var Word
TargetTemp      Var   Word      ' Desired Temperature
TargetTemp1      Var   Word      ' Desired Temperature
Hyst         Var   Word      ' Hystereris
Hyst1         Var   Word      ' Hystereris
V            Var   Word      ' Var. for display

B1              Var Byte            ' Byte for TargetTemp calculation 
B2              Var Byte            ' Byte for TargetTemp calculation
B3              Var Byte            ' Byte for TargetTemp calculation

B4              Var Byte            ' Byte for TargetTemp calculation 
B5              Var Byte            ' Byte for TargetTemp calculation
B6              Var Byte            ' Byte for TargetTemp calculation

Sign         Var   Byte      ' +/- sign
Mode          Var   Byte      ' 0=Temp. display, 1=Set Temp1, 2=Set Hysteresis1, 3=Set Temp2, 4=Set Hysteresis2

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

Re1=0                               ' Warm Output Low
Re2=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
Read 2, B3                              ' Read Hysteresis
Read 3, B4                              ' Read TargetTemp MSB
Read 4, B5                              ' Read TargetTemp LSB
Read 5, B6                              ' Read Hysteresis

TargetTemp=B1*256+B2                    ' Calculate TargetTemp value (Default=20.0 C.)
Hyst=10*B3                              ' Calculate Hysteresis value (Default= 2.0 C.)

TargetTemp1=B3*256+B4                    ' Calculate TargetTemp value (Default=20.0 C.)
Hyst1=10*B6                              ' Calculate Hysteresis value (Default= 2.0 C.)    



'********************podesavanje temperature************************************

Podesavanje:

If Mode_B=0 then                      ' Mode switch pressed
  Pause 50                              ' Debounce 
  LcdOut $FE, $8F, "*"                  ' Show that command is accepted 
  If Mode_B=0 then Podesavanje            ' Wait until button is released  
  Mode=Mode+1                           ' Increment mode
'----------------------  
  If Mode =3 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) 
   Write 2, Hyst / 10                   ' Divide Hyst value to fit in Byte
  EndIf

'*********************
  If Mode =1 then                        ' Save Target Temperature (Mode1 -> Mode2)
   Write 3, TargetTemp1 / 256      ' TargetTemp MSB
   Write 4, TargetTemp1 MOD 256          ' TargetTemp LSB
  EndIf
'----------------------  
  If Mode > 3 Then                      ' Save Hysteresis (Mode 2 -> Mode 0) 
   Mode=0                     ' Only 0, 1, 2 are valid
   Write 5, Hyst1 / 10                   ' Divide Hyst value to fit in Byte
  EndIf
EndIf
'********************

If Mode =0 then                        ' Set Target Temperature
  LcdOut $FE, $80, "Set Temp1       "   ' 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 =1 then                         ' Set Hysteresis    
  LcdOut $FE, $80, "Hysteresys1     "   ' 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 

'********************podesavanje temp2******************************************

If Mode =2 then                        ' Set Target Temperature
  LcdOut $FE, $80, "Set Temp2       "   ' 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 TargetTemp1 > 7500 then           ' Not lower than -25 C. (10000-MinTemp * 100)
     TargetTemp1=TargetTemp1-25           ' Decrease temperuture with 0.25 C.
    EndIf
   EndIf
   If UP_B=0 then                    ' Up button
    If TargetTemp1 < 17500 then          ' Not higher than 75 C. (10000+MaxTemp * 100)
     TargetTemp1=TargetTemp1+25           ' Increase temperature with 0.25 C.
    EndIf
   EndIf
   GoSub SetTargetTemp1                  ' Display TargetTemp and delay 0.25 Sec.
  EndIf
EndIf 
'--------------------

If Mode=3 then                         ' Set Hysteresis    
  LcdOut $FE, $80, "Hysteresys2     "   ' Show function

  Sign= " "                              ' No sign  
  V= 10000+Hyst1                         ' 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 Hyst1 > 10 then Hyst1=Hyst1-10      ' Not less than 0.1 C.
   EndIf
   If UP_B=0 then                    ' Up button
    If Hyst1 < 1000 then Hyst1=Hyst1+10    ' Not more than 10.0 C.
   EndIf 
   V= 10000+Hyst1                        ' Set value for V
   Gosub DisplayTemp                    ' Display Hysteresis 
   Pause 250                            ' Delay 0.25 Sec.
  EndIf
EndIf 

If Mode > 0 then Podesavanje              ' Setting TargetTemperature or Hysteresis

goto Podesavanje

' 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, " ",178,"C "
Return
'-----------------------------------------
SetTargetTemp:
V=TargetTemp
Gosub SelectSign
Gosub DisplayTemp 
Pause 250
Return
'-----------------------------------------
SetTargetTemp1:
V=TargetTemp1
Gosub SelectSign
Gosub DisplayTemp 
Pause 250
Return
User avatar
electron
Pravo uznapredovao :)
Pravo uznapredovao :)
Posts: 225
Joined: 28-02-2009, 19:20
Location: Serbia

Re: skraceni kurs ucenja picbasica

Post by electron »

Skontao sam da je do ovoga:

Code: Select all

DATA 46, 224, 20                        ' Temp MSB, TEMP LSB, Hysteresis DIV 10
Samo šta tu šta znači?
User avatar
pedja089
Administrator sajta
Administrator sajta
Posts: 7876
Joined: 20-02-2007, 14:50
Location: Beočin -Srbija

Re: skraceni kurs ucenja picbasica

Post by pedja089 »

PBP Manual wrote:Store constants in on-chip non-volatile EEPROM when the device is first programmed. If the optional Location value is omitted, the first DATA statement starts storing at address 0 and subsequent statements store at the following locations.
Temp= 46*256+224=12000, malo mi puno dfa bude to u stepenima. Mozda je 12 stepeni, ili 120.
Ali skontacers to iz koda. Da ja sad ne kopam...

Hyst=20/10=2 stepena
elena2610
Posts: 2
Joined: 07-05-2016, 12:53

Re: skraceni kurs ucenja picbasica

Post by elena2610 »

dali nekoj ke mi dade gotov kod za shemava https://gm1.ggpht.com/8948FEUvAHG_IKvpa ... 600-l75-ft - dalecinsko upravuvanje na domasna sijalica?
Branez
Pravo uznapredovao :)
Pravo uznapredovao :)
Posts: 457
Joined: 22-04-2008, 16:27
Location: Maribor(SLO) Koprivnica(HR)
Contact:

Re: skraceni kurs ucenja picbasica

Post by Branez »

Link ne radi!
Real Radios Glow in the Dark!
Post Reply