Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 13, 2024, 06:34:45 06:34


Login with username, password and session length


Pages: [1]
Print
Author Topic: Help me translate this code into english  (Read 4339 times)
0 Members and 1 Guest are viewing this topic.
slapdash41
Newbie
*
Offline Offline

Posts: 23

Thank You
-Given: 17
-Receive: 3


« on: September 24, 2008, 09:14:50 09:14 »

hi there,

Can someone here do me a favor to translate this PICBasic code which is from Turkish(i think) to English. Only translate the comment and LCD output. Already used automated translator software but can't understand it. Need this urgent  Wink.. Here is the source

http://www.projearsivi.net/pic-projeleri/16f628-yildiz-ucgen-kumanda-yildiz-ucgen-yol-verme.html


16F628 YILDIZ-ÜÇGEN KUMANDA (Yıldız Üçgen Yol Verme)

PICBasic Code
Code:
'****************************************************************
'*  Name    : YILDI ÜÇGEN RÖLE.BAS                              *
'*  Author  : [email protected]                                *
'*  Notice  : Copyright (c) 2006 [select VIEW...EDITOR OPTIONS] *
'*          : All Rights Reserved                               *
'*  Date    : 08.07.2006                                        *
'*  Version : 1.0                                               *
'*  Notes   :                                                   *
'*          :                                                   *
'****************************************************************
Define LCD_DREG PORTB      'LCD DATA TANIM AYARLARI
Define LCD_DBIT 4          'LCD TANIM AYARLARI
Define LCD_RSREG PORTB     'LCD RS TANIM AYARLARI
Define LCD_RSBIT 2         'LCD TANIM AYARLARI
Define LCD_EREG PORTB      'LCD RE TANIM AYARLARI
Define LCD_EBIT 3          'LCD TANIM AYARLARI
DEFINE LCD_LINES 2         'LCD SATIR SAYISI
'*********************DEÐÝÞKEN TANIMLARI*************************
SAYAC VAR BYTE             'ZAMAN SAYACI 1 SN.'LÝK
SANIYE VAR BYTE            'SANÝYE SAYACI
KUMANDA VAR BIT
UCGENEGEC1 VAR BIT
B1 VAR BYTE
B0 VAR BYTE
B2 VAR BYTE
B3 VAR BYTE
B4 VAR BYTE
B5 VAR BYTE
'*******************ZAMAN SAYACI ÝNTERRUPT AYARLARI**************
ON INTERRUPT GoTo KESME   'kesme oluþursa KESME adlý etikete git.
OPTION_REG=%10000101      'Pull up dirençleri ÝPTAL- Bölme oraný 1/64.
INTCON=%10100000          'Kesmeler aktif ve TMR0 kesmesi aktif
TMR0=0
CMCON=7
clear                   'BÜTÜN DEÐÝÞKENLERÝ SIFIRLA
LCDOUT $FE,1            'LCD'YÝ TEMÝZLE
PAUSE 500               'LCD ÝÇÝN BEKLEME ZAMANI
'TRISA=%
'TRISB=0                  'PORTB ÇIKIÞ
'*****************AÇILIÞ ÝÇÝN KAYAN YAZI**************************
LOOP:
LCDOut $fe,2
For B2= 0 TO 15
LookUp B0, ["               OTUGEN OTOMASYON                #"], B1
IF B1 = "#" Then GoTo reset
LCDOut B1
B0 = B0 + 1
Next B2
pause 125        'KARAKTER BEKLEME ZAMANI
B0 = B0 - 15
GoTo loop
RESET:
LCDOUT $FE,1

'*****************************************************************
onprogram:
  LCDOUT $FE,$80
  LCDOUT "  YILDIZ UCGEN    "
  LCDOUT $FE,$C0
  LCDOUT " KUMANDA ROLESI   "
  PAUSE 500
  LCDOUT $FE,1
ANAPROGRAM: 
  IF PORTA.7=1 THEN
   GOTO ARIZA
    ELSE
     GOTO NORMAL
      ENDIF
ARIZA:
 LCDOUT $FE,$80,"MOTORUN TERMIK"
 LCDOUT $FE,$C0,"ROLESI  ATTI  "
LOW PORTB.0:LOW PORTA.3:LOW PORTB.1
KUMANDA=0:SAYAC=0:SANIYE=0
 GOTO ANAPROGRAM 
NORMAL: 
  LCDOUT $FE,$80,"MOTOR:"
  IF PORTA.3=0 THEN
   GOTO mesajstop
    else
     goto start
      endif
mesajstop:
 lcdout $fe,$86,"STOP           "
 LCDOUT $FE,$C0,"               "   
 GOTO KONTROL
 START:
 lcdout $fe,$86,"START          " 
 GOTO KONTROL
KONTROL:     
   IF (PORTA.1=1) OR (PORTA.7=1) THEN GOTO MOTORDUR
   IF (PORTA.1=0)AND(PORTA.7=0)AND(PORTA.0=1)OR(KUMANDA=1) THEN
    GOTO MOTORYILDIZ
     ELSE
      GOTO MOTORDUR
       ENDIF
MOTORYILDIZ:
KUMANDA=1
IF SANIYE=15 THEN
  UCGENEGEC1=1     
    ENDIF
IF UCGENEGEC1=1 THEN GOTO UCGEN
LOW PORTB.0:HIGH PORTA.3:HIGH PORTB.1
LCDOUT $FE,$C0,"CALISMA YILDIZ"   
GOTO PROGRAMDEVAM
UCGEN:
HIGH PORTB.0:HIGH PORTA.3:LOW PORTB.1
LCDOUT $FE,$C0,"CALISMA UCGEN "
GOTO ANAPROGRAM
MOTORDUR:
LOW PORTB.0:LOW PORTA.3:LOW PORTB.1
KUMANDA=0:SAYAC=0:SANIYE=0
PROGRAMDEVAM:
GOTO ANAPROGRAM     


'********************ZAMAN RÖLESÝ PARAMETRELERÝ**************************
DISABLE
KESME:
    IF KUMANDA=1 THEN
        GOTO SAY   
         ELSE
          GOTO DEVAM
            ENDIF
SAY:           
        SAYAC=SAYAC+1      'kesme sayacý  1 sn= 61(sayac) x 256 (Tmr0) x 64 (bölme)
         IF SAYAC=61 then   '61 adet kesme olunca 1 sn. süre geçiyor.(999424 us)
            SAYAC=0           'sayaç sýfýrlanýyor
              SANIYE=SANIYE+1
'             GOSUB ZAMAN_OKU
'         if Y<5 then HIGH porta.3
       ENDIF
DEVAM:   
        INTCON.2=0  'TMR0 Kesme bayraðý sýfýrlanýyor
         RESUME
         ENABLE
« Last Edit: September 24, 2008, 09:17:10 09:17 by slapdash41 » Logged
MAXPAYNE
Hero Member
*****
Offline Offline

Posts: 699

Thank You
-Given: 497
-Receive: 364


It's a little funny......


« Reply #1 on: September 24, 2008, 02:02:18 14:02 »

Use babylon for translating turkish to english..........
Logged

Whats the Craziest Project u have done lately...?
MCan
Junior Member
**
Offline Offline

Posts: 72

Thank You
-Given: 15
-Receive: 119


end of file


WWW
« Reply #2 on: September 24, 2008, 02:20:57 14:20 »

Code:
'****************************************************************
'*  Name    : YILDI ÜÇGEN RÖLE.BAS                              *
'*  Author  : [email protected]                                *
'*  Notice  : Copyright (c) 2006 [select VIEW...EDITOR OPTIONS] *
'*          : All Rights Reserved                               *
'*  Date    : 08.07.2006                                        *
'*  Version : 1.0                                               *
'*  Notes   :                                                   *
'*          :                                                   *
'****************************************************************
Define LCD_DREG PORTB      'LCD DATA TANIM AYARLARI *** look for this picbasic's help
Define LCD_DBIT 4          'LCD TANIM AYARLARI
Define LCD_RSREG PORTB     'LCD RS TANIM AYARLARI
Define LCD_RSBIT 2         'LCD TANIM AYARLARI
Define LCD_EREG PORTB      'LCD RE TANIM AYARLARI
Define LCD_EBIT 3          'LCD TANIM AYARLARI
DEFINE LCD_LINES 2         'LCD SATIR SAYISI
'*********************variable defines*************************
SAYAC VAR BYTE             'time counter for 1 sec
SANIYE VAR BYTE            'second counter
KUMANDA VAR BIT
UCGENEGEC1 VAR BIT
B1 VAR BYTE
B0 VAR BYTE
B2 VAR BYTE
B3 VAR BYTE
B4 VAR BYTE
B5 VAR BYTE
'*******************time counter's interrupt options**************
ON INTERRUPT GoTo KESME   'if interrupt occure goto KESME.
OPTION_REG=%10000101      'Pull up resistors canceled- division ratio 1/64.
INTCON=%10100000          'interrupt enable and tmr0 enable
TMR0=0
CMCON=7
clear                   'clear all variables
LCDOUT $FE,1            'clear lcd
PAUSE 500               'pause for lcd init
'TRISA=%
'TRISB=0                  'PORTB is output
'*****************slide text for splash screen**************************
LOOP:
LCDOut $fe,2
For B2= 0 TO 15
LookUp B0, ["               OTUGEN OTOMASYON                #"], B1
IF B1 = "#" Then GoTo reset
LCDOut B1
B0 = B0 + 1
Next B2
pause 125        'character wait time
B0 = B0 - 15
GoTo loop
RESET:
LCDOUT $FE,1

'*****************************************************************
onprogram:
  LCDOUT $FE,$80
  LCDOUT "  YILDIZ UCGEN    "
  LCDOUT $FE,$C0
  LCDOUT " KUMANDA ROLESI   "
  PAUSE 500
  LCDOUT $FE,1
ANAPROGRAM: 
  IF PORTA.7=1 THEN
   GOTO ARIZA
    ELSE
     GOTO NORMAL
      ENDIF
ARIZA:
 LCDOUT $FE,$80,"MOTORUN TERMIK"
 LCDOUT $FE,$C0,"ROLESI  ATTI  "
LOW PORTB.0:LOW PORTA.3:LOW PORTB.1
KUMANDA=0:SAYAC=0:SANIYE=0
 GOTO ANAPROGRAM 
NORMAL: 
  LCDOUT $FE,$80,"MOTOR:"
  IF PORTA.3=0 THEN
   GOTO mesajstop
    else
     goto start
      endif
mesajstop:
 lcdout $fe,$86,"STOP           "
 LCDOUT $FE,$C0,"               "   
 GOTO KONTROL
 START:
 lcdout $fe,$86,"START          " 
 GOTO KONTROL
KONTROL:     
   IF (PORTA.1=1) OR (PORTA.7=1) THEN GOTO MOTORDUR
   IF (PORTA.1=0)AND(PORTA.7=0)AND(PORTA.0=1)OR(KUMANDA=1) THEN
    GOTO MOTORYILDIZ
     ELSE
      GOTO MOTORDUR
       ENDIF
MOTORYILDIZ:
KUMANDA=1
IF SANIYE=15 THEN
  UCGENEGEC1=1     
    ENDIF
IF UCGENEGEC1=1 THEN GOTO UCGEN
LOW PORTB.0:HIGH PORTA.3:HIGH PORTB.1
LCDOUT $FE,$C0,"CALISMA YILDIZ"   
GOTO PROGRAMDEVAM
UCGEN:
HIGH PORTB.0:HIGH PORTA.3:LOW PORTB.1
LCDOUT $FE,$C0,"CALISMA UCGEN "
GOTO ANAPROGRAM
MOTORDUR:
LOW PORTB.0:LOW PORTA.3:LOW PORTB.1
KUMANDA=0:SAYAC=0:SANIYE=0
PROGRAMDEVAM:
GOTO ANAPROGRAM     


'********************time relay parameters**************************
DISABLE
KESME:
    IF KUMANDA=1 THEN
        GOTO SAY   
         ELSE
          GOTO DEVAM
            ENDIF
SAY:           
        SAYAC=SAYAC+1      'interrupt counter  1 sec= 61(sayac) x 256 (Tmr0) x 64 (division)
         IF SAYAC=61 then   'if 61 times interrupts occured  the time becomes 1 sec.(999424 us)
            SAYAC=0           'sayac cleared
              SANIYE=SANIYE+1
'             GOSUB ZAMAN_OKU
'         if Y<5 then HIGH porta.3
       ENDIF
DEVAM:   
        INTCON.2=0  'TMR0 flag cleared
         RESUME
         ENABLE

sayac = counter
saniye = second
kumanda = command
UCGENEGEC1 = pass to triangle
OTUGEN OTOMASYON = company name
YILDIZ UCGEN = star-triangle
KUMANDA ROLESI = command relay
ARIZA = failure
MOTORUN TERMIK ROLESI  ATTI = the termic relay has been open
ANAPROGRAM = main program
mesajstop = stop message
KONTROL = control
PROGRAMDEVAM = continue program
DEVAM = continue
ZAMAN_OKU = read time
« Last Edit: September 24, 2008, 02:30:57 14:30 by kireytir » Logged

aquila non captat muscas.
slapdash41
Newbie
*
Offline Offline

Posts: 23

Thank You
-Given: 17
-Receive: 3


« Reply #3 on: September 24, 2008, 03:04:42 15:04 »

Code:
'****************************************************************
'*  Name    : YILDI ÜÇGEN RÖLE.BAS                              *
'*  Author  : [email protected]                                *
'*  Notice  : Copyright (c) 2006 [select VIEW...EDITOR OPTIONS] *
'*          : All Rights Reserved                               *
'*  Date    : 08.07.2006                                        *
'*  Version : 1.0                                               *
'*  Notes   :                                                   *
'*          :                                                   *
'****************************************************************
Define LCD_DREG PORTB      'LCD DATA TANIM AYARLARI *** look for this picbasic's help
Define LCD_DBIT 4          'LCD TANIM AYARLARI
Define LCD_RSREG PORTB     'LCD RS TANIM AYARLARI
Define LCD_RSBIT 2         'LCD TANIM AYARLARI
Define LCD_EREG PORTB      'LCD RE TANIM AYARLARI
Define LCD_EBIT 3          'LCD TANIM AYARLARI
DEFINE LCD_LINES 2         'LCD SATIR SAYISI
'*********************variable defines*************************
SAYAC VAR BYTE             'time counter for 1 sec
SANIYE VAR BYTE            'second counter
KUMANDA VAR BIT
UCGENEGEC1 VAR BIT
B1 VAR BYTE
B0 VAR BYTE
B2 VAR BYTE
B3 VAR BYTE
B4 VAR BYTE
B5 VAR BYTE
'*******************time counter's interrupt options**************
ON INTERRUPT GoTo KESME   'if interrupt occure goto KESME.
OPTION_REG=%10000101      'Pull up resistors canceled- division ratio 1/64.
INTCON=%10100000          'interrupt enable and tmr0 enable
TMR0=0
CMCON=7
clear                   'clear all variables
LCDOUT $FE,1            'clear lcd
PAUSE 500               'pause for lcd init
'TRISA=%
'TRISB=0                  'PORTB is output
'*****************slide text for splash screen**************************
LOOP:
LCDOut $fe,2
For B2= 0 TO 15
LookUp B0, ["               OTUGEN OTOMASYON                #"], B1
IF B1 = "#" Then GoTo reset
LCDOut B1
B0 = B0 + 1
Next B2
pause 125        'character wait time
B0 = B0 - 15
GoTo loop
RESET:
LCDOUT $FE,1

'*****************************************************************
onprogram:
  LCDOUT $FE,$80
  LCDOUT "  YILDIZ UCGEN    "
  LCDOUT $FE,$C0
  LCDOUT " KUMANDA ROLESI   "
  PAUSE 500
  LCDOUT $FE,1
ANAPROGRAM: 
  IF PORTA.7=1 THEN
   GOTO ARIZA
    ELSE
     GOTO NORMAL
      ENDIF
ARIZA:
 LCDOUT $FE,$80,"MOTORUN TERMIK"
 LCDOUT $FE,$C0,"ROLESI  ATTI  "
LOW PORTB.0:LOW PORTA.3:LOW PORTB.1
KUMANDA=0:SAYAC=0:SANIYE=0
 GOTO ANAPROGRAM 
NORMAL: 
  LCDOUT $FE,$80,"MOTOR:"
  IF PORTA.3=0 THEN
   GOTO mesajstop
    else
     goto start
      endif
mesajstop:
 lcdout $fe,$86,"STOP           "
 LCDOUT $FE,$C0,"               "   
 GOTO KONTROL
 START:
 lcdout $fe,$86,"START          " 
 GOTO KONTROL
KONTROL:     
   IF (PORTA.1=1) OR (PORTA.7=1) THEN GOTO MOTORDUR
   IF (PORTA.1=0)AND(PORTA.7=0)AND(PORTA.0=1)OR(KUMANDA=1) THEN
    GOTO MOTORYILDIZ
     ELSE
      GOTO MOTORDUR
       ENDIF
MOTORYILDIZ:
KUMANDA=1
IF SANIYE=15 THEN
  UCGENEGEC1=1     
    ENDIF
IF UCGENEGEC1=1 THEN GOTO UCGEN
LOW PORTB.0:HIGH PORTA.3:HIGH PORTB.1
LCDOUT $FE,$C0,"CALISMA YILDIZ"   
GOTO PROGRAMDEVAM
UCGEN:
HIGH PORTB.0:HIGH PORTA.3:LOW PORTB.1
LCDOUT $FE,$C0,"CALISMA UCGEN "
GOTO ANAPROGRAM
MOTORDUR:
LOW PORTB.0:LOW PORTA.3:LOW PORTB.1
KUMANDA=0:SAYAC=0:SANIYE=0
PROGRAMDEVAM:
GOTO ANAPROGRAM     


'********************time relay parameters**************************
DISABLE
KESME:
    IF KUMANDA=1 THEN
        GOTO SAY   
         ELSE
          GOTO DEVAM
            ENDIF
SAY:           
        SAYAC=SAYAC+1      'interrupt counter  1 sec= 61(sayac) x 256 (Tmr0) x 64 (division)
         IF SAYAC=61 then   'if 61 times interrupts occured  the time becomes 1 sec.(999424 us)
            SAYAC=0           'sayac cleared
              SANIYE=SANIYE+1
'             GOSUB ZAMAN_OKU
'         if Y<5 then HIGH porta.3
       ENDIF
DEVAM:   
        INTCON.2=0  'TMR0 flag cleared
         RESUME
         ENABLE

sayac = counter
saniye = second
kumanda = command
UCGENEGEC1 = pass to triangle
OTUGEN OTOMASYON = company name
YILDIZ UCGEN = star-triangle
KUMANDA ROLESI = command relay
ARIZA = failure
MOTORUN TERMIK ROLESI  ATTI = the termic relay has been open
ANAPROGRAM = main program
mesajstop = stop message
KONTROL = control
PROGRAMDEVAM = continue program
DEVAM = continue
ZAMAN_OKU = read time

thanks mate.. It's really help me a lot... Cheesy
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC