User Manual

ArduCAM Camera Shield Software Application Note
www.ArduCAM.com
It is achieved by controlling the power enable pin of the onboard LDOs. The power enable
pin is controlled by the GPIO[2] of ArduChip. By sending the command code 0x86 and write 1
to bit[2] to enable the LDOs, or write 0 to bit[2] to disable the LDOs to save power. Note that
power down the sensor circuit, the camera settings are lost. User should reinitialize the sensor
when power up the sensor circuit again.
5.7.2 Sensor standby
It is achieved by controlling the power enable pin of the onboard LDOs. The power enable
pin is controlled by the GPIO[1] of ArduChip. By sending the command code 0x86 and write 1
to bit[1] to set the sensor into standby mode, or write 0 to bit[1] to set the sensor out of standby
mode. Note that the sensor settings are not lost when in standby mode, and reinitialize is not
needed.
6 ArduCAM APIs
There are a set of API functions that issue different commands to ArduCAM shield.
6.1 void InitCAM (void)
InitCAM function initializes the hardware information of the user system, such as the SPI
chip select port initialization and image sensor slave address initialization.
6.2 void flush_fifo (void)
flash fifo function is used to reset the fifo read pointer to ZERO.
6.3 void start_capture (void)
start_capture function is used to issue a capture command. After this command the ArduCAM
hardware will wait for a start of a new frame then store the entire frame data to onboard frame
buffer.
6.4 void clear_fifo_flag (void)
Once a frame image is buffed to onboard memory, the capture completion flag is asserted
automatically. The clear_fifo_flag function is used to clear this flag before issuing next capture
command.
6.5 void write_reg(uint8_t addr, uint8_t data)
Param1: ArduChip register address (or command code)
Param2: data to be written into the register
write_reg is a basic function to write the ArduChip internal registers.
6.6 uint8_t read_reg(uint8_t addr)
Param1: ArduChip register address (or command code)
Return value: register value
read_reg is a basic function to read ArduChip internal register value.
6.7 uint32_t read_fifo_length(void)
Return value: 32 bit length of captured image
read_fifo_length function is used to determine the length of current captured image. Note the
Rev.C shield doesn't support this feature.
6.8 void set_fifo_burst(void)
set_fifo_burst function is used to set the read memory into burst read mode. It should be
called before burst memory read operation. Note the Rev.C shield doesn't support this feature.
6.9 int wrSensorRegs8_8(const struct sensor_reg*)
Param1: sensor setting data array