Can you interface a camera with a Pic16F877.

Discussion in 'Embedded Systems and Microcontrollers' started by jamesharris38, Oct 15, 2017.

  1. jamesharris38

    Thread Starter New Member

    Aug 21, 2017
    9
    0
    I am looking to interface an camera with an Pic16K877 in order to record(less likely) or take pictures(mostly likely) for a final project. I have read a lot of things saying the memory size is to small to process and store the data internally. How hard would it be to store the data externally, are even transmit the data by way of WIFI(preferred)? I have until around May so I have time to try ideas and troubleshoot, need help better understanding the PIC limits. What interface protocol would be the best for such an task? In the end the project I have in mind will be sort of an wildlife cam with the ability to report things like temp, and humidity. Any ideas will help.

    Thanks, In Advance.
     
  2. philba

    Active Member

    Aug 17, 2017
    959
    303
    Do you have the specific camera in mind? I would look around the internet for camera projects based on the 877 or something similar. You could store images in external memory - look for SPI or I2C memory chips. Is the PIC required? There are lots of cheap, very fast chips that might work better. The Teensy 3.2, 3.5 or 3.6 spring to mind.
     
  3. jamesharris38

    Thread Starter New Member

    Aug 21, 2017
    9
    0
    The PicF16877 is specifically required for the project. Just for clarification when you talk about the memory are you referring to the port it interfaces with, I am relatively new to the pic. How difficult would the programming be if an external store chip was used for the project?
     
  4. JWHassler

    Active Member

    Sep 25, 2013
    272
    51
    The amount (and type) of external memory will depend on the camera you use.
    There are many different cameras available, changing constantly based on changing fashions in the surveillance sector. You should pick that first.
    Could your answer be as simple as clicking the buttons on a cheap digital camerA?
     
  5. panic mode

    Senior Member

    Oct 10, 2011
    1,725
    514
    PIC does not have enough memory to hold entire image but there are cameras with I2C interface so you can transfer image piecewise...
     
  6. philba

    Active Member

    Aug 17, 2017
    959
    303
    The programming is the easy part. Most have a very simple serial interface (SPI). The issue is size of image, speed of processing. Google SPI memory to get a sense. You'll need to decide whether you need sram (fast but small) or flash (larger but slow). But, you really need to start with the camera.
     
  7. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    7,815
    3,711

    How can you possibly make that statement?? You don't even know what the TS intends to do with the camara nor the TS's skill level
     
    GopherT likes this.
  8. GopherT

    AAC Fanatic!

    Nov 23, 2012
    7,983
    6,781
  9. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    7,815
    3,711
    Yes that is understood. What do you plan to do with the camera. What type of camera to you intend to use?

    I am going to assume you want to take photos with the pic or at the very least download photos from the camera.

    Any decent camera is going to require lots of ram. The PicF16877 only has 368 bytes of ram and operates at a max speed of 20mhz. Even if you could figure put how to store your data on some sort of external serial memory, it is going to take an long period of time just to transfer the data. You need a much more robust chip and if you are a beginner that is not going to be easy to use.


    If all you want to do is control the camera and not transfer images then the PicF16877 should do fine though I would like to see a bit more in RAM, it should be dibale.
     
  10. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    7,815
    3,711
  11. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    7,815
    3,711

    But I still say TS has selected the wrong chip even with that wonderful gizmo.
     
  12. GopherT

    AAC Fanatic!

    Nov 23, 2012
    7,983
    6,781
  13. GopherT

    AAC Fanatic!

    Nov 23, 2012
    7,983
    6,781
    He didn’t select it. This sounds like a homework assignment/project (senior design class). The professor probably assigned the ‘877 chip
     
  14. philba

    Active Member

    Aug 17, 2017
    959
    303
    Because it's true. interfacing to a serial memory via spi is straightforward with lots of examples on the internet. that's what he was asking about.
     
  15. GopherT

    AAC Fanatic!

    Nov 23, 2012
    7,983
    6,781
    No, I think he is asking more than programming. He is asking how, with what, how much can it do, and how to do it. That sounds like more than programming if he hasn’t even specified requirements of the end project, let alone picked parts.
     
  16. philba

    Active Member

    Aug 17, 2017
    959
    303
    that's why I suggested he needed to select the camera.
     
  17. jamesharris38

    Thread Starter New Member

    Aug 21, 2017
    9
    0
    Sorry just to clarify I am required to use the PicF16887 not Pic16F877.
    What if I used an UART interfaced camera(uCAM-III) with 128KB of ram onboard to process images? The micro-controller integrated with a sensor would be used to trigger the camera and to control were the data is stored, is that possible?
     
  18. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    7,815
    3,711
    This needs to go to the homework forum.
     
    absf likes this.
  19. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    7,815
    3,711

    No its not. You can't make that blanket statement when you have no idea of the requirements or the TSs skill level.
     
  20. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    7,815
    3,711

    You are going to need to process them in very small blocks from the camera to some kind of external memory. Where did you get that 128K number? I would hope it had enough storage to hold a full image or taking a photo is going to be very problematic.

    Once you get it to external memory what are you going to do with it? You could store it as a file on an SD chip but you don't have near enough ram to make a FAT table.
    http://elm-chan.org/fsw/ff/00index_e.html

    It is going to be pretty useless just a chunk of memory sitting out there in external memory.
     
    Kjeldgaard likes this.
Loading...