pic32 problem

Discussion in 'Embedded Systems and Microcontrollers' started by sarah_R, Apr 17, 2009.

  1. sarah_R

    Thread Starter Member

    Jan 31, 2009
    12
    0
    hi all ,,,,
    am new in dealing with pic microcontrollers so can you help me,,,,,

    i am working an a project that require me to take images from a camera and store them in an external RAM using pic32 then send them to gprs modem ( am using pic32xm360f512l) ,,

    ,,, how can i send images from a camera (any kind) to this micro(pic32) ,,
    am having a problem in understanding image frame and sending rate concerns :s can anyone help me with it ????
    thanx alot in advance
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    The camera literature should have that information. It is quite significant to know it the camera is color or B&W.

    Basically, the camera is an output device. Each frame will be sent according to a format, and will be primarily a bunch of numbers, one for every pixel. For a 640 X 480 pixel format, that will be 307,200 numbers/frame. The frame rate is how many frames are sent each second.

    The numbers will be so many bits in length, as determined by the camera's A to D converter. So a good color camera might send 24 bits/pixel, while a cheapie surveillance camera might only send 6 bits/pixel.

    Once you have the information about the camera, you can do the math to see the magnitude of the bit stream. Storing to external RAM sounds a bit hopeful - something more like a multi-gigabyte flash card is possibly more convenient. It's a bit like drinking from a fire hose.
     
  3. sarah_R

    Thread Starter Member

    Jan 31, 2009
    12
    0
    thanx alot beenthere ,,,,


    i need the image to be 640 X 480 pixel format because i want to send it to a mobile phone at the last stage ,,
    am thinking of using USB camera with the same pixel format is it ok (like a webcam)????

    you said that i'll need a multi_gigabyte flash ,, cant i use a 200MB RAM ????
     
  4. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    That is going to be determined by the number of frames you have to store. That is 307,200 numbers of unknown length per frame.
     
  5. sarah_R

    Thread Starter Member

    Jan 31, 2009
    12
    0
    hey,,,
    i didnt get it that well, but this what i get if i want to store up to 3 frames only then the 307,200 number should be multiplied with 3 so it will be 921600 number ,,, so the size of the memory will be 56kB ,,is it right ????
     
  6. Tekk

    Member

    Apr 18, 2009
    16
    0
    There may be 307,200 pixels sent per frame, but the actual number of bits received by your PIC will be far more than that.

    Cameras send a number of bits per pixel. Think of it as like on your computer, where you can change number of colors sent to your monitor.

    If your camera can output only black and white, then yes you will only get 307,200 bits or 37.5KB per frame.

    But if your camera can output 256 colors (8 bits per pixel since you can store up to 255 in 8 bits) you have 307,200 * 8 or 2,457,600 bits per frame. That's 307,200 bytes or about 300 KB per frame.

    Most cameras update around 15-20FPS so that makes about 4.4MB per second.

    It's a question of whether your PIC can process data that fast (you would have to look at each frame to see if it's what you want) and of whether you have enough storage.

    Hope that clears things up a bit.
     
  7. sarah_R

    Thread Starter Member

    Jan 31, 2009
    12
    0
    thanx alot ,,,,, it clears alot :)


    and am using a FIFO to slow down the bit stream .....
     
  8. sarah_R

    Thread Starter Member

    Jan 31, 2009
    12
    0
    i have another delema :s
    i want the camera to send me images when i want ( i dont want it to send images continuously ) how can i do it ??????
     
  9. nanovate

    Distinguished Member

    May 7, 2007
    665
    1
  10. sarah_R

    Thread Starter Member

    Jan 31, 2009
    12
    0
    hey nanovate,,,
    thanx for the information :)
     
  11. sarah_R

    Thread Starter Member

    Jan 31, 2009
    12
    0
    hey all,,,
    thanx for helping me i really appreciate it ,,, i have a new question ,,,
    i am using TMAS -MC55i GSM/GPRS modem with a pic32 starter kit my wish is to send images from an external memory connected to the starter kit to a mobile phone through the modem and also recieve SMS messages from the mobile phone. i connected them using serial cable but the problem is i cant figure out how to program the GSM/GPRS modem to do that ?????


    thanx alot in advance ,,,,
     
Loading...