logo elektroda
logo elektroda
X
logo elektroda
REKLAMA
REKLAMA
Adblock/uBlockOrigin/AdGuard mogą powodować znikanie niektórych postów z powodu nowej reguły.

Bascom wyświetlacz+przycisk

krzysiekdioda 13 Sty 2009 18:01 1607 15
REKLAMA
  • #1 5993581
    krzysiekdioda
    Poziom 13  
    Witam.
    Dlaczego wyświetla mi błędne kody??
    Poniżej mój kod (jestem laikiem, dopiero się uczę)




    $regfile = "m8def.dat"
    
     $crystal = 4000000
    
     Config Lcd = 16 * 2
    
    Config Lcdpin = Pin , Db4 = Portd.2 , Db5 = Portd.3 , Db6 = Portd.4 , Db7 = Portd.6 , E = Portd.1 , Rs = Portd.0
    
    S1 Alias Pinb.1
    
    Config S1 = Input .
    
    Set S1 .
    
    If S1 = 0 Then
    Lcd "hello"
    Else S1 0 = 1 Then
    Cls
    End If
    
  • REKLAMA
  • #2 5993602
    Konto nie istnieje
    Poziom 1  
  • REKLAMA
  • #3 5993618
    krzysiekdioda
    Poziom 13  
    miało być tak jeżeli
    S1=0
    to na wyświetlaczu widzę napis hello
    Jeżeli nie to nie mam nic

    Dodano po 12 [minuty]:

    Teraz mam tak i wyświetla krzaczki
    S1 Alias Pinb.1
    
    Config S1 = Input
    
    Set S1
    
    If S1 = 0 Then
    Lcd "hello"
    Else
    Cls
    End If
    Cls
  • #4 5993810
    Konto nie istnieje
    Poziom 1  
  • #5 5993866
    krzysiekdioda
    Poziom 13  
    $regfile = "m8def.dat"
    
     $crystal = 4000000
    
     Config Lcd = 16 * 2
    
    Config Lcdpin = Pin , Db4 = Portd.2 , Db5 = Portd.3 , Db6 = Portd.4 , Db7 = Portd.6 , E = Portd.1 , Rs = Portd.0
    
    S1 Alias Pinb.1
    S2 Alias Pinb.2
    
    Config S1 = Input
    Config S2 = Input
    
    Set S1
    Set S2
    
    Do
      If S1 = 0 Then
        Lcd "hello"
      Else
        Cls
      End If
    Loop
    End





    Czy to jest co trzeba??
  • #6 5993896
    Konto nie istnieje
    Poziom 1  
  • REKLAMA
  • #7 5994228
    krzysiekdioda
    Poziom 13  
    a'la piórnik ten z elektrody
  • REKLAMA
  • #8 5994277
    Konto nie istnieje
    Poziom 1  
  • #9 5994286
    krzysiekdioda
    Poziom 13  
    A to??

    $regfile = "m8def.dat"
    
     $crystal = 4000000
    
     Config Lcd = 16 * 2
    
    Config Lcdpin = Pin , Db4 = Portd.2 , Db5 = Portd.3 , Db6 = Portd.4 , Db7 = Portd.6 , E = Portd.1 , Rs = Portd.0
    
    S1 Alias Pinb.1
    S2 Alias Pinb.2
    
    Config S1 = Input
    Config S2 = Input
    
    Set S1
    Set S2
    Cls
    Do
    locate 1 , 1
    If S1 = 0 Then
    Cls
    Lcd "hello"
    End If
    If S2 = 0 Then
    Cls
    Lcd "drugo napis"
    End If
    loop
    End
    
  • #10 5994414
    Konto nie istnieje
    Poziom 1  
  • #11 5994439
    Konto nie istnieje
    Poziom 1  
  • #12 5994462
    Konto nie istnieje
    Poziom 1  
  • #13 5994527
    krzysiekdioda
    Poziom 13  
    hehe, chyba zrobię ten z pilotem
    ale tym razem termotransfer.
    Kody na 100% działające itd.

    Ale dzięki.
  • #14 5995092
    wader_669
    Poziom 28  
    
    S1 Alias Pinb.1
    S2 Alias Pinb.2
    
    Set S1
    Set S2 
    

    to napewno nie bedzie dzialac. Rozumiem ze chciales podlaczyc rezystory podciagajace.
    robi sie to poleceniem set portb.1

    poczytaj helpa i nie zakladaj glupich tematow na elektrodzie
  • #15 5995273
    Konto nie istnieje
    Poziom 1  
  • #16 5995526
    wader_669
    Poziom 28  
    jak sie nie podciaga wewnetrznego zasilania powazne zaklucenia sa
REKLAMA