Receiver with built-in ARM I2C of incorrect data

Hello together

For a school project, I have to finish up next week, I need to read a RealTimeClock DS1307 via I2C.

I use a LM3S8962.

I tried to communicate via the NI USB-8451 module, which works great.

Now, I just read the data from the DS1307 and I used the built-in ARM I2C live. I get data, but the data is not correct (for example, it displays a value of 70 in the second register, which is not possible).

I tried a lot of things, but I couldn't make it work properly.

Attached a screenshot of how I implemented the reading of the I2C. What I am doing wrong? I really need to get this work otherwise I can't finish my project and this unfortunately causes a bad brand I hope that someone can help me.

Greetings from Switzerland

Dominic

Hi doh.

are you sure you read from the registry of law?

According to this datasheet: DS1307.pdf .

If you want to access the registry seconds we address 0 (Hex-value-0), in your screen shot his 68 decimal. You can change the representation of your constant which is connected to the terminal of the address of your create the Configuration VI reference. Just right click your constant-> visible object-> Radix. After this, you can change its representation to x (HEX).

In addition, when you read the 7 bits that are casted to unsigned 8 bit you have to notice that the 7 bits are coded as the BCD code.

So consider your example of reading the value in binary way 70: 70: 100110 with ILO the most significant on the left and the least significant bit on the right side. Now when divide you the values according to the seconds in the table of technical data sheets:

| 0 | 1 0 0 | 0 1 1 0

Then you will see, 70 as U8 has value: 0110 = 6 (last 4 bits) and 100 (average 3 bits) = 4, which means that your real value is not 70, but 46.

So I would say, you must convert the value of U8 to an array of Boolean, divide the bits according to the table mentioned in the manual and then convert them timely.

Hope this helps, if you have any other questions just after.

Kind regards

Lam

Tags: NI Software

Similar Questions

Maybe you are looking for

  • ZumoCast and Bionic files not supported.

    ZumoCast is installed on my Win7 PC and my Bionic. I see most of my a lot with the Bionic files but when I try to view the files in the player the screen goes all black, as it tries to read the files but nothing ever happens. Then when I press the ba

  • HP photosmart 110 prints not after setting in motion

    I have a hp photosmart 110 and we moved and set up the computer to the top in the same way but now nothing will print. Windows screens tell print but the printer queue shows all of my documents? How can I get both printing is complete?

  • Can I use Paint to change the color of the text in a jpeg file?

    That covers it pretty well.  Also, can I put a background color in without the text being covered?

  • Backlight bleeding U2413 Acceptable?

    I have a U2410 with a warranty exchange for 5 years and has recently developed a black streak running on a diagonal across the middle. I have contacted Dell about this and sent them pictures. They approved the Exchange, and subsequently, I received a

  • auto-increment by alpha order

    Hi allI want to auto increment based on the groups recordings.I have data like below----------------------------------------------------Area ID Extender--------------------------------------------------BA1 100BA1 120BA1 130GB1 190TC1 178TC1 193DX1 10