Hello forum users,
Could you share your experience with me?
How to convert code from atmega 328p to atmega 168pa?
Does your code use more than 16k of flash, 512 bytes of EEPROM or 1k of RAM?
#1 Hardware Problem? https://www.avrfreaks.net/forum/...
#2 Hardware Problem? Read AVR042.
#3 All grounds are not created equal
#4 Have you proved your chip is running at xxMHz?
#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."
My code is 6 kb. I am going to adjust to from atmega328p to atmega168pa.
At the hardware level, other than memory sizes, they are the same chip. So change the processor type selected in your compiler and you should have no problems.
From the datasheet...
2.2 Comparison Between Processors
The ATmega48A/PA/88A/PA/168A/PA/328/P differ only in memory sizes, boot loader support, and interrupt vector
sizes. Table 2-1 summarizes the different memory and interrupt vector sizes for the devices.
I know that they are same chips. MCU is not working after compiling, but it received code. That's why I asked forum.
But Brian pointed you to the datasheet section which details the differences.
Did you look at the mentioned "Table 2-1" ?
Have you paid careful attention to all those differences?
Have you checked all your Fuse settings?
Both chips have on-chip debug - use it to see where things go wrong ...
Have you simply tried recompiling the 328 code for the 168? The transition is really just 328p to 168p, the "a" is incidental, that just means a change in fabrication process.
So what is your RAM needs?
MCU is not working after compiling, but it received code.
Assuming Atmel Studio, i.e. avr-gcc tool chain: Show your build output:
As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here.
No guarantees, but if we don't report problems they won't get much of a chance to be fixed! Details/discussions at link given just above.
"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]
Can you define "not working" (a pointless phrase that means nothing)
© 2020 Microchip Technology Inc.