NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Microcontroller Programming » Not working
August 04, 2010 by Razvan |
I just got my USB nerdkit, made the LCD setup, than pushed the switch up, reseted it, and than I changed the word Congratulations! To a different word to see if it works.but when i entered the makefile it won't go successfully. I reseted it several times, then restored the folder with the initialload folder In it. Now my nerdkit won't show anything but some black squares. I don't know what to do. PS: I'm a Mac user. |
---|---|
August 04, 2010 by mongo |
Are the black squares on lines 1 and 3 of the LCD? |
August 05, 2010 by Razvan |
Yes. |
August 05, 2010 by Ralphxyz |
You are in Programing mode!! Switch your switch. Ralph |
August 05, 2010 by Razvan |
I did, but it wont work. Is there any way that I can reset it to factory settings? |
August 05, 2010 by Ralphxyz |
Are you getting errors when compiling? What are the errors? Are you getting random black squares or solid black lines on row 1 and 3? Solid lines indicate programing mode. Random black squares sometimes mean a wire has come lose, recheck your wiring. Ralph |
August 05, 2010 by Razvan |
Last login: Wed Aug 4 21:50:46 on ttys000 /Users/Razvan/Desktop/Code/tempsensor/Makefile ; exit; Razvan-Chiriacs-iMac:~ Razvan$ /Users/Razvan/Desktop/Code/tempsensor/Makefile ; exit; /Users/Razvan/Desktop/Code/tempsensor/Makefile: line 1: -Os: command not found /Users/Razvan/Desktop/Code/tempsensor/Makefile: line 2: -lprintf_flt: command not found /Users/Razvan/Desktop/Code/tempsensor/Makefile: line 3: avr109: command not found /Users/Razvan/Desktop/Code/tempsensor/Makefile: line 4: ../libnerdkits/lcd.o: No such file or directory /Users/Razvan/Desktop/Code/tempsensor/Makefile: line 6: all:: command not found /Users/Razvan/Desktop/Code/tempsensor/Makefile: line 8: tempsensor.hex:: command not found make: *** ../libnerdkits: No such file or directory. Stop. avr-gcc: tempsensor.c: No such file or directory avr-gcc: no input files avr-objcopy: 'tempsensor.o': No such file /Users/Razvan/Desktop/Code/tempsensor/Makefile: line 13: tempsensor.ass:: command not found avr-objdump: 'tempsensor.o': No such file /Users/Razvan/Desktop/Code/tempsensor/Makefile: line 16: tempsensor-upload:: command not found avrdude: no programmer has been specified on the command line or the config file Specify a programmer using the -c option and try again logout [Process completed] thats what I get when I compile. the squares are all over rows 1 and 3 |
August 05, 2010 by Razvan |
I figured out what it was. I misplaced a wire. Now it shows the initial message. but I don't know how to change it, or to make it show me the temperature. Can anybody help me please? |
August 05, 2010 by Ralphxyz |
Are you seeing the "Welcome message"? You have to setup the breadboard with the temperature sensor and then load the tempsensor project. Ralph |
August 05, 2010 by Razvan |
the temp sensor is in the right but I cant change anything on the screen. I dont know programming and I dont know what to do with the code file or with the makefiles. |
August 05, 2010 by hevans (NerdKits Staff) |
HI Razvan, Lets take a step back and figure out where you are, and where you are getting confused. You say the "Congratulations" message is still being displayed, this leads me to believe you never really flashed any other program onto the chip. When you were getting two black bars on the LCD, it means you are in programming mode. This is important, and you should be able to flip the programming switch, reset the battery power, and have the chip boot up into programming mode. Then flip the switch back, reset the power again, and have the chip boot up and run your program. Place the chip into programming mode, then go through the programming process on your PC. Let us know what errors you get on the command line, and we will be able to help you diagnose the problem. Humberto |
August 05, 2010 by Razvan |
How do I go to the programing process? |
August 05, 2010 by Razvan |
if i go to the initialload folder, and double click on the Makefie, I get a terminal window that says this: Last login: Thu Aug 5 18:19:45 on ttys000 /Users/Razvan/Desktop/Code/initialload/Makefile ; exit; Razvan-Chiriacs-iMac:~ Razvan$ /Users/Razvan/Desktop/Code/initialload/Makefile ; exit; /Users/Razvan/Desktop/Code/initialload/Makefile: line 1: -Os: command not found /Users/Razvan/Desktop/Code/initialload/Makefile: line 2: -lprintf_flt: command not found /Users/Razvan/Desktop/Code/initialload/Makefile: line 3: avr109: command not found /Users/Razvan/Desktop/Code/initialload/Makefile: line 4: ../libnerdkits/lcd.o: No such file or directory /Users/Razvan/Desktop/Code/initialload/Makefile: line 6: all:: command not found /Users/Razvan/Desktop/Code/initialload/Makefile: line 8: initialload.hex:: command not found make: *** ../libnerdkits: No such file or directory. Stop. avr-gcc: initialload.c: No such file or directory avr-gcc: no input files avr-objcopy: 'initialload.o': No such file /Users/Razvan/Desktop/Code/initialload/Makefile: line 13: initialload.ass:: command not found avr-objdump: 'initialload.o': No such file /Users/Razvan/Desktop/Code/initialload/Makefile: line 16: initialload-upload:: command not found avrdude: no programmer has been specified on the command line or the config file Specify a programmer using the -c option and try again logout [Process completed] .......And the LCD does not change anything. What do I do? |
August 05, 2010 by hevans (NerdKits Staff) |
Hi Razvan, We walk through the process in the NerdKits Guide starting at around page 37. It is quite involved for me to describe the whole thing here, but if you follow the steps in the NerdKit Guide you should be able to get pretty far. If you encounter errors on the command line let us know what those are (if you include the complete text it will really help us out). If you get stuck and have questions describe to us how far you got, and where you are getting confused. Humberto |
August 05, 2010 by Razvan |
Well... I get confused at page 42. Where is the /dev file? |
August 05, 2010 by Razvan |
So, what do I hane to do after I assemble the nerdkit, plug it into usb, push the swich fur progrsmming, and reset the battery?
I copied all the contents of the initialload.c file, and pasted it into a terminal window, but this is what I get: Last login: Thu Aug 5 19:21:40 on ttys000
Razvan-Chiriacs-iMac:~ Razvan$ // initialload.c
-bash: //: is a directory
Razvan-Chiriacs-iMac:~ Razvan$ // for NerdKits with ATmega168
-bash: //: is a directory
Razvan-Chiriacs-iMac:~ Razvan$ // mrobbins@mit.edu
-bash: //: is a directory
Razvan-Chiriacs-iMac:~ Razvan$
Razvan-Chiriacs-iMac:~ Razvan$ #define F_CPU 14745600
Razvan-Chiriacs-iMac:~ Razvan$
Razvan-Chiriacs-iMac:~ Razvan$ #include <stdio.h>
Razvan-Chiriacs-iMac:~ Razvan$
Razvan-Chiriacs-iMac:~ Razvan$ #include <avr/io.h>
Razvan-Chiriacs-iMac:~ Razvan$ #include <avr/interrupt.h>
Razvan-Chiriacs-iMac:~ Razvan$ #include <avr/pgmspace.h>
Razvan-Chiriacs-iMac:~ Razvan$ #include <inttypes.h>
Razvan-Chiriacs-iMac:~ Razvan$
Razvan-Chiriacs-iMac:~ Razvan$ #include "../libnerdkits/delay.h"
Razvan-Chiriacs-iMac:~ Razvan$ #include "../libnerdkits/lcd.h"
Razvan-Chiriacs-iMac:~ Razvan$
Razvan-Chiriacs-iMac:~ Razvan$ // PIN DEFINITIONS:
-bash: //: is a directory
Razvan-Chiriacs-iMac:~ Razvan$ //
-bash: //: is a directory
Razvan-Chiriacs-iMac:~ Razvan$ // PC4 -- LED anode
-bash: //: is a directory
Razvan-Chiriacs-iMac:~ Razvan$
Razvan-Chiriacs-iMac:~ Razvan$ int main() {
-bash: syntax error near unexpected token and the display is not changed. |
August 05, 2010 by Ralphxyz |
I am sorry but who told you to "I copied all the contents of the initialload.c file, and pasted it into a terminal window,"? All you have to do is to follow the NerdKit tutorial, not doing anything else and it will work for you. If you do other things you "think" might work you will be disappointed. Just follow the instructions until you learn what you are doing. Ralph |
August 05, 2010 by hevans (NerdKits Staff) |
Hi Razvan, Please slow down and take the time to read through the steps in the guide. I know it can be quite involved, but it is worth it in the end. On the command line you should always be typing in commands yourself, the NerdKits Guide will not ask you to copy paste any commands into the command line. You do not need to copy the contents of initialload.c into the command line (or the contents of the Makfile). initialload.c is a C file with code in it. From the command line you need to navigate to your Code folder, then type
The make program will read the Makefile and follow the instructions in the Makefile. These instructions will compile the initialload.c file and then upload the resulting .hex file onto the chip. Does that make sense? If you are getting confused feel free to ask questions, we will do our best to clarify the process. Humberto |
August 05, 2010 by Razvan |
Can anybody tell me how do I complete the steps on page 43 on the guide? |
August 06, 2010 by Ralphxyz |
What is it you do not understand or canot follow on page 43 of the user Guide? Here are all of the steps on my MAC mini so you should see the same results: (do not enter comments //)
That's it. It is really that simple. You will need to switch between programing and run mode. You will need to unplug your USB cable to run the program. You might need to re-boot your computer at times. Just take it a step at a time and move slowly. Do not be surprised that you have to repeat and check yourself all of the time. The instruction manual has worked literally for thousands of us! Ralph |
August 06, 2010 by Razvan |
Thank you! It worked |
Please log in to post a reply.
Did you know that negative numbers are represented in two's complement notation in binary? Learn more...
|