'///////////////////////////////////////////////////////////////////////////////
'^^^^^^^^^^^^^^^^^^^^^^^^^^in the name of god^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'///////////////////////////////////////////////////////////////////////////////
Res Alias Portb.6 : Config Pinb.6 = Output 'Connected to Pin No.1 Of MMC (CS)
'Vcc Alias Portd.0 : Config Pind.0 = Output 'Connected to Pin No.2 Of MMC (DataIn)
Clk Alias Portb.7 : Config Pinb.7 = Output 'Connected to Pin No.5 Of MMC (Clock)
Io Alias Pinb.0 : Config Pinb.0 = Input
Sw Alias Pind.3 : Config Pind.3 = Input
Led Alias Portd.2
Rel1 Alias Portc.2
Rel2 Alias Portc.3
Sww Alias Pind.6 : Config Pind.6 = Input
'-------------------------------------------------------------------------------
Declare Sub Haan
'--------------------------variable---------------------------------------------
Dim Tim As Byte
Dim N As Bit
Dim X As Integer
Dim Inn As Long
Dim Hafeze(512) As Eram Byte '32*kard(16 byte)
Dim Om As Long
Dim Omid As Byte
Dim Hafez(32) As Byte
Dim Shom As Byte
Dim Xx As Byte
Dim Nn As Byte
Dim Bb As Byte
Dim Mm As Byte
Dim Hafeze2 As Byte
Set Io ' IO high for input
Reset Res ' Reset low
Reset Clk
Waitms 350
Print "-------------start"
Set Res ' Reset High
Set Clk ' CLK High
nop
nop
Reset Clk ' CLK Low
Reset Res ' Reset Low
nop
nop
Waitms 15
For Tim = 0 To 255
Reset Clk
nop
N = Io
Lcd N ; ",";
X = Tim Mod 7
If X = 0 Then
میشه در مورد برنامه کمی توضیح بدین؟
من الان اینو بستم ولی وقتی پایه ریست کارتو وصل میکنم کلا صفر نشون میده!!!ولی اگه از مدار حذف کنم یه چیزایی نشون میده :angry: :angry: :angry:
Res Alias Portd.4 : Config Pind.4 = Output 'Connected to Pin No.1 Of MMC (CS)
Vcc Alias Portd.0 : Config Pind.0 = Output 'Connected to Pin No.2 Of MMC (DataIn)
Clk Alias Portd.2 : Config Pind.2 = Output 'Connected to Pin No.5 Of MMC (Clock)
Io Alias Pind.3 : Config Pind.3 = Input
'--------------------------variable--------------------------------------------
Dim Tim As Byte
Dim N As Bit
Dim X As Integer
'------------------------------------------only read pass----------------------
Restart:
Set Io ' IO high for input
Reset Res ' Reset low
Reset Clk
Set Vcc
Waitms 350
Print "-------------start"
Set Res ' Reset High
Set Clk ' CLK High
nop
nop
Reset Clk ' CLK Low
Reset Res ' Reset Low
nop
nop
Waitms 15
For Tim = 0 To 255
Reset Clk
nop
N = Io
Print N ; ",";
X = Tim Mod 16
If X = 0 Then Print ""
Set Clk
nop
Next
Print "------------Finish"
End 'end program
'-------------------------------note--------------------------------
'------------------------------------------------------------------------------
'---------************************************************** ***----------------
'-------------*******************************************----------------------
'paye io bayad pullup bala keshandeh shavad ba moghavemate 1 kiloo be vcc
'Paye Vcc Bayad Be Moghavemat 1 Kiloo Vasl Shavad
'------------------------------------------------------------------------------
'---------************************************************** ***----------------
'-------------*******************************************----------------------
'-------------------*********************************--------------------------
'-----------------------*************************------------------------------
' BCCARD.BAS
' This AN shows how to use the BasicCard from Zeitcontrol
Res Alias Portd.4 : Config Pind.4 = Output 'Connected to Pin No.1 Of MMC (CS)
Vcc Alias Portd.0 : Config Pind.0 = Output 'Connected to Pin No.2 Of MMC (DataIn)
Clk Alias Portd.2 : Config Pind.2 = Output 'Connected to Pin No.5 Of MMC (Clock)
Io Alias Pind.3 : Config Pind.3 = Input
'--------------------------variable--------------------------------------------
Dim Tim As Byte
Dim N As Bit
Dim X As Integer
'------------------------------------------only read pass----------------------
Restart:
Set Io ' IO high for input
Reset Res ' Reset low
Reset Clk
Set Vcc
Waitms 350
Print "-------------start"
Set Res ' Reset High
Set Clk ' CLK High
nop
nop
Reset Clk ' CLK Low
Reset Res ' Reset Low
nop
nop
Waitms 15
For Tim = 0 To 255
Reset Clk
nop
N = Io
Print N ; ",";
X = Tim Mod 16
If X = 0 Then Print ""
Set Clk
nop
Next
Print "------------Finish"
End 'end program
'-------------------------------note--------------------------------
'------------------------------------------------------------------------------
'---------************************************************** ***----------------
'-------------*******************************************----------------------
'paye io bayad pullup bala keshandeh shavad ba moghavemate 1 kiloo be vcc
'Paye Vcc Bayad Be Moghavemat 1 Kiloo Vasl Shavad
'------------------------------------------------------------------------------
'---------************************************************** ***----------------
'-------------*******************************************----------------------
'-------------------*********************************--------------------------
'-----------------------*************************------------------------------
' BCCARD.BAS
' This AN shows how to use the BasicCard from Zeitcontrol
سلام دوست عزیز
ببخشید من بجای آقای omega_adiban جواب می دم :icon_razz:
nop مخفف no operation هستش و مفهمومش اینه که تو اون خط برنامه هیچ کاری انجام نده!
موفق باشید :bye
دیدگاه