'**************************************************************** '* Name : 12F675_tonex.BAS * '* Author : [select VIEW...EDITOR OPTIONS] * '* Notice : Copyright (c) 2007 [select VIEW...EDITOR OPTIONS] * '* : All Rights Reserved * '* Date : 09.04.2007 * '* Version : 1.0 * '* Notes : * '* : * '**************************************************************** 'Define OSCCAL_1K 1 DEFINE LOADER_USED 1 DEFINE OSC 20 eeprom 0,[7,3] b0 VAR BYTE b1 VAR BYTE b2 VAR BYTE b3 VAR BYTE b4 VAR BYTE b5 VAR BYTE b6 VAR BYTE spkr VAR gpio.2 tone VAR BYTE '@ DEVICE pic12F675, INTRC_OSC_NOCLKOUT,mclr_off @ DEVICE pic12F675,HS_OSC,mclr_off 'option_reg.7=0 'pullups trisio=1001 gpio =1001 ansel=0 'digital e çevrildi 'gpio.1 röle (out) 'gpio.2 tonex (out) 'gpio.0 detektör (in) CMCON = 7 '******************************************************************** '***************************************ANA PROGRAM*************** loop: low gpio.1 low gpio.2 IF gpio.0=0 Then GoTo ring1a Else EndIF '*********************** read 0,b3 read 1,b4 read 2,b5 read 3,b6 GoTo loop '******************************************* '******************************************* '******************************************* sonla: DTMFOut spkr,[tone] Return '******************************************* ring1a: b1=0-1 low gpio.1 pause 2000 ring1: high gpio.1 b1=b1+1 IF b1>=3 Then b1=0 EndIF LookUp b1,[6,4,9],b0 tone=b0 b2=tone Pause 400 GoSub sonla IF b1=2 Then pause 10000 '3 kez ring atar. goto loop Else EndIF goto ring1 '************************************************ end |
6 Ekim 2013 Pazar
Posted by Adsız on 06:31
with No comments so far
Categories: Elektronik Devreler
Kaydol:
Kayıt Yorumları (Atom)
0 yorum:
Yorum Gönder