• 0

LINX and Pmod RTCC Code


Question

Hi all, I have been stuck on this code for awhile now and i don't know why it shows error 5000. I have attached the image of my code.
I2C communication are fine when I use it with Pmod TMP3 (code runs fine).

In the code I used both SRAM and EEPROM. Maybe that is wrong but I tried using just one but it does not work.  Same error. This file is for 'write', in hope to write out the time and move it to the read file.

Any sort of help will be greatly appreciated.

Screenshot (130).png

Edited by Idelle
Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hi @Idelle,

I'm not sure what the issue might be; from what I recall error 5000 is a mostly undefined error in LINX.

That being said, it looks like you are just sending a write command to the EEPROM on the Pmod RTCC with it's appropriate control byte, not waiting for an acknowledge bit (I'm not sure if the LINX I2C Write VI looks for the ACK bit automatically or not, maybe it does), and then attempting to send a write command with the SRAM control byte. You are not providing an address after the write EEPROM command.

In your write to SRAM, the data you are providing (guessing based on the time -> binary VI in your block diagram) does not match the memory map layout that is detailed in Table 5-1 of the MPC79410 datasheet (link). The datasheet also details that the IC will not generate any EEPROM acknowledge bits if an internal programming cycle is in progress.

I would probably recommend reading through sections 4, 5, 6 of the MCP79410 datasheet to determine the correct data that you need to write as well as removing the EEPROM write command; hopefully nothing as been corrupted as there is no hardware protection pin and you did not enable the software write protection for EEPROM (detailed further in sections 5.2.1 and 6.2.3 of the datasheet).

Thanks,
JColvin

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now