Hi, I bought Nano Every Clone with Atmega 4808, installed the Thinary Nano Every board in IDE and struggled to get the I2C LCD display to work a lot. After inspecting Atmega 4808 documentation I found out there are multiple I2C pins, one on A4, A5 pins, one on D4, D5 pins, after switching the display to D4 and D5 everything worked miraculously. No word about this in pinout documentation, can this be switched to A4 and A5 pins somehow?
installed the Thinary Nano Every board in IDE
How did you do this? Are you using the MegaCoreX board package or is there some other board package which supports this device?
As you have found, the default pins for the wire bus are D4(PA2) and D5(PA3).
Some of what you can do to change pins is dependent upon whether the Thinary Nano is a master or a slave.
struggled to get the I2C LCD display to work
This requires the Thinary Nano to be a master and you are not going to be able to switch pins to A4 and A5.
In the case of a master, as far as I know from review of the 4808 data sheet and MegaCoreX documentation, the only pin swap available is to SDA on pin 13(PC2) and SCL on pin10(PC3).
However, with this pin swap the 4808 can be a slave on A4(PF2) and A5(PF3).
This is from the data sheet
Bits 5:4 – TWI0[1:0] TWI 0 Communication
Write these bits to select alternative communication pins for TWI 0.
Value Name Description
0x0 DEFAULT SCL/SDA on PA[3:2], Client mode on PC[3:2] in dual TWI mode
0x1 ALT1 SCL/SDA on PA[3:2], Client mode on PF[3:2] in dual TWI mode
0x2 ALT2 SCL/SDA on PC[3:2], Client mode on PF[3:2] in dual TWI mode
0x3 - Reserved
How did you do this? Are you using the MegaCoreX board package or is there some other board package which supports this device?
I installled Thinary AVR Boards (GitHub - Thinary/ThinaryArduino: Thinary Development Board for Arduino) in the board manager in IDE.
My idea was if it's a problem of the Thinary board github code it can be swapped for the A4 and A5 pins but I have no idea how this all works. I saw many people having problems with I2C whether it's the original or clone Nano Every.
the only pin swap available is to SDA on pin 13(PC2) and SCL on pin10(PC3).
It's so annoying it's not mentioned anywhere that the default pins for I2C here are not A4 and A5 as on regular Nano or Uno.
In my case of driving LCD over the I2C I don't have much choice master and slave wise and will stick to D4 and D5 for now, thanks a lot!
I did find the Thinary 4808 board package and took a look at it.
It is not as full featured or well documented as MegaCoreX and I would recommend that you use that board package instead.
The Thinary Nano Every has not been a very successful product, and I don't think it is currently available. You may want to consider switching to an Arduino Nano Every for a product with better support going forward.
The i2c pins are on A4 and A5 in the Arduino Nano Every
Are you sure? The way that I interpret that part of the datasheet is that the "client mode" part only applies when the TWI interface is in "Dual TWI" mode (Whatever that is), but for normal TWI, you should be able to use any of the alternate pins.
Correct, but the alternate pins would appear to be:
0x1 ALT1 SCL/SDA on PA[3:2] SDA on pinD4 (PA2) and SCL on pinD5(PA3).
0x2 ALT2 SCL/SDA on PC[3:2] SDA on pinD13(PC2) and SCL on pinD10(PC3).
The OP was wondering if the wire bus could be on A4 and A5 like in the Nano Every and classic nano products.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.