line scan image sensor demo
ratronic            
            
                Posts: 1,451            
            
                    Hi everyone - I am mainly posting this for Phil (if you see this) to verify I am clocking the si and clk lines right. It seems to work just fine this way, I am displaying the line scanner output to the vga display about 5 displays a second. The line scan image sensor is hooked up to a ltc1298 adc ic.                
                
            
                            
Comments
'Very nice display! I took a look at your code. You're missing the first pixel, so the last one you read will be from whatever charge is left on AO after it goes tri-state. To catch the first pixel, you can do your sampling like this:
[b]outa[/b][noparse][[/noparse]­si]~~ 'trigger si then clk [b]outa[/b][noparse][[/noparse]­clk]~~ [b]outa[/b][noparse][[/noparse]­si]~ [b]outa[/b][noparse][[/noparse]­clk]~ [b]repeat[/b] i [b]from[/b] 0 to 127 'grab 128 pixels into a[noparse][[/noparse]­] a[noparse][[/noparse]­i] := ad.getadc(1)&$ff 'channel 1 of ltc1298 connected to ao on line scanner [b]outa[/b][noparse][[/noparse]­clk]~~ [b]outa[/b][noparse][[/noparse]­clk]~-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
···································Fix it, if ain't broke!
D Rat
Dave Ratcliff N6YEE