NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Support Forum » Having a hard time getting to read/load programs to this processor

December 29, 2010
by TLR
TLR's Avatar

I just started to work on this processor this morning, I did all the downloads, and even built the first project. I could not read/load any programs on this chip, very little software and information on this processor. My time is as important as anyone, Its time to go back to the basic stamp2 with real software that works! Not happy with this processor and very little information of programming it too!

December 29, 2010
by hevans
(NerdKits Staff)

hevans's Avatar

Hi TLR,

Learning to use a new MCU that you are not used to can have a high learning curve sometimes. We do our best to help you past the learning curve easily, but there are inevitably stumbling blocks along the way. If you let us know what errors you are getting, we will do our best to get you up and running.

Humberto

December 31, 2010
by TLR
TLR's Avatar

Hi Humberto,

I still would like to learn what I'm doing wrong, I have followed the information on putting the MCU together and testing the output screen to.

I made sure that I: Install the USB Cable Driver installed software download files NerdKits Sample Source Code

If you are on Windows you need to check what COM port the USB cable loaded as. This might change every time you connect it. Go to the Device Manger from Control Panel. Expand the Ports (COM & LPT) section and see what is next to the “Prolific USB-to-Serial” line. It should be COM5, COM6, or some other number. You need to open the Makefile in a text editor and edit the line that begins with AVRDUDEFLAGS. At the end you need to change “/dev/ttyUSB0” to “COM5” or whatever you saw in the previous steps.

Change makefile to:

GCCFLAGS=-g -Os -Wall -mmcu=atmega168 LINKFLAGS=-Wl,-u,vfprintf -lprintf_flt -Wl,-u,vfscanf -lscanf_flt -lm AVRDUDEFLAGS=-c avr109 -p m168 -b 115200 -P /dev/ttycom4 LINKOBJECTS=../libnerdkits/delay.o ../libnerdkits/lcd.o ../libnerdkits/uart.o

all: initialload-upload

initialload.hex: initialload.c make -C ../libnerdkits avr-gcc ${GCCFLAGS} ${LINKFLAGS} -o initialload.o initialload.c ${LINKOBJECTS} avr-objcopy -j .text -O ihex initialload.o initialload.hex

initialload.ass: initialload.hex avr-objdump -S -d initialload.o > initialload.ass

initialload-upload: initialload.hex avrdude ${AVRDUDEFLAGS} -U flash:w:initialload.hex:a

OK now this is where i'm lost. I tried to run make file and did not get anything at all, what did I not do? Tom

December 31, 2010
by Ralphxyz
Ralphxyz's Avatar

Well real quickly I see you didn't do what you said to do:

"At the end you need to change “/dev/ttyUSB0” to “COM5” or whatever you saw in the previous steps."

...AVRDUDEFLAGS=-c avr109 -p m168 -b 115200 -P /dev/ttycom4 ...

Delete /dev/tty

You should have gotten some nagging about not finding the com port.

Ralph

January 01, 2011
by TLR
TLR's Avatar

Hi Ralph,

Do I need to set the AVR software and the downloads to be on the same files? the nerdkit downloads are in another file then the AVR programs... This could be why its not working. What would be the basic files to set it too? How would I load this to the MCU?

Tom

January 01, 2011
by TLR
TLR's Avatar

This is what comes up after I type "make"

make -c../libnerdkits

make:***../libnerdkits: no such file or directory. stop

make:***[initialload.hex] error 2

What's am I'm not doing right?

January 01, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi TLR,

This is happening because you did not unzip the entire Code folder to your hard drive. You probably just grabbed the initialload folder. If you unzip the entire Code folder to your hard drive, then cd your way into that folder it should get you going.

Humberto

January 02, 2011
by Ralphxyz
Ralphxyz's Avatar

So no the AVR software install is separate.

On windows I use C:\Nerdkits\Code

Then cd C:\Nerdkits\Code\Initialload to get started.

You do not need to goto the libnerdkits folder.

Ralph

January 02, 2011
by TLR
TLR's Avatar

It works! For some reason when I downloaded the nerdkit files, it did not unzip. That was the problem, well I'm new on this type of processor (MCU). Am I currect that this MCU hold 16k memory? I'm working on a PWM with frequency output on a graphics screen to show the square wave, would this MCU be albe to do something like that?

Is there any information on how to program this MCU, this is my first time with this format.

TLR

January 02, 2011
by Ralphxyz
Ralphxyz's Avatar

Apparently you know other processors and programing in general, never the less I would go through the Nerdkit User Guide projects.

Then look at the Nerdkit Tutorials. Then ask questions here. You could go through the User Guide in a day but you will get a good foundation in programing the AVR microprocessor.

Yeah I believe 16k is correct you can also order a ATmega328 which is 32k.

Ralph

Post a Reply

Please log in to post a reply.

Did you know that you can see each keypress on a computer keyboard on an oscilloscope? Learn more...