-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAtmega16 - 1.bas
More file actions
59 lines (40 loc) · 1018 Bytes
/
Copy pathAtmega16 - 1.bas
File metadata and controls
59 lines (40 loc) · 1018 Bytes
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
'======================================================================='
' Title: Software Uart Communication Between Two MCU
' Last Updated : 01.2022
' Author : A.Hossein.Khalilian
' Program code : BASCOM-AVR 2.0.8.5
' Hardware req. : Atmega16 + Atmega16
'======================================================================='
$regfile = "m16def.dat"
$crystal = 1000000
Config Porta.1 = Input
Config Portd.3 = Output
Dim A As Byte
Dim B As Byte
Dim S As String * 12
Open "comd.3:2400,8,N,1,Inverted" For Output As #1
'-----------------------------------------------------------
Main:
do
B = Pina.1
If B = 0 Then Goto Main
Print #1 , "Micro"
Wait 1
Print #1 , "Controler"
Wait 1
S = "AVR" '
Print #1 , S
Wait 1
S = "Start"
Print #1 , S
For A = 0 To 15
Print #1 , A
Wait 1
Next A
S = "Stop"
Print #1 , S
Close #1
Stop
Loop
end
'-----------------------------------------------------------