Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

PIXEL to DATA

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Share your working BASCOM-AVR code here
View previous topic :: View next topic  
Author Message
Ev3658

Bascom Member



Joined: 30 Nov 2014
Posts: 32

russia.gif
PostPosted: Mon Nov 18, 2019 2:27 am    Post subject: PIXEL to DATA Reply with quote

Pixelizator Embarassed Rolling Eyes




Downloads - https://yadi.sk/d/bsZ_21wIzl_ugw
Back to top
View user's profile
Ev3658

Bascom Member



Joined: 30 Nov 2014
Posts: 32

russia.gif
PostPosted: Mon Nov 18, 2019 7:34 pm    Post subject: Reply with quote

Video - https://www.youtube.com/watch?v=n2LtAikDMA8



DATA pixel=byte:
Code:
Dim L As Byte
Dim P As Byte
Dim O As Byte


Restore Ris1
For O = 0 To 15
   For P = 0 To 31
      Read L
      Call Point(p , O , L)
   Next P
Next O


DATA 8 pixel=byte
Code:
Dim L As Byte
Dim P As Byte
Dim O As Byte
Dim I As Byte


Restore Ris1
For O = 0 To 15
   For P = 0 To 31
     I = P And &B0000_0111
     If I = 0 Then Read L
     If L.i = 1 Then Call Point(p , O , 1)
   Next P
Next O


Programm downloads - https://yadi.sk/d/bsZ_21wIzl_ugw
http://bascomavr.3bb.ru/viewtopic.php?id=2115&p=2
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5921
Location: Holland

blank.gif
PostPosted: Mon Nov 18, 2019 8:09 pm    Post subject: Reply with quote

Nice idea. Thanks for sharing Very Happy
Do you have also info on the led panel you used?

_________________
Mark
Back to top
View user's profile Visit poster's website
Ev3658

Bascom Member



Joined: 30 Nov 2014
Posts: 32

russia.gif
PostPosted: Mon Nov 18, 2019 10:54 pm    Post subject: Reply with quote

P10 74HC595






$regfile = "m328pdef.dat"
$crystal = 16000000
Config Timer2 = Timer , Prescale = 256
Dim Led(200) As Byte
Dim Adrsstart As Byte
Dim Adrsend As Byte
Dim Adrsschet As Byte
Dim Adrs As Byte
Dim Triglsd As Byte

Code:


Graf:


  Adrsstart = Lsdstr * Triglsd                            
  Incr Adrsstart                                            '
  Adrsend = Adrsstart + Lsdstr                              '

  For Adrsschet = Adrsstart To Adrsend                      '
          Shiftout Data_pin , Clk_pin , Led(adrsschet)    

  Next Adrsschet

  Set Stb_pin                                              

  Select Case Triglsd                                    
      Case 0
         A_pin = 1
         B_pin = 1
         Incr Triglsd
      Case 1
         A_pin = 0
         B_pin = 1
         Incr Triglsd
      Case 2
         A_pin = 1
         B_pin = 0
         Incr Triglsd
      Case 3
         A_pin = 0
         B_pin = 0
         Triglsd = 0
  End Select

  Reset Stb_pin                                             '
  '=====================================================================================================
Return
 



POINT:
Code:

Declare Sub Point(byval X As Word , Byval Y As Byte , Byval Cl As Byte)      
...
...
...

Sub Point(x As Word , Y As Byte , Cl As Byte )              
   'X = 31 - x
   'Y = 15 - Y
   Xadrs = X / 8                                          
   Xadrs = Xadrs * 4                                        

   Xost = X Mod 8                                          

   Yadrs = Y Mod 4                                        
   Yadrs = Yadrs * Lsdstr                                  

   Yost = Y / 4                                            
   Yadrs = Yadrs + Yost                                    

   Yadrs = Xadrs + Yadrs                                    

   Yadrs = Lsdram - Yadrs                                  
   If Yadrs <= Lsdram And Yadrs > 0 Then
      Led(yadrs).xost = Not Cl.0                          
   End If

End Sub
 
Back to top
View user's profile
Ev3658

Bascom Member



Joined: 30 Nov 2014
Posts: 32

russia.gif
PostPosted: Tue Nov 19, 2019 11:05 am    Post subject: Reply with quote

There are glitches, but convenient and practical. Wink


Video - https://yadi.sk/i/NdadNUVg0upp7A
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5921
Location: Holland

blank.gif
PostPosted: Tue Nov 19, 2019 1:39 pm    Post subject: Reply with quote

thanks for the code !
_________________
Mark
Back to top
View user's profile Visit poster's website
Ev3658

Bascom Member



Joined: 30 Nov 2014
Posts: 32

russia.gif
PostPosted: Thu Nov 21, 2019 8:54 pm    Post subject: Reply with quote

Rolling Eyes
x86 - https://yadi.sk/d/bsbii5XkEAving
x64 - https://yadi.sk/d/bsZ_21wIzl_ugw
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Share your working BASCOM-AVR code here All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum