Shop OBEX P1 Docs P2 Docs Learn Events
460800 baud serial with C328 camera! — Parallax Forums

460800 baud serial with C328 camera!

RaymanRayman Posts: 14,849
edited 2009-09-03 19:20 in Propeller 1
I'm finally getting ready to interface the C328 camera with my PSM unit...·
My main issue with this camera is that it's pretty slow, even·at 115 kbps...

But, I was reading the datasheet for the serial encoder and it claims to go all the way to 920 kbps!
That could make it a lot nicer...

But, can the prop do RS232 style serial at that rate?· We'll see!

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm

Post Edited (Rayman) : 9/3/2009 7:10:34 PM GMT

Comments

  • KyeKye Posts: 2,200
    edited 2009-08-29 14:40
    Using one processor for input then yes. Run the processor in a tight waitpeq loop for the start bit and then shift in all the data. Throw skip the stop bit to uplaod the new byte to main memory and your done.

    Spin however won't be able to process all that data coming in.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
  • RaymanRayman Posts: 14,849
    edited 2009-08-29 17:06
    The datasheet for the OV528 seems to imply that it can also be used to decode jpg files... That would be a neat trick!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • RaymanRayman Posts: 14,849
    edited 2009-08-31 00:52
    Got the camera working with the PSM! [noparse]:)[/noparse]
    Currently doing 80x60 preview mode in 16-bit color on the PSM screen...
    Update rate is about 1 Hz.
    Now, need to increase resolution and attempt higher baud rate...

    One strange thing about this camera is that I need to physically unplug it for 3 seconds in order to get it to sync... I may need to add some kind of switch, or try to power it with a couple Prop pins (one isn't enough I think because it takes 60 mA)..

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • Harrison.Harrison. Posts: 484
    edited 2009-08-31 01:38
    Rayman said...
    One strange thing about this camera is that I need to physically unplug it for 3 seconds in order to get it to sync... I may need to add some kind of switch, or try to power it with a couple Prop pins (one isn't enough I think because it takes 60 mA)..

    I've found that a 10K pulldown on the camera's RX line (green wire) helps a lot. Without it the camera tends to go into bad states when the pin is in a floating state (such as when the Propeller is in a reset state).
  • RaymanRayman Posts: 14,849
    edited 2009-08-31 09:36
    Harrison: I was just thinking about something like that! Glad to hear it works... Maybe a pull-up is better since these pins idle at Vdd?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • RaymanRayman Posts: 14,849
    edited 2009-09-03 18:46
    Just got 160x120 preview working in full 16-bit color at 460800 baud!

    This gives an update rate of about 1 per second.

    This took a bit of work... Had to use JDCogSerial from OBEX for sending commands at that rate and a custom receive code embedded in the PSM's display driver to get it going...

    I think I could get it up to 921600 baud, but that would take a whole lot of work!

    PS: I've tried all kinds of pull up and downs and it just doesn't work. The only way to get a reliable connection is to power the camera after the Prop has booted and the serial driver is running. No idea why... It connects perfectly though, once you know this trick...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • Bill HenningBill Henning Posts: 6,445
    edited 2009-09-03 19:20
    Sounds very cool, well done.
    Rayman said...
    Just got 160x120 preview working in full 16-bit color at 460800 baud!

    This gives an update rate of about 1 per second.

    This took a bit of work... Had to use JDCogSerial from OBEX for sending commands at that rate and a custom receive code embedded in the PSM's display driver to get it going...

    I think I could get it up to 921600 baud, but that would take a whole lot of work!

    PS: I've tried all kinds of pull up and downs and it just doesn't work. The only way to get a reliable connection is to power the camera after the Prop has booted and the serial driver is running. No idea why... It connects perfectly though, once you know this trick...
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
    Morpheus & Mem+dual Prop SBC w/ 512KB kit $119.95, 2MB memory IO board kit $89.95, both kits $189.95
    www.mikronauts.com - my site 6.250MHz custom Crystals for running Propellers at 100MHz
    Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
Sign In or Register to comment.