You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is this because of not being supported by the new D21G topboard at all, or is it just not supported this way (as the comment states it)?
1. If it is not supported by the D21G at all, why not just conditionally exclude or include setting the TWBR (using e.g. the ARDUINO_AVR_IND1286 and alike symbolic constants)?
2. If it is not supported in the previously used, hardcoded way, may I propose the following:
According to documentation about the "Two Wire Interface and the Wire Library" (see here for example), the TWBR / Two Wire Bit Rate should be generated as follows:
TWBR = ((CPU_FREQ / TWI_FREQ) - 16) / 2
The Atmega32u4 and AT90USB1286 both run with 16 MHz, so according to the formular above, as well as the hint about "400 kHz" (I assume clockspeed / twi frequency) in the original Indio library sources, this comes down to a TWBR of 12, as it indeed is hardcoded in the original sources.
Unfortunately, I did not yet find the time to set up an Industruino using the new topboard, so I am currently unable to test it. But maybe this is something you guys might want to try for yourself (unless my thoughts are complete nonsense).
The text was updated successfully, but these errors were encountered:
In the original Indio lib sources, "I2C Fast Mode" is used during
IndioClass::analogRead
.It is commented out in the current current codebase.
Is this because of not being supported by the new D21G topboard at all, or is it just not supported this way (as the comment states it)?
1. If it is not supported by the D21G at all, why not just conditionally exclude or include setting the
TWBR
(using e.g. theARDUINO_AVR_IND1286
and alike symbolic constants)?2. If it is not supported in the previously used, hardcoded way, may I propose the following:
According to documentation about the "Two Wire Interface and the Wire Library" (see here for example), the TWBR / Two Wire Bit Rate should be generated as follows:
The Atmega32u4 and AT90USB1286 both run with 16 MHz, so according to the formular above, as well as the hint about "400 kHz" (I assume clockspeed / twi frequency) in the original Indio library sources, this comes down to a
TWBR
of 12, as it indeed is hardcoded in the original sources.According to the Tech. Details enlisted in the Industruino shop, the ATSAMD21G16 runs at 48 MHz, so, while maintaining the
TWI_FREQ
of 400 kHz, theTWBR
should be:Unfortunately, I did not yet find the time to set up an Industruino using the new topboard, so I am currently unable to test it. But maybe this is something you guys might want to try for yourself (unless my thoughts are complete nonsense).
The text was updated successfully, but these errors were encountered: