sccb(I2C) for ov7670

hello friends

i want to implement an Omnivision OV7670 image sensor with ATMEGA16.
but encountered to a problem

i can't write in ov7670 registers !

when i try to communicate via I2C, i get NACK!
i send start and give rep_start from OV7670. then i send the write address
(0x42 according to datasheet) but no ACK is detected !!

i doubt to these :

1- according to datasheet, the address for writing is 42 (did not say hex!
is it?)
don't know i must send 0x42 itself or ox42 with a left shift ? because the
LSB specifies writing or reading

2- difference between logic levels. obviously atmega16 works with 5V, but
ov7670 I/O voltage is 1.7 to 3V. i am using 2.6V for sensor
know what happens to I2C between mega16 and ov7670?
should i connect the I2C pullup resistors to 5V or 2.6V? (i had connected
it to 5V)

my circuit is simple. only SDA and SCL of OV7670 and ATMEGA16 are connected
and a 4.7K pullup resistor on each line

thanks

	   
					
---------------------------------------		
Posted through http://www.EmbeddedRelated.com
0
spman
8/17/2010 12:38:12 PM
comp.arch.embedded 19901 articles. 0 followers. Post Follow

4 Replies
2023 Views

Similar Articles

[PageSpeed] 8

In article <a-6dnVVZEropH_fRnZ2dnUVZ_hCdnZ2d@giganews.com>, 
spman_xm@n_o_s_p_a_m.yahoo.com says...
> 
> hello friends
> 
> i want to implement an Omnivision OV7670 image sensor with ATMEGA16.
> but encountered to a problem
> 
> i can't write in ov7670 registers !
> 
> when i try to communicate via I2C, i get NACK!
> i send start and give rep_start from OV7670. then i send the write address
> (0x42 according to datasheet) but no ACK is detected !!
>
> i doubt to these :
> 
> 1- according to datasheet, the address for writing is 42 (did not say hex!
> is it?)

They usually use Address byte of 0x42 for write and 0x43 for reading.

> don't know i must send 0x42 itself or ox42 with a left shift ? because 
> the LSB specifies writing or reading

The actual value. I always test devices like this by doing a READ on a 
single register first.

> 2- difference between logic levels. obviously atmega16 works with 5V, 
but
> ov7670 I/O voltage is 1.7 to 3V. i am using 2.6V for sensor
> know what happens to I2C between mega16 and ov7670?
> should i connect the I2C pullup resistors to 5V or 2.6V? (i had connected
> it to 5V)

May have blown the sensor with that sort of voltage input.
 
> my circuit is simple. only SDA and SCL of OV7670 and ATMEGA16 are connected
> and a 4.7K pullup resistor on each line

Two issues here, 

1/ for that amount of voltage difference you need a level translator 
   betwen the two voltage domains a FET with pull ups on both sides to 
   the different rails will do it.

2/ have you exceeded the maximum SCL speed (clock rate) for the device.

Have you actually scoped the signals and all the other signals to the 
sensor, like what voltage level is the clock and other inputs to the
sensor.





 
> thanks
> 
> 	   
> 					
> ---------------------------------------		
> Posted through http://www.EmbeddedRelated.com


0
Paul
8/18/2010 8:20:00 AM
thank you Paul

what is your opinion about an at91sam7x256? if i use it to connect to
sensor, need to shift voltage level yet? (i don't have any FET in present
time ...)	   
					
---------------------------------------		
Posted through http://www.EmbeddedRelated.com
0
spman
8/19/2010 9:46:00 AM
On Aug 17, 2:38=A0pm, "spman" <spman_xm@n_o_s_p_a_m.yahoo.com> wrote:
> hello friends
>
> i want to implement an Omnivision OV7670 image sensor with ATMEGA16.
> but encountered to a problem
>
> i can't write in ov7670 registers !
>
> when i try to communicate via I2C, i get NACK!
> i send start and give rep_start from OV7670. then i send the write addres=
s
> (0x42 according to datasheet) but no ACK is detected !!
>
> i doubt to these :
>
> 1- according to datasheet, the address for writing is 42 (did not say hex=
!
> is it?)
> don't know i must send 0x42 itself or ox42 with a left shift ? because th=
e
> LSB specifies writing or reading
>
> 2- difference between logic levels. obviously atmega16 works with 5V, but
> ov7670 I/O voltage is 1.7 to 3V. i am using 2.6V for sensor
> know what happens to I2C between mega16 and ov7670?
> should i connect the I2C pullup resistors to 5V or 2.6V? (i had connected
> it to 5V)
>
> my circuit is simple. only SDA and SCL of OV7670 and ATMEGA16 are connect=
ed
> and a 4.7K pullup resistor on each line
>
> thanks
>
> --------------------------------------- =A0 =A0 =A0 =A0
> Posted throughhttp://www.EmbeddedRelated.com

Hi, you need to define what would be use for the image sensor in your
project.

If it is =93simple=94 image =93analysis=94, low res. 8bit (color tracking,
object tracking). Then you should look on Internet for a serial output
CMOS image sensors with optics(as they are used in robotics). If there
is need for =93high=94 image analysis, then AVR will not do the trick. For
that purpose, you should chose device with image sensor =93port=94(on some
Atmel ARM7 devices, high end). By using more =93advanced=94 ARM you will
get a memory flash controller, may came in handy =3D)

For simple stuff, I would recommend that you first use newer devices
from Atmel, with a picoPower technology enhanced (something like
Atmega644pa, expensive).With that device you will have no trouble with
voltage difference (you will have to power your image sensor from
2,85V). First, try to get I2C communication going with some memory IC
of temp. sensors.

Use Internet, read, build, read, build, read, build, read, ...
Be assured that soon you will be in a loop of choices :)

Consider ARM Cortex-M3 devices...

Best regards

P.S. Use search on this group ;)
0
Matej
8/19/2010 1:31:15 PM
In article <2_qdnQpQDtzFYPHRnZ2dnUVZ_gydnZ2d@giganews.com>, 
spman_xm@n_o_s_p_a_m.yahoo.com says...
> 
> thank you Paul
> 
> what is your opinion about an at91sam7x256? if i use it to connect to
> sensor, need to shift voltage level yet? (i don't have any FET in present
> time ...)	   

Not looked at the processor so I have no idea what it does.
You have looked ta its datasheets I take it.

To connect the I2C/SCCB of any processor and and I2C device
including the Omnivision sensor, you will have to make sure
the voltage levls and clock speeds are right.

If you cannot directly match the voltage levels then you
will have to put some form of (voltage) level translator
in.

0
Paul
8/19/2010 2:59:35 PM
Reply:

Similar Artilces:

Embedded I2C Contract Job
Taking bids for writing of firmware such that 10 bit readings from 8 capacitors can be taken by each or any of 5 AD7143 Capacitance to Digital Converters, sent to a PIC18F2455 (currently onboard a UBW BitWhacker), which can be easily and quickly read by a computer via USB. All of the AD7143 CDCs have the same 7 bit fixed address, so they will each need their own input port on the PIC. I'd like to keep it on the UBW if possible for easier prototyping. Please write with any questions or for more specifics and relevant spec sheets. ------------------------------------...

Omnivision OV7640 SCCB (I2C?) bus problem
Hello, I am hoping someone can assist me with the SCCB (I2C?) bus of an Omnivision OV7640 image sensor. I am unable to get the OV7640 to respond to commands on the SCCB bus. Preliminary : I have connected the OV7640 to a SRAM, and feed VSYNC and HREF to an Altera 7032S CPLD which controls and address counter and the SRAM. I can successfully capture an image frame, and transfer it (slowly) over RS232 to a PC. If I treat each pixel as a luminance value, I get a good monochrome photograph, 640 x 480. I find this surprising, since I was expecting bayer encoded data. Looking at (on the data...

Embedding Python in an embedded system
Howdy. I'm looking at embedding python in a little embedded system. The device (a linksys wrt54g router, popular hack object since it runs linux), has limited resources. Just 4MB flash and 16MB memory. I'm interested in Python because I need to be more agile with developing an application for this platform. Currently I am using C++ but it takes just too much time to develop/debug code. Does anyone have experience doing something like this? S. Stefan Arentz wrote: > Howdy. > > I'm looking at embedding python in a little embedded system. The device > (a linksys wr...

ARCH
Hello, I'm trying to estimate a VAR model of two equations. - the portmanteau test shows that my residuals are cross correlated - one of my equation exihibit an ARCH pattern I cannot use the AUTOREG procedure as I have a system of equations to estimate. I cannot use the VARMAX procedure because it is not possible to impose an ARCH structure for one equation only. I guess I should opt for the proc MODEL. I think I can program it. The problem here is how to check that my model is the right one ? Do you know how to generated the diagnotic checks given by the Pro c VARMAX with the proc Mo...

Embedded BerkeleyDB vs. Embedded MySQL
Does any one know Embedded Berkeleydb's performance vs. Embeded MySQL's. ? Any idea would help. Thanks a lot. ...

Embedded vs. Non-embedded Tests
As far as I know, Facets is the only large project that uses embedded unit tests. The tests are housed in block comments, eg. =begin test ... =end I have a command line tool that can run the embedded test directly. For deployment, I have another tool that extracts all the embedded tests and copies them to stand-alone test/ files so others can run them. It works fairly well. And the advantage of course is that the unit tests are right there with the libs they test. However, considering that just about everyone else is putting units test in their on test files, I'm wondering if I...

SES-2 over I2C == multimaster I2C?
Dear Everyone, while investigating the theoretical background of some recent SuperMicro SAS backplanes with the AMI MG9072 enclosure management processor, I've ended up with the following unanswered question: it would seem that "enclosure management over I2C", as specified in the SATA 2.5 spec, implies the use of multi-master I2C. The host PC or the RAID controller effectively sends a SCSI command encapsulated in I2C to the enclosure backplane processor (I2C write transaction), then the backplane processor and the host machine switch roles on the I2C bus, and the backp...

embedding
How do we embed stuf like blogs or video into our websites. Thanks On 14 Aug 2010, teak <teak@linuxmail.org> wrote: > How do we embed stuf like blogs or video into our websites. > > Thanks Read-up on it, then do it. 'Welcome. -- Neredbojias http://www.neredbojias.org/ http://www.neredbojias.net/ teak wrote: > How do we embed stuf like blogs or video into our websites. > > Thanks That question is rather vague. Can you describe what it is that you're actually trying to do in a bit more detail? In article <i49m9v$cn7$1@n...

embeded
Has anybody experience to develop embeded application in Oberon? Or may be place links here please. > Has anybody experience to develop embeded application in Oberon? > Or may be place links here please. www.xo2.org, there are some nice little robots here and there running with this embedded version of oberon. Kind regards Sjur J. Vestli ...

Embedding
Hi, I'm having a bit of trouble trying to script my application using Python. I have created classes that I can use in C++ and I have created Python objects from those classes using SWIG and they're working just perfectly. However, I have no idea on how I can actually pass these back and forth when I call my scripts from C++. Ideas anybody? Please... ...

is Embedded Matlab (Embedded C) dependent on MCR
Hi, I was reading about Embedded C and the features that it provides. However, I am wondering, will the C code generated still be dependent on Matlab software to run? i.e Could I use the C code generated and run it on a different machine that does not have Matlab installed? Thanks. "S " <ppk664@my.utsa.edu> wrote in message <i51d41$r$1@fred.mathworks.com>... > Hi, > > I was reading about Embedded C and the features that it provides. However, I am wondering, will the C code generated still be dependent on Matlab software to run? i.e Could I use the C c...

Embedded
Hi everyone, You see i have a JTextPane and in this JTextPane there are embedded JComponents. I embbeded 3 JTextPanes in this 1 JTextPane. Let's a say how can i get the JTextPane which the user clicks with the mouse. ps. You guys can leave out the mouse listener part Yours Sincerely Richard West ...

Embedded
Suppose you have requirements for a basic embedded system such as a few digital I/O, analog I/O, RSxxx communication links, alphanumeric LCD, etc. The usual way is to select a microcontroller with the required I/O and based on the complexity some amount of RAM and ROM. You often choose a microcontroller from a family you are familiar with. You then select an OS or no OS, depending on the requirements. If you decide to write the code in Ada, how do you know there will be a compiler that will target the microcontroller? Do you have to ask every vendor or is there a list of supported CPU for ...

firmware, embedded software, embedded system concepts
I want to understand more on firmware, embedded software, and embedded systems. My understanding is that firmware has programming instructions burned in a chip, which is a ROM? And once we burns it, the information is read only. For example, the chip inside smart card is a firmware?? Embedded software consists of more than one firmware?? Embedded system is a computer system in large hardware devices, and it consists of embedded software? For example, microwave, network devices, etc? I tried to find more information on the web, but couldn't find clear explainations on the basic conce...

I2C
hi, i am working with philips microcontroller LPC935 which is to be attached to I2C port expander. i have to write a code for this .As my device is configured as master receiver to read (i have to read only) the value or status of port pins . my question is that : Do i need to check for all 25 states of I2C bus from status register for my operation ? abhay wrote: > hi, > i am working with philips microcontroller LPC935 which is to be > attached to I2C port expander. > i have to write a code for this .As my device is configured as master > receiver to read (i have to read onl...

Distiller 6 fonts embedded or subset embedded
I have a problem with fonts in Acrobat. It works just fine but one thing is "bugging" me. If a customer sent me a PDF and the proofs come back to me with just a little typo-change, I cant change it. I tried with Pitstop and Acrobats own tools for this. (touch-up). Everytime (except for Arial and more common types) Acrobat says that the font can not be changed, unless I put the font in question in my system. It doesnt matter if I choose to distill with all of the fonts and uncheck the subset-option. What am I doing wrong? Is there a way around this? Its really embarresing to ask th...

embedding
I have been trying to transform the vector x(1:n) in a matrix whit this columns x(1:n-E)' x(2:n-(E-1))'........x(E:n)' how does it possible to write in matlab code i have been trying E = input('embedding dimension') l=length(x);%x(n)=vector that i want embedding for e=1:E; for ix=1:E; V(:,ix)=x(ix:l-(E-e))'; end end but did not go Thx anz wrote: > I have been trying to transform the vector x(1:n) in a matrix whit > this columns > x(1:n-E)' x(2:n-(E-1))'........x(E:n)' how does it possible to write > in matlab code i ...

embedding?
I've written some simulators in C that use Tcl and custom commands as an embedded debugger language. Tcl works OK, but I don't like the language very well. It's simple, but not very elegant Ruby looks like a much better language. Is there any documentation or example code showing embedding Ruby in a C program? A Google search turns up some C++ stuff, but it didn't seem very helpful. Is it possible to create multiple independent Ruby interpreter contexts? Thanks, Eric [If you want to reply by private email, please remove the obvious spam-proofing from my email address.] ...

[News] More Support for Embedded Linux from Embedded Alley
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Linux SDK straddles DIY, commercial approaches ,----[ Quote ] | Linux professional services and consulting firm Embedded Alley (EA) is edging | into the embedded Linux tools business with its own software development kit | (SDK). EA's "Embedded Alley Development System for Linux-based Devices" | combines open-source software and services, and "facilitates build and | integration of in-house and third-party commercial software," says EA. `---- http://www.linuxdevices.com/news/NS7281240851.html Linux devices gain m...

Embedded
Free videos, humor, comedy,extreme clips, features to upload, share, rate and watch videos,comment on your favorites www.cheezyclips.com ...

UK Embedded Masterclass
Hi, just a quick note to let you know that we are running another Embedded Masterclass - it is in London and but to be repeated in Bristol (8th and 13th May). For those of you that have never attended, its a non- sales forum to learn about the latest and greatest stuff. This year will include presentations on 'realtime' linux, farming dsp's in high end systems, software timing analysis, time triggered design... the presentation ate technical.. so no sales pitch. There are over 20 vendor engineers with tabletops for demo's and discussions. Also - there is an Embedde...

Devantech USB-I2C R286-USB-I2C board
Hello, I bought the Devantech USB-I2C R286-USB-I2C board. The Devantech USB- I2C module is a low cost USB to I2C module, with a simple command set, and interfacing to any I2C device. I'm trying to set the I2C interface between my I2C board and R286-USB-I2C? Also I do need a help in User Interface development for Microsoft Windows. It should be similar to your USB_I2C_SRF08.exe software but modified differently. Thanks in advanced for any help, Regards, Michael ...

RTOS/Embeded Linux / Driver Embedded Senior Engineer
RTOS/Embeded Linux / Driver Embedded Senior Engineer Job Category: Engineering - Embedded City: Richardson, Texas Job Description: The strong Embedded SWE will be a member of the embeded software team. Essential skills: Embedded C Programming Structured software development Interrupts, multithreading, state machines Working with legacy code Familiarity with the following is desired: ROT/Embeded Linux MIPS and ARM Real-time operating systems VOIP, TCP and Kernal software development Qualifications: BSEE/CS or equivalent and 10+ years of experience in system software des...

I2C high speed mode and I2C range extending
Hi - are there any microcontrollers out there that support I2C high speed mode? (3.4Mbps - defined in the I=B2C-bus specification, Version 2=2E0). I can't find any that do. I can't even find any NXP parts that do! Also - has anybody ever used an I2C bus extender chip? (ie the NXP P82B715). What was your experience with it? Are there any that can handle higher speeds that that one? (1Mbps+) Thanks! -Michael Michael wrote: > Hi - are there any microcontrollers out there that support I2C high > speed mode? (3.4Mbps - defined in the I�C-bus specification, Version > 2.0). I ca...

Web resources about - sccb(I2C) for ov7670 - comp.arch.embedded

Aliexpress.com : Buy high quality UNO R3 MEGA328P for Arduino UNO R3 NO USB CABLE UNOR3 from Reliable ...
Find More Other Electronic Components Information about high quality UNO R3 MEGA328P for Arduino UNO R3 NO USB CABLE UNOR3,High Quality shipping ...

Connect OV7670 to Arduino UNO
The following schematic diagram show a basic camera based system. The camera module is powered from a single +3.3V power supply. An external ...

proglang__1 - Free Open Source Codes - CodeForge.com
proglang__1 Search and download proglang__1 open source project / source codes from CodeForge.com

$10 camera module for your next FPGA project
Here is [Voelker] showing off his FPGA-based camera hardware. He picked up an ov7670 camera on eBay for about $10 and set to work pulling pixels ...

Cameras
Cameras

I Can See Clearly Now: Add a Camera to Your System - EE Times
You can give your system the power of sight by adding an 8-bit camera, controlled by a configurable timing mechanism, to your design.

Camera Equipment on Tindie
Tindie is a marketplace for maker made products. From Raspberry Pi to Arduino to drones, Tindie's goal is to bring innovation to the masses faster ...

LOGi-Cam
... specifically make video applications with the LOGi-Boards a snap. The LOGi-Cam PCB allows for a plug and play experience with the OV7670 or ...

Instrument-Based Color Sonification using the PIC32 Microcontroller
Sonification is the process of turning a collection of data into something that humans can hear. A common implementation is to map color, motion, ...

TheRandomLab: About
Menu Blog About Contact About We are a team of creative designers providing consultancy and development of interactive installations, visual ...

Resources last updated: 2/17/2016 1:50:14 PM