Professional Documents
Culture Documents
S MCH NGUYN L
S MCH IN
End If
End Sub
Private Sub Command3_Click()
'hien thi theo thang ngay
If Timer4.Enabled = False Then
Timer4.Enabled = True
Timer2.Enabled = False
Timer3.Enabled = False
Timer5.Enabled = False
End If
End Sub
Private Sub Command4_Click()
'hien thi theo nam thang
If Timer5.Enabled = False Then
Timer5.Enabled = True
Timer3.Enabled = False
Timer4.Enabled = False
Timer2.Enabled = False
End If
End Sub
Private Sub Command5_Click()
Out32 &H37A, &H4
Out32 &H378, &H0
End Sub
Private Sub Command6_Click()
Form2.Show
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Format(Now, "hh:nn:ss")
Label2.Caption = Format(Now, "dd/mm/yyyy")
End Sub
Private Sub Timer2_Timer()
Dim phut As Integer
Dim giay As Integer
phut = Format(Now, "nn")
giay = Format(Now, "ss")
Call truyen(Val(phut), Val(giay))
End Sub
Private Sub Timer3_Timer()
Dim gio As Integer
Dim phut As Integer
phut = Format(Now, "nn")
'mo led 2
'mo led 3
'mo led 4
Next
End Sub
Sub delay(y)
Dim x As Long
For x = 0 To y
x=x+1
Next
End Sub
7) Hnh nh sn phm
10
11
8) nh gi v sn phm.
u im: Mch c thit k s dng cng LPT giao tip vi my
tnh v hin th thi gian trn led 7 thanh. Mch c thit k sao cho
linh kin t v p ng c yu cu v cht lng, gi thnh cng nh
cng nng cn thit.
Nhc im: Cng LPT l kt ni truyn thng kiu c, hin c rt t
my tnh c cng ny, nn vic ph bin trong cc thit k ng dng lin
quan n cng LPT u hn ch v ch mang tnh cht hc hi v hiu l
ghp ni
Hng ca n l hng ti l bi ton c bn pht trin sang cc
dng giao tip khc cng nh hin th trn cc thit b khc nhau, mch
ny s d dng kt ni c vi mch ghp ni ni tip, n gin bng
vic thit k vi 1 u l cng LPT ci.
12
USB
MY TNH
VI IU KHIN
LPT
CI
LPT C
MCH
LED 7
THANH
CO
M
Dowload:
Chuong trinh
Mach nguyen ly + mach in
13