Hallo
I found here a sketch online which makes the use of Uno's comparator at pins 6,7 and gives output to pins 7,8.
I would like to use the same but by using a nano board instead. What are the correct pins for AIN0 and AIN1 in a nano board? Should i use the same pin numbers as in an UNO board? At this diagram Arduino Nano Every Pinout and Specification - devboards.info shows pins 16 and 17 as AIN1 and AIN0. Is that correct? What do i need to do so to make a succesfull nano usage?
The Nano Every uses a different chip to Uno. It probably has similar features, but not only will the pins be different, but there's a very good chance the code will need to be changed also.
You need an expert on the Nano Every's chip to help you with this. I will move this topic to the forum section dedicated to Nano Every.
There are bigger issues with migrating the Uno sketch to the Nano Every beyond which pins to use. The code in that tutorial is is using low level register syntax for the AT328 processor of the Uno which is not valid for the Nano Every which uses the ATMega 4809.
If you want to use the Analog Comparator on the Nano Every, I recommend that you use MegaCoreX instead of the megaAVR core. MegaCoreX is available from the boards manager.
The reason for this recommendation is that the MegaCoreX has a library with examples for using the analog comparator. The megaAVR core has no library for using the analog comparator and you will be studying the ATMega 4809 processor data sheet to figure out the rather complicated details.
Thank you all my friends. I didn't know that there are two versions so i checked again my arduino board and we are talking about the V3 board. I am sorry for the confusion. So i will not change anything at sketch side, and i will use the same pin numbers as in UNO. Thanks again