RTCC and EEPROM on same I2Bus

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

RTCC and EEPROM on same I2Bus

Post by stefan.erni »

Hi Ben

I have a RTCC and an EEPROM on the same I2C BUS. The RTCC is working, but the EEPROM not.
The program is hanging if I read or write to the EEPROM.

A little confusion are the Pin from the EEPROM compare to the RTCC.
Why are the remaping pin there? and why only port C0 - C7 and B0-B7 if I choose "software"?
eeprom.PNG
(17.35 KiB) Downloaded 1690 times
RTCC.PNG
(14.06 KiB) Downloaded 1690 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: RTCC and EEPROM on same I2Bus

Post by Benj »

Hello,

Please can you post your program file and I will investigate what's going on for you.

The Remap pins are the hardware remap pins and should only be shown for hardware channels. When using a software channel you should be able to edit the SCL/SDA pins directly.

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

Re: RTCC and EEPROM on same I2Bus

Post by stefan.erni »

Hi Ben

The program send numbers to the uart. It's working for the rtcc ....

Later I need a MPU9250 at the same I2C bus , but it gives a lot of errors ....


regards

Stefan
Attachments
Fc8_ecg test_1.fcfx
(62.37 KiB) Downloaded 205 times

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

Re: RTCC and EEPROM on same I2Bus

Post by stefan.erni »

Hi Ben

To read and write to the EEprom is not working. The program is "frezing" if I read or write. The same I2C bus I use for RTCC. This working.

There is a strange menue in the EEprom config pin (see in the picture) how can I solve it?


Stefan

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

Re: RTCC and EEPROM on same I2Bus

Post by stefan.erni »

Hi Ben

There is a MPU9250 on the bus too.
small problem to init the MPU9250. I get this error...

C:\Users\KFS-FO~1\AppData\Local\Temp\ccLUv0yh.o: In function `FCD_0c141_MPU9250_AccelGyroMagnet1__Initialise':
Fc8_ecg test_1.c:(.text+0x4e28): undefined reference to `FC_CAL_I2C_Master_Init_7'
collect2.exe: error: ld returned 255 exit status
C:\Program Files (x86)\Flowcode\Common\Compilers\pic32\bin\xc32-gcc.exe reported error code 255

Stefan

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

Re: RTCC and EEPROM on same I2Bus

Post by stefan.erni »

Hi Ben

Tho good news is that the MPU9250 is working now
But the EEprom is not jet working.

It gives some errors

C:\Users\KFS-FO~1\AppData\Local\Temp\ccBNKKCj.o: In function `FCD_06dd1_serial_eeprom1__Read':
Fc8_ecg test_1.c:(.text+0x4a88): undefined reference to `FC_CAL_I2C_Master_Init_7'
Fc8_ecg test_1.c:(.text+0x4a90): undefined reference to `FC_CAL_I2C_Master_Start_7'
Fc8_ecg test_1.c:(.text+0x4a98): undefined reference to `FC_CAL_I2C_Master_TxByte_7'
Fc8_ecg test_1.c:(.text+0x4aa0): undefined reference to `FC_CAL_I2C_Master_TxByte_7'
Fc8_ecg test_1.c:(.text+0x4aa8): undefined reference to `FC_CAL_I2C_Master_TxByte_7'
Fc8_ecg test_1.c:(.text+0x4ab0): undefined reference to `FC_CAL_I2C_Master_Restart_7'
Fc8_ecg test_1.c:(.text+0x4ab8): undefined reference to `FC_CAL_I2C_Master_TxByte_7'
Fc8_ecg test_1.c:(.text+0x4ac0): undefined reference to `FC_CAL_I2C_Master_RxByte_7'
Fc8_ecg test_1.c:(.text+0x4ac8): undefined reference to `FC_CAL_I2C_Master_Stop_7'
Fc8_ecg test_1.c:(.text+0x4ad0): undefined reference to `FC_CAL_I2C_Master_Uninit_7'
C:\Users\KFS-FO~1\AppData\Local\Temp\ccBNKKCj.o: In function `FCD_06dd1_serial_eeprom1__Write':
Fc8_ecg test_1.c:(.text+0x4b00): undefined reference to `FC_CAL_I2C_Master_Init_7'
Fc8_ecg test_1.c:(.text+0x4b08): undefined reference to `FC_CAL_I2C_Master_Start_7'
Fc8_ecg test_1.c:(.text+0x4b10): undefined reference to `FC_CAL_I2C_Master_TxByte_7'
Fc8_ecg test_1.c:(.text+0x4b18): undefined reference to `FC_CAL_I2C_Master_TxByte_7'
Fc8_ecg test_1.c:(.text+0x4b20): undefined reference to `FC_CAL_I2C_Master_TxByte_7'
Fc8_ecg test_1.c:(.text+0x4b28): undefined reference to `FC_CAL_I2C_Master_TxByte_7'
Fc8_ecg test_1.c:(.text+0x4b30): undefined reference to `FC_CAL_I2C_Master_Stop_7'
Fc8_ecg test_1.c:(.text+0x4b38): undefined reference to `FC_CAL_I2C_Master_Uninit_7'
collect2.exe: error: ld returned 255 exit status

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: RTCC and EEPROM on same I2Bus

Post by Benj »

Hello,

It sounds like you have 7 instances of the I2C CAL component in your program. Are you using all 7 or can you maybe get rid of some unused components. Remember to check both panels for lurking components. The drop down list at the top of the properties window and the components tab of the project explorer window can also be very useful.

If you do need at least 7 I2C type components in your project then let me know and I will add more instances to the CAL caller code.

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

Re: RTCC and EEPROM on same I2Bus

Post by stefan.erni »

Hi Ben

Yes that was the problem. I can turn off some for the moment.No more errors. Thank you..
But still the eeprom is not read or write. Its freezing.

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: RTCC and EEPROM on same I2Bus

Post by LeighM »

Could you try the "Stop Delay" = "Yes" for the EEPROM?

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

Re: RTCC and EEPROM on same I2Bus

Post by stefan.erni »

Hi Leigh

I tried Stop delay yes and no .... both let it frezze

Post Reply