Haberler:

Forum kuralları güncellendi LÜTFEN  okuyunuz:  https://bit.ly/2IjR3ME

Ana Menü

12f675 ile buton yapamıyorum

Başlatan mech, 12 Kasım 2006, 12:32:10

OG

Atlamışız, ANSEL (analog-digital select) olmalı.

@   device  pic12F675, intrc_osc_noclkout, wdt_on, pwrt_on, mclr_off, protect_off

TRISIO=%00000100
ANSEL = 0 
WPU = %00000100 
OPTION_REG=%00000000

Basla:
    if GPIO.2=0 then
        GPIO.0=1
        else
        GPIO.0=0
    endif
goto Basla
 
END


veya

@   device  pic12F675, intrc_osc_noclkout, wdt_on, pwrt_on, mclr_off, protect_off

TRISIO=%00000100
ANSEL = 0 
WPU = %00000100 
OPTION_REG=%00000000

giris var GPIO.2
cikis var GPIO.0


Basla:
    if giris=0 then
        cikis=1
        else
        cikis=0
    endif
goto Basla
 
END


Bu kod üzerinden çalışabilirsin.
FORUMU İLGİLENDİREN KONULARA ÖM İLE CEVAP VERİLMEZ.

mech

verdiğin bilgiler için çok sağol dostum
Bilginin Efendisi Olmak İçin Çalışmanın Kölesi Olmak Şarttır