Use the ArduCam mini OV5642 5MB with FIFO with a PIC32MX795L512L

Hi Arducam,

I’m trying to use the ArduCam mini OV5642 5MB with FIFO with a PIC32MX795L512L.
I already have communication with the camera via I2C and SPI, but when writing to the register 0x04 bit[1] = 1 to “start capture” nothing happens.
I keep reading register 0x41 bit[3]: “camera capture done flag” and it doesn’t change.
I have the SCL clock running at 8MHz and based my programm in the Arduino Library, just addapted the functions to work with PIC32.
The procedure I’m doing is as follows:

  1. Configure Chip Select as OUTPUT and set high.
  2. Start SPI and I2C
  3. Check if ArduCamp SPI bus is OK (write to register 0x00 and then read it, if it’s the same we get the OK)
  4. Check if the camera module type is OV5642 (Read register 0x300A and it should be 0x56, read register 0x300B and it should be 0x42)
  5. Set format to JPEG
  6. Configure JPEG capture and image size.
  7. Write register 0x03 bit[1] = 1 for VSYNC active low (I also tried active high)
  8. Clear fifo flag
  9. Write register 0x01 to take a single photo
  10. Flush fifo and clear fifo flag
  11. Write register 0x04 bit[1] = 1 to “start capture”
  12. Wait for register 0x41 bit[3]: “camera capture done flag” to be up
    Can you tell me if I’m missing something?
    Because I can’t make this work
    Thanks in advance.

Hi,

Please test whether SPI and I2C can communicate with the camera normally before proceeding to the next step. If the I2C and SPI communication is normal, the camera may not be initialized properly.

Agree with upstairs.

Hi,

We don’t have any MicroPython related examples for the time being, so we can only suggest that you refer to the c++ example process on arduino for modification and debugging.