'**************************************************************** '* Name : ROTOR_KLOK.BAS * '* Author : Ph.E. Oosterbaan * '* Notice : Copyright (c) 2012 PA2EON * '* : All Rights Reserved * '* Date : 9/29/2012 * '* Version : 1.2 * '* Notes : Last change 01-10 * '**************************************************************** Device 16F84 ;Gebruik een 16F84 type = werkt met 5.x 10 Mhz Xtal! DECLARE LCD_TYPE 0 DECLARE LCD_INTERFACE 4 DECLARE LCD_LINES 2 DECLARE LCD_DTPIN PORTB.4 DECLARE LCD_ENPIN PORTB.3 DECLARE LCD_RSPIN PORTB.2 DELAYMS 500 Dim teller As Byte Dim BCD As Dword teller = ERead 0 Print AT 1,1, "Rotor interface" Print AT 2,1, "<-> ", Dec teller *10, " graden" startstop: If PORTA.0=1 And PORTA.1=1 Then GoTo startstop If PORTA.0=1 Then If Not teller = 36 Then teller = teller + 1 GoTo getal End If End If If PORTA.1=1 Then If Not teller = 0 Then teller = teller - 1 GoTo getal End If End If GoTo startstop End getal: Cls Print AT 1,1,"Rotor interface" If PORTA.0=1 Then High PORTA.2 Print AT 2,1, "<- ", Dec teller *10, " graden" DELAYMS 2250 End If If PORTA.1=1 Then High PORTA.3 Print AT 2,1, "-> ", Dec teller *10, " graden" DELAYMS 2250 End If Low PORTA.2 Low PORTA.3 Print AT 2,1, "<-> ", Dec teller *10, " graden" EWrite 0,[teller] GoTo startstop End