Electronics > Electronics

ATMega switch out

(1/1)

555 timer chip guy:
can a circuit designed for the ATMega8 also use the 168 because the ATMega168 is faster and is more powerful but I cant fine a circuit for it, all the circuits I fined are for the ATMega8! >:(

rgcustodio:
The ATmega8 and ATmega88/48/168 family are pin compatible. So you can use the ATMega168 as a drop in replacement BUT your code might not work correctly, since the memory mapped port addresses would've likely changed. Read the appnotes for changes in the design:
http://www.atmel.com/dyn/resources/prod_documents/doc2553.pdf

Note that the appnote only discusses the ATmega88, there might be changes in b/n the family members (88/48/168) so it will also be better to read the data sheets.

HTH.

- Rommel

Admin:
555 guy, if you look at my $50 Robot code you will notice a section called CONFIGURE PORTS in the SoR_Utils.h file.

In that same file you will see lines such as PORT_OFF(PORTD, 4);

In the makefile file you will notice a line that says:
# MCU name
MCU = atmega8

If you modify each depending on your needs, your code should work for any AVR.

555 timer chip guy:
thank you

Navigation

[0] Message Index

Go to full version