Hello,
I have hopefully now found and fixed the problem and increased the cap from 20 to 32768 which should hopefully be plenty.
Also applied to SPI and UART based components.
I2C can not read more than 20 data in one time
-
- Matrix Staff
- Posts: 1952
- http://meble-kuchenne.info.pl
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 510 times
- Been thanked: 698 times
Re: I2C can not read more than 20 data in one time
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Posts: 217
- Joined: Thu Sep 23, 2021 3:44 pm
- Location: France
- Has thanked: 35 times
- Been thanked: 26 times
Re: I2C can not read more than 20 data in one time
hi,
Is it possible to write 2 values to 2 different address with only one transaction write ?
for example: write 0x2F to 0xF4 address then Write 0x24 to 0xF5 address
thx for your prompt reply
Is it possible to write 2 values to 2 different address with only one transaction write ?
for example: write 0x2F to 0xF4 address then Write 0x24 to 0xF5 address
thx for your prompt reply
Seb
-
- Valued Contributor
- Posts: 1628
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 142 times
- Been thanked: 761 times
Re: I2C can not read more than 20 data in one time
Glad the i2c read now working..
I don't think you can do two writes in this way - i2c needs a start and stop event - and then the second device could be written too - again needs a start event etc..
Probably need to Initialize the first transaction - write to 1st device then a second transaction initialize (which just sets the device address) before writing to the second.
Martin
I don't think you can do two writes in this way - i2c needs a start and stop event - and then the second device could be written too - again needs a start event etc..
Probably need to Initialize the first transaction - write to 1st device then a second transaction initialize (which just sets the device address) before writing to the second.
Martin
-
- Posts: 217
- Joined: Thu Sep 23, 2021 3:44 pm
- Location: France
- Has thanked: 35 times
- Been thanked: 26 times
Re: I2C can not read more than 20 data in one time
I'm talking for same device but at 2 different register addressIs it possible to write 2 values to 2 different address with only one transaction write ?
for example: write 0x2F to 0xF4 address then Write 0x24 to 0xF5 address
Seb
-
- Valued Contributor
- Posts: 1628
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 142 times
- Been thanked: 761 times
Re: I2C can not read more than 20 data in one time
Depends on the device in that case - but again I'd doubt it - unless the addresses are consecutive.
Many devices allow multiple writes in a single operation - send an array of data and it will be written to consecutive addresses. However, if you want to write to two distinct separate addresses then the device will expect another start address sequence. The new address would be treated as data if included in a single block. See the datasheet for the device you are using.
No need to call transaction initialize again though.
Martin
Many devices allow multiple writes in a single operation - send an array of data and it will be written to consecutive addresses. However, if you want to write to two distinct separate addresses then the device will expect another start address sequence. The new address would be treated as data if included in a single block. See the datasheet for the device you are using.
No need to call transaction initialize again though.
Martin
-
- Posts: 217
- Joined: Thu Sep 23, 2021 3:44 pm
- Location: France
- Has thanked: 35 times
- Been thanked: 26 times
Re: I2C can not read more than 20 data in one time
hi,
It tried I²C multiple byte write (not auto-incremented) and it work well. address 1 to write is the 1st byte of AddressToRW and data is the 2nd byte
address 2 to write is the 3rd byte of AddressToRW and data is the 4th byte
auto-increment is not working with my device
It tried I²C multiple byte write (not auto-incremented) and it work well. address 1 to write is the 1st byte of AddressToRW and data is the 2nd byte
address 2 to write is the 3rd byte of AddressToRW and data is the 4th byte
auto-increment is not working with my device
Seb