سلام من در برنامه م یه تاخیر میزارم که رو تابلو نوشته م دیده بشه و این تاخیر هیچ ربطی به دیگر قسمت برنامهم نداره ولی وقتی سطرم کامل رفرش شد یه تاخیر خیلی بزرگ ایجاد میشه که باعث میشه هم تابلو چشمک بزنه و هم نورش کم باشه
این تاخیرو من جایی گذاشتم که روی هر سطر یه تاخیر 500 میلی ثانیه ایجاد بشه و روی محاسبات برنامه نباید تاثیری داشته باشه ولی داره طوری که برای اینکه دوباره سطرو از اول اسکن کنه چند ثانیه طول میکشه
نمیدونم مشکل از کجاس ....یا کلا کامپایلر بسکام این مشکلو داره ؟
اینم فلیمش تو فیلم تو ثانیه 7 اسکن تموم میشه و تا ثانیه ده ینی سه ثانیه طول می کشه که دوباره اسکن کنه تاخیر کم میکنم مشکل تا حدودی کم میشه ولی هم نور کمه و کمی چشمک میزنه که راضی کننده نیست تاخیر زیاد کردم به چشم مشکل دیده بشه http://s6.picofile.com/file/82000115...64705.mp4.html
این تاخیرو من جایی گذاشتم که روی هر سطر یه تاخیر 500 میلی ثانیه ایجاد بشه و روی محاسبات برنامه نباید تاثیری داشته باشه ولی داره طوری که برای اینکه دوباره سطرو از اول اسکن کنه چند ثانیه طول میکشه
نمیدونم مشکل از کجاس ....یا کلا کامپایلر بسکام این مشکلو داره ؟
اینم فلیمش تو فیلم تو ثانیه 7 اسکن تموم میشه و تا ثانیه ده ینی سه ثانیه طول می کشه که دوباره اسکن کنه تاخیر کم میکنم مشکل تا حدودی کم میشه ولی هم نور کمه و کمی چشمک میزنه که راضی کننده نیست تاخیر زیاد کردم به چشم مشکل دیده بشه http://s6.picofile.com/file/82000115...64705.mp4.html
$regfile = "m8def.dat"
$crystal = 1000000
Config Portd = Output
Config Portb = Output
cp alias portd.0
Sh_cp Alias Portd.1
St_cp Alias Portd.2
Dim Go_to_595 As Byte
'Dim For_rotate As Byte
Dim Frame_count As Word
Dim Frame_noumber As Word
Dim Find As Long
Dim Look_up_idx As Word
Dim Framee As Word
Dim Ic_74hc595 As Byte
Dim Idx As Byte
Dim Go As Byte
Dim Refresh As Byte
Dim Delayy As Word
Dim Find_delay As Word
Dim I As Long
I = &B11111111111111111111111111111111
Const Image_width = 32
Const Image_height = 16
Const Image_frame_count = 1
Const Byte_in_row = Image_height / 8
Const Matrix_8x8_in_row = Image_width / 8
Const Frame_size = Byte_in_row * Image_width
Const Frame_in_to_595 = Image_frame_count * Frame_size
Dim Buf As Byte
Do
'Find_delay
'******************************************co unter frame's byet
For Framee = 1 To Frame_in_to_595 Step Frame_size
'For Refresh = 0 To 20
Set Cp
For Frame_count = 1 To Frame_size Step Matrix_8x8_in_row
'*******************************************b ufering
Set Sh_cp
Reset Cp
Reset Sh_cp
Reset Portb.2
For Look_up_idx = 1 To Matrix_8x8_in_row
Find = Look_up_idx + Frame_count
Find = Find + Framee
Find = Find - 3
Buf = Lookup(find , Image_code)
Toggle Buf
Shiftout Portb.0 , Portb.1 , Buf , 2
Next Look_up_idx
Set Portb.2
Set St_cp
Waitms 500 'inja ******+++***
Reset St_cp
'***zero row
'For Ic_74hc595 = 1 To Matrix_8x8_in_row
'Reset Portb.2
'Shiftout Portb.0 , Portb.1 , I
'Next Ic_74hc595
'Set Portb.2
Next Frame_count
'Next Refresh
Next Framee
Loop
Image_code:
Data &H00 , &H00 , &H00 , &H00, ' 0004 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data &h00,&h00,&h00,&h00, ' 0008 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data &h7F,&hC0,&h00,&h00, ' 000C . # # # # # # # # # . . . . . . . . . . . . . . . . . . . . . .
Data &h04,&h00,&h00,&h10, ' 0010 . . . . . # . . . . . . . . . . . . . . . . . . . . . # . . . .
Data &h04,&h00,&h00,&h10, ' 0014 . . . . . # . . . . . . . . . . . . . . . . . . . . . # . . . .
Data &h04,&h07,&h0F,&h3E, ' 0018 . . . . . # . . . . . . . # # # . . . . # # # # . . # # # # # .
Data &h04,&h08,&h90,&h90, ' 001C . . . . . # . . . . . . # . . . # . . # . . . . # . . # . . . .
Data &h04,&h10,&h50,&h10, ' 0020 . . . . . # . . . . . # . . . . . # . # . . . . . . . # . . . .
Data &h04,&h1F,&hCC,&h10, ' 0024 . . . . . # . . . . . # # # # # # # . . # # . . . . . # . . . .
Data &h04,&h10,&h03,&h10, ' 0028 . . . . . # . . . . . # . . . . . . . . . . # # . . . # . . . .
Data &h04,&h10,&h00,&h90, ' 002C . . . . . # . . . . . # . . . . . . . . . . . . # . . # . . . .
Data &h04,&h08,&h50,&h90, ' 0030 . . . . . # . . . . . . # . . . . # . # . . . . # . . # . . . .
Data &h04,&h07,&h8F,&h0E, ' 0034 . . . . . # . . . . . . . # # # # . . . # # # # . . . . # # # .
Data &h00,&h00,&h00,&h00, ' 0038 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data &h00,&h00,&h00,&h00, ' 003C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data &h00,&h00,&h00,&h00 ' 0040 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
$crystal = 1000000
Config Portd = Output
Config Portb = Output
cp alias portd.0
Sh_cp Alias Portd.1
St_cp Alias Portd.2
Dim Go_to_595 As Byte
'Dim For_rotate As Byte
Dim Frame_count As Word
Dim Frame_noumber As Word
Dim Find As Long
Dim Look_up_idx As Word
Dim Framee As Word
Dim Ic_74hc595 As Byte
Dim Idx As Byte
Dim Go As Byte
Dim Refresh As Byte
Dim Delayy As Word
Dim Find_delay As Word
Dim I As Long
I = &B11111111111111111111111111111111
Const Image_width = 32
Const Image_height = 16
Const Image_frame_count = 1
Const Byte_in_row = Image_height / 8
Const Matrix_8x8_in_row = Image_width / 8
Const Frame_size = Byte_in_row * Image_width
Const Frame_in_to_595 = Image_frame_count * Frame_size
Dim Buf As Byte
Do
'Find_delay
'******************************************co unter frame's byet
For Framee = 1 To Frame_in_to_595 Step Frame_size
'For Refresh = 0 To 20
Set Cp
For Frame_count = 1 To Frame_size Step Matrix_8x8_in_row
'*******************************************b ufering
Set Sh_cp
Reset Cp
Reset Sh_cp
Reset Portb.2
For Look_up_idx = 1 To Matrix_8x8_in_row
Find = Look_up_idx + Frame_count
Find = Find + Framee
Find = Find - 3
Buf = Lookup(find , Image_code)
Toggle Buf
Shiftout Portb.0 , Portb.1 , Buf , 2
Next Look_up_idx
Set Portb.2
Set St_cp
Waitms 500 'inja ******+++***
Reset St_cp
'***zero row
'For Ic_74hc595 = 1 To Matrix_8x8_in_row
'Reset Portb.2
'Shiftout Portb.0 , Portb.1 , I
'Next Ic_74hc595
'Set Portb.2
Next Frame_count
'Next Refresh
Next Framee
Loop
Image_code:
Data &H00 , &H00 , &H00 , &H00, ' 0004 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data &h00,&h00,&h00,&h00, ' 0008 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data &h7F,&hC0,&h00,&h00, ' 000C . # # # # # # # # # . . . . . . . . . . . . . . . . . . . . . .
Data &h04,&h00,&h00,&h10, ' 0010 . . . . . # . . . . . . . . . . . . . . . . . . . . . # . . . .
Data &h04,&h00,&h00,&h10, ' 0014 . . . . . # . . . . . . . . . . . . . . . . . . . . . # . . . .
Data &h04,&h07,&h0F,&h3E, ' 0018 . . . . . # . . . . . . . # # # . . . . # # # # . . # # # # # .
Data &h04,&h08,&h90,&h90, ' 001C . . . . . # . . . . . . # . . . # . . # . . . . # . . # . . . .
Data &h04,&h10,&h50,&h10, ' 0020 . . . . . # . . . . . # . . . . . # . # . . . . . . . # . . . .
Data &h04,&h1F,&hCC,&h10, ' 0024 . . . . . # . . . . . # # # # # # # . . # # . . . . . # . . . .
Data &h04,&h10,&h03,&h10, ' 0028 . . . . . # . . . . . # . . . . . . . . . . # # . . . # . . . .
Data &h04,&h10,&h00,&h90, ' 002C . . . . . # . . . . . # . . . . . . . . . . . . # . . # . . . .
Data &h04,&h08,&h50,&h90, ' 0030 . . . . . # . . . . . . # . . . . # . # . . . . # . . # . . . .
Data &h04,&h07,&h8F,&h0E, ' 0034 . . . . . # . . . . . . . # # # # . . . # # # # . . . . # # # .
Data &h00,&h00,&h00,&h00, ' 0038 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data &h00,&h00,&h00,&h00, ' 003C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data &h00,&h00,&h00,&h00 ' 0040 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


دیدگاه