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.
Reply by Mate...@OS|SB●August 19, 20102010-08-19
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 ;)
Reply by spman●August 19, 20102010-08-19
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
Reply by Paul●August 18, 20102010-08-18
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.
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