SparkFun Forums 

Where electronics enthusiasts find answers.

Discussions on the software and hardware for Atmel's STK standard.
By Halfbubble
#90867
I have one of these cute displays:
http://www.sparkfun.com/commerce/produc ... cts_id=569

Hmm. The price went down. Cool.

I've used my AVR studio 4 to make a few small programs with the WinAVR, but I'm definitely a noob. Digging around in my junk box, I find an old Mega162 that I've never used. I have one running my polymer clay baking oven for years.

So, I got Cathy's "Sample Atmel AVR Code for the SparkFun Nokia-like graphic color LCD," http://www.idleloop.com/robotics/ColorLCD/ so now I want to make it for my M162. I made a project and put all the files in the folder.

Not knowing what else to do, I copied the contents of her main.cpp file into my projects main file and hit the make button. The first thing I don't know what to do with is an error :
Code: Select all
#if !defined(__AVR_ATmega8__) && !defined(__AVR_ATmega16__) \
	&& !defined(__AVR_ATmega32__)&& !defined(__AVR_ATmega644__) \
	&& !defined(__AVR_ATmega128__)
#error "unrecognized microcontroller (see Util.h)"
#endif
So I'm guessing I need to add the ATmega162 to this list, but what's the Def I need? !defined(__AVR_ATmega162) ?

I wonder if a better plan would be to start with an empty project and move code into it piece by piece, maybe starting with the SPI code?

Halfbubble,
a noob over his head.[/i]