View previous topic :: View next topic |
Author |
Message |
ortegahernandes
Joined: 14 Feb 2020 Posts: 23
|
I2C velocity |
Posted: Fri Jan 08, 2021 8:18 am |
|
|
I have an i2c device that supports 1 MHZ, 400 KHz and 100 Khz.
It is an F-ram memory, the equipment will be a data logger so I need quick and constant recordings in the memory.
The speed of 100 Khz doesn't suit me, but the speeds of 400 KHz and 1 MHz do.
Is there any advantage to using 400 Khz instead of 1MHz in relation to noise?
Because this equipment will work in a known noisy environment ... (electrical panel). |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19552
|
|
Posted: Fri Jan 08, 2021 8:39 am |
|
|
400KHz, is the maximum you will be able to do.
Speeds above 400KHz, require active pull-ups.. Not simple resistors.
Provided you keep the bus short, and have a good pull up value, 400K can
be totally reliable. However (obviously), it takes a shorter spike to give a
data error at this speed than at 100KHz. So make sure you use the lowest
pull up value the devices support (probably about 1KR assuming 3.3v),
keep the bus short, and have a good ground plane. Do everything you can
in the board design, to reduce the likelyhood of noise. |
|
|
ortegahernandes
Joined: 14 Feb 2020 Posts: 23
|
|
Posted: Fri Jan 08, 2021 6:21 pm |
|
|
First of all thanks for responding.
And for remembering that I could "tighten" Pull Up (which was in 3K3) ...
The hardware (PCB) is already ready, has a ground plane on both surfaces, the components are not far from the micro and are isolated on the ground plane, moreover it goes in a semi-closed metal dock.
At the input of the power supply it has an LC filtering in the 12V line and double LC filtering in the 3.3V line and in both voltages it has a TVS diode, as and an MOV in the 12 line.
The digital inputs are opto-coupled ....
with a cut in the PCB separating the two parts ... the project has already been thought of in this scenario.
Almost everything is already programmed.
The interesting thing is that I tested it with 1 Mhz and even with 2 MHz and it was still working (on bench).
#use i2c (master, sda = EEPROM_SDA, scl = EEPROM_SCL, stream = Memory, fast = 1000000).
For a little more rigorous testing.
With 1 MHz I connected a small motor 0.5Cv 220Vac and an electric contactor, wrapped the wires of the motor and contactor power in the PCB (giving two turns) and there was no failure in the memory or in the micro .....
But I will definitely use 400Khz.
The component in question (CY15B064J) supports 1K pull-UP
(RPmin = (VDD - VOLmax) / IOL)
(3.3-0.4 / 0.003)
And the micro used is a dspic33ch128mp506. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19552
|
|
Posted: Sat Jan 09, 2021 2:23 am |
|
|
The issue becomes guaranteeing the faster rise times. Getting these
reliable at the faster rates becomes harder and harder. Speeds like
600 or even 800K are quite commonly achievable, but that you could get
over 1MHz is amazing. Suggests the lines have very nice low capacitances. |
|
|
|