Webcam. Stellaris Launchpad PWM Tutorial. After receiving my Stellaris Launchpad, I decided to browse the little amount of tutorials there was available on the subject.
I was really impressed by the Getting Started hands-on workshop offered in TI’s wiki. After watching the first few tutorials, I had a somewhat firmer grasp on how this little puppy was supposed to be programmed, and the capabilities of the Code Composer Studio IDE. I got as far as Chapter 4: Interrupts until I hit the first snag: After the Lab4 assignment, the friendly instructor told that as a home assignment, one could try out the PWM (pulse-width modulation) capabilities of the Launchpad before proceeding further.
Little did I know how many hours I would spend on that topic! After a solid 8 hours of banging my head against the documentation, Launchpad and CCS (which is prone to hanging at least on my PC), I finally got it working, and decided this would be a great place for a tutorial. Rule 1 of PWM on Launchpad: There are no PWM units Pretty easy, wasn’t it? Omnivison ov3640 i2c sccb. TASK : Write a device-driver for Omnivision ov3640 camera Timeline : A.S.A.P (is there any other way?
:P) For the aptitude champs out there, here is a quick one: Q. If you are sitting facing west and running I2C at 0.00000000055kbps and a bear appears in front of you, what color is the bear? Not sure? DAY 1 : Initial study A bit about ov3640: The ov3640 (color) image sensor is a 1/4-inch 3.2-megapixel CMOS image sensor that is capable of QXGA(2048x1536)@15FPS using OmniPixel3™ technology in a small footprint package. Searching the "internets", an old "v4l2-int" styled driver for ov3640 is available for the linux-kernel. The camera is controlled using the SCCB bus. According to spec, SCCB supports only upto 100Khz (not more).I2C spec requires pullups with open-collector(drain) drivers everywhere. DAY 2 : First attempt.
Webcam: ov7670 camera module. I'm pretty sure this is the schematic for the camera module I bought on ebay.
I removed the 4.7k resistors going to 2.8v and added 4.7k resistors going to sda and scl lines going to 3.3v on the launchpad. sccb specification manual shows the address byte. Embedded Programmer: Hacking the OV7670 camera module (SCCB cheat sheet inside) An in-depth look of the OV7670 camera module The OV7670 is a low cost image sensor + DSP that can operate at a maximum of 30 fps and 640 x 480 ("VGA") resolutions, equivalent to 0.3 Megapixels.
The captured image can be pre-processed by the DSP before sending it out. This preprocessing can be configured via the Serial Camera Control Bus (SCCB). You can see the full datasheet here. There are many camera modules, that come with standard 0.1" spaced headers, in eBay with prices under $10. The camera module comes with a 9x2 header, the pin diagram is shown below: Now, I'll cover the meaning of these pins.
Omnivision OV7640 SCCB (I2C?) bus problem. Ov7670 camera sensor success! The ov7670 camera sensor, cheaply available from ebay, has been the bane of my existence during my short electronics hobby career.
I bought my first ov7670 sensor maybe a year ago, and have been tearing my hair out trying to get it to respond. It seemed completely dead. It didn’t respond to any form of i2c communication, and showed no signs of life in the oscilloscope. Every now and then, I tried to get it to work using various approaches, but to no avail, and was ready to completely give up. However, now after seeing some recent success stories with the ov7670 here and here, I decided to give it one more go. I’m pretty new to electronics, and I’m learning new stuff every day. I’ve read pretty much every document available on the internet about the ov7670 sensor, but to this day, I’m not sure it’s clearly stated anywhere that feeding the XCLK is an important step to getting the ov7670 up and running.