Re: Procyon Library for Atmel AVR MCU - I²C problems





Rüdiger wrote:

First of all: Thank you for the code!

Your "thank you" is very valuable. You don't have to thank; the check for $100 will be just all right for many cases.

The reason why I use the Procyon-Library is because I shall use it - for
following projects will use more and more of it's functions - and it's
deemend unnecessary that I - literally - re-invent the wheel with all the
functions that will be needed with future projects.

A very naive idea. Nothing will work properly unless you understand the hardware in the every detail. Othewise you will be fighting with the strange problems at all time. AVR is the simplest CPU; it doesn't take much effort do to whatever can be done with it.

I'll first of all will use your code to check that the sensor is working -
and then I'll dig into the I2C libraries of the procyon-libraries and try
to compare and understand what is happening.

First of all you should open the AVR data*** and read the chapter about the I2C interface.

One thing I don't understand for example is why, when I want to transmit a
single databyte, I have to use a pointer instead of the actual variable, or
even if I want to read data fro man array I have to use a pointer instead
of simply incrementing through the arrays field.

Read the manual.

I learned programming on TI Basic,

Basic is worseless. It is a dead end. Learn C/C++.

I'll try your code tomorrow

Why waiting till tomorrow?

to see if the sensor is talking with me,

If the sensor talks to you, you'd better check with a doctor.

and
then I'll hook up the osscilloscope and the analyzer and compare what the
two programs are doing differently.

Read the manual.



Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com

.


Quantcast