Usage Environment (Blue bold words are special notes)
1. Software environment: Keil MDK 5.15
2. Hardware environment: STM32F103C8T6 minimum system, OV2640 camera module
I wanted to play around with cameras recently, so I looked for cost-effective cameras online. I used the OV7670 camera before, but this camera has high requirements for the microcontroller. It is very difficult to drive a general microcontroller, unless an ARM-level microprocessor is competent. If you want to use a low-end microcontroller to drive it, you need to add a FIFO module. Once this thing is added, the price will triple. . . . The original 20 yuan thing has risen to 70+, my God. . . . So after searching for a long time, I finally found the OV2640 camera. This camera is the most cost-effective camera I have encountered so far. It actually supports direct output of JPG format images, and supports up to 1600*1200 (200W) pixels! ! ! The price is only half of the OV7670 camera with FIFO! And the STM32F103 series microcontroller can easily drive it (provided that the SRAM is large enough).
So we decided to use the STM32F103C8T6 MCU, which is more cost-effective. The price of this MCU is only 8 yuan, and the performance is good. It has 48 pins, 20KB RAM, 64K FLASH, and 72M main frequency, which is more cost-effective. The system connection diagram is as follows:
After the camera captures the image, it sends it to the host computer through the serial port. The host computer software is as follows:
20k of RAM is still quite difficult to carry
The 640*480 picture effect is as follows:
The 320*240 effect is as follows
The effect is basically good. The main function is as follows:
int main(void)
{
u8 res;
u8 *pname; //File name with path
Stm32_Clock_Init(9); // System clock settings
uart_init(72, 115200); // Initialize the serial port to 115200
delay_init(72); // Delay initialization
usmart_dev.init(72); // Initialize USMART
LED_Init(); // Initialize the hardware interface connected to the LED
RCC->AHBENR |= RCC_AHBENR_CRCEN; //Hardware crc initialization
delay_ms(5500);
delay_ms(5500);
printf("Enter Main \r\n");
while(OV2640_Init()) //Initialize OV2640
{
printf("ov2640 error");
delay_ms(200);
}
printf("ov2640 ok");
delay_ms(1500);
OV2640_JPEG_Mode(); //RGB565 mode
OV2640_OutSize_Set(pic_width, pic_height);
ov2640_speed_ctrl();
while(1)
{
while(!OV2640_VSYNC) ;
while(OV2640_VSYNC) //Wait for frame signal
{
res = ov2640_jpg_photo(pname);
delay_ms(10000);
}
}
}
Previous article:STM32F103C8T6 has 128K Flash
Next article:Implementation of STM32 custom HID USB device
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- Microwave Circuit Appreciation
- Microcontroller learning notes, teach you how to learn in three steps!
- msp430f5529 uart pwm adc
- WiFi NeoPixel Cube
- [Help] In the design of lithium battery power modules, why is every 1V of lithium battery voltage very valuable?
- [DIY Bing Dun Dun] + Limited Edition Homemade Dun Dun is here
- EEWORLD University Hall----Live Replay: Unlocking New Possibilities of TI Sitara AM2x MCU in Motor Drive
- 02.USART routines and tests
- How to create and call schematic templates in AD?
- Learning: The most important components of the analog world - signal chain and power supply