-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathledExample.pbp
More file actions
82 lines (62 loc) · 1.79 KB
/
ledExample.pbp
File metadata and controls
82 lines (62 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
'****************************************************************
'* Name : led *
'* Author : MRKANET *
'* Notice : Copyright (c) 2019 Mrkaan.net *
'* : All Rights Reserved *
'* Date : 3/8/2019 *
'* Version : 1.0 *
'* Notes : this is for everyone *
'* : *
'****************************************************************
define LOADER_USED 1
ADCON1=7 'tüm analog pinleri dijitale çevirir (A ve E portlarý)
TRISA=%000000 'ÇIKIÞLAR 0 GÝRÝÞLER 1 OLARAK TANIMLANDI.GÝRÝÞ PÝNÝ ÞUANDA YOK
TRISB=%00000000 '$00 HEXADEC VEYA 0 DEC
PortA=0
PortB=0
SYMBOL ledonoff=PortA.0
i var byte
ledonoff = 1
i=1
'basla:
' PortB.0=1 : PAUse 1000
' PortB.0=0 : PAUse 1000
'GOTO basla
'basla:
' PortB=%00000001 : PaUSE 250
' PortB=%00000010 : PaUSE 250
' PortB=%00000100 : PaUSE 250
' PortB=%00001000 : PaUSE 250
' PortB=%00010000 : PaUSE 250
' PortB=%00100000 : PaUSE 250
' PortB=%01000000 : PaUSE 250
' PortB=%10000000 : PaUSE 250
'GOTO basla:
'devam:
' portb=i
' pAuse 250
' i=i*2
' IF i=128 THEN i=1:portb=i:PaUSE 250
'GOTO devam
'kaydir:
' for i=0 to 7
' portb = 2^i
' pause 250
' next i
'goto kaydir
ikili:
portb = 1 :pause 250
gosub kaydirma
portb = 128:pause 250
gosub geriye
goto ikili
kaydirma:
pAuse 250
portb = portb << 1
IF portb=128 THEN return
goto kaydirma
geriye:
pause 250
portb = portb >> 1
if portb = 0 then return
goto geriye