amirs10
07-08-2013, 22:02
سلام/من برای کار با کانتر 1به همچین خطوطی در بسکام بر خوردم یه چیزایی از حافظه eepromمیدونم ولی تو این خط ما چیزی قبلا تو این حافظه ننوشتی که حالا اونو بخونیم چرا200؟
$regfile = "m8def.dat"
$crystal = 1000000
Config Clock = Soft
Config Date = Ymd , Separator = /
Config Portb = Input
Ad Alias Pinb.0
Seet Alias Pinb.1
De Alias Pinb.2
Save Alias Pinb.7
Mad Alias Pinb.6
Mde Alias Pinb.5
Delet Alias Pinb.4
Config Timer1 = Counter , Edge = Rising
Enable Interrupts
Dim A As Byte , W As Byte , X As Word , G As String * 16 , M As Byte , _
H As Byte , Mi As Byte , S As Byte , Y As Byte , Mo As Byte , D As Byte , _
O As Bit , F As Byte , Oo As Bit , K As Bit
Counter1 = 0
Main:
Readeeprom Counter1 , 200
Waitms 5
Readeeprom _hour , 201
Waitms 5
Readeeprom _min , 202
Waitms 5
Readeeprom _sec , 203
Waitms 5
Readeeprom _year , 204
Waitms 5
Readeeprom _month , 205
Waitms 5
Readeeprom _day , 206
Waitms 10
$regfile = "m8def.dat"
$crystal = 1000000
Config Clock = Soft
Config Date = Ymd , Separator = /
Config Portb = Input
Ad Alias Pinb.0
Seet Alias Pinb.1
De Alias Pinb.2
Save Alias Pinb.7
Mad Alias Pinb.6
Mde Alias Pinb.5
Delet Alias Pinb.4
Config Timer1 = Counter , Edge = Rising
Enable Interrupts
Dim A As Byte , W As Byte , X As Word , G As String * 16 , M As Byte , _
H As Byte , Mi As Byte , S As Byte , Y As Byte , Mo As Byte , D As Byte , _
O As Bit , F As Byte , Oo As Bit , K As Bit
Counter1 = 0
Main:
Readeeprom Counter1 , 200
Waitms 5
Readeeprom _hour , 201
Waitms 5
Readeeprom _min , 202
Waitms 5
Readeeprom _sec , 203
Waitms 5
Readeeprom _year , 204
Waitms 5
Readeeprom _month , 205
Waitms 5
Readeeprom _day , 206
Waitms 10