'TX Verici Modüllü Devre için Bas Dosyası '**************************************************************** '* Name : RF_675_TX.BAS * '* Author :Şinasi Yavuz * '* Notice : Copyright (c) 2010 [select VIEW...EDITOR OPTIONS] * '* : All Rights Reserved * '* Date : 07.12.2010 * '* Version : 1.0 * '* Notes : * '* : * 'GPIO.0 -- ADC for battery monitoring 'GPIO.1-- Switches TX off and on 'GPIO.2 -- TX data line 'GPIO.3 -- RX data line (.3 is input only) 'GPIO.4 -- SHT11 'GPIO.5 -- SHT11 'IF but=0 THEN 'TOGGLE LED 'WHILE but=0 'WEND 'ENDIF 'pause 100 '**************************************************************** include "modedefs.bas" '@ DEVICE pic12F675,xt_OSC,mclr_off @ DEVICE pic12F675, INTRC_OSC_NOCLKOUT,mclr_off DEFINE LOADER_USED 1 define osccal_1k 1 'define osc 4 '@ device pic12f675, intrc_osc_noclkout '@ device pic12f675,wdt_off '@ device pic12f675,pwrt_on '@ device pic12f675,mclr_off '@ device pic12f675,protect_on TRISIO = %011111 GPIO = %011111 But_1 var gpio.0 But_2 var gpio.1 But_3 var gpio.2 But_4 var gpio.3 But_5 var gpio.4 'GPIO=0 'led var gpio.1 CMCON=7 ANSEL=0 cikis var gpio.5 VERICI var BYTE : VERICI=0 ' Yeni Kasım 2010 calib ilk $3438 , son OSCCAL=$3473 OSCCAL=$3452 ' Yeni Kasım 2010 calib osccal=$3445 OPTION_REG=000110 'OPTION_REG.5 = 0 'OPTION_REG = $7f ' WPU=%11111001 ' Enable pull-ups on GP0, GP3, GP4, GP5 '****************************************basla************************ '******************************* BASLA: 'if gpio.5=0 or gpio.3=0 or gpio.0=0 or gpio.4=0 then 'high led 'pause 10 'else 'low led 'endif if but_1=0 then verici=10 gosub gonder while but_1=0 wend endif if but_2=0 then ' mclr verici=20 gosub gonder while but_2=0 wend endif '2. buton if but_3=0 then verici=30 gosub gonder while but_3=0 wend endif if but_4=0 then verici=40 gosub gonder while but_4=0 wend endif if but_5=0 then verici=50 gosub gonder while but_5=0 wend endif GOTO BASLA GONDER: serout2 cikis,396,[REP$AA\5,REP$00\5,REP$FF\5] serout2 cikis,396,[REP$AA\5,REP$00\5,REP$FF\5] serout2 cikis,396,["S","I","N",VERICI] serout2 cikis,396,["S","I","N",VERICI] serout2 cikis,396,["S","I","N",VERICI] serout2 cikis,396,["S","I","N",VERICI] SEROUT2 cikis,396,["S","I","N",VERICI] serout2 cikis,396,["S","I","N",VERICI] serout2 cikis,396,["S","I","N",VERICI] serout2 cikis,396,["S","I","N",VERICI] serout2 cikis,396,["S","I","N",VERICI] SEROUT2 cikis,396,["S","I","N",VERICI] SEROUT2 cikis,396,["S","I","N",VERICI] serout2 cikis,396,["S","I","N",VERICI] serout2 cikis,396,["S","I","N",VERICI] serout2 cikis,396,["S","I","N",VERICI] serout2 cikis,396,["S","I","N",VERICI] SEROUT2 cikis,396,["S","I","N",VERICI] PAUSE 10 return END |
6 Ekim 2013 Pazar
Posted by Adsız on 07:04
with No comments so far
Kaydol:
Kayıt Yorumları (Atom)
0 yorum:
Yorum Gönder