Shop OBEX P1 Docs P2 Docs Learn Events
line scan image sensor demo — Parallax Forums

line scan image sensor demo

ratronicratronic Posts: 1,451
edited 2010-04-15 18:46 in Accessories
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.
800 x 600 - 37K

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-04-15 18:13
    Dave,

    '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
  • ratronicratronic Posts: 1,451
    edited 2010-04-15 18:46
    Thanks for taking the time to look Phil. I've played with· and improved my code since I posted that. It's a 'work in progress' but I am glad to hear that I am clocking it ok. Thanks for the example.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ···································Fix it, if ain't broke!


    D Rat

    Dave Ratcliff N6YEE
Sign In or Register to comment.