标题: bascom 74hc595仿真 [打印本页] 作者: 赵彬 时间: 2013-2-28 12:08 标题: bascom 74hc595仿真 $regfile = "m16def.dat" '
$crystal = 8000000 '8M晶振频率
$hwstack = 32 '设置堆栈大小
$swstack = 10
$framesize = 40
Dim I As Byte
Dim A(10) As Byte
Ddrc.4 = 1
Ddrc.3 = 1
Ddrc.6 = 1
Dain Alias Portc.4
Ce Alias Portc.6
Sck Alias Portc.3
Ce = 1
'Config Spi = Hard , Interrupt = Off , Data Order = Msb , Master = Yes , Polarity = Low , Phase = 0 , Clockrate = 4 , Noss = 0
'Spiinit
Dim S As Byte
Restore Daima
For I = 1 To 10
Read A(i)
Next
Do
nop
'Spiout A(i) , 1
Shiftout Dain , Sck , A(i) , 1
Ce = 0
Waitms 150
Ce = 1
Incr I
If I > 10 Then
I = 1
End If
'Ce = 1
Loop