Full Version : migrate code from atmega168 to attiny2313
avr >>C PROGRAMMING (AVR) >>migrate code from atmega168 to attiny2313


nunovic- 12-21-2007
Greeting fellow programmers.
I am currently working in a code migration from atmega168 to attiny2313.
I have these 3 line codes implemented on a atmega168 and need to change the code to be used on a attniy2313.
If someone could help I would be thankfull. :)
The line codes are:

byte clr;

SPCR = B(SPE) | B(MSTR);
clr=SPSR;
clr=SPDR;

The real issue here is that this 3 lines are to be used with the spi interface of atmega168 and in attiny2313 we only have USI interface.

Thanks in advance.


Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.