2004-11-01 -+- Mr. nipon gasiprong -+- ngasiprong@yahoo.com -+- Dear Guido Socher,
I'm your hardware paper follower. Thank you very much for your papers.
I study your hardware papers and use your paper " Programming the AVR Microcontroller with GCC" as the starting point in my electronics class room.
My students can use AVR Microcontroller too.
I need to learn more about making a simple USB interface by using an
AVR-USB chip. Could you please write a paper about this topic.

Thank youvery much.
nipon
-+- 202.28.49.130 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) 2004-11-23 -+- Mike Piety -+- mrp@piety.ath.cx -+- Guido,
Excellent article. Would you please post a picture of the underside of the completed project board showing your connection method?

Thanks,
Mike
-+- 206.40.109.206 = Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.6) Gecko/20040902 Firefox/0.8 2004-11-26 -+- Guido Socher -+- -+- Hi Mike,
well this circuit is so simple that you can just solder a few
wires between the pins. -+- 195.71.95.22 = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 2004-12-14 -+- Mike -+- -+-
In the parts list for the programmer cable you mention a
200 Ohm resistor and 3 470 Ohmresistors.

The plans call for resistors on pins 2, 3 and 4.

4 470 Ohm
3 220 Ohm
2 470 Ohm


Where does the third 470 Ohm resistor go? -+- 64.230.144.182 = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0 2004-12-15 -+- Guido Socher -+- -+- Hi Mike,
that is a fault in the article. Thanke for telling me.
You need only two 470 Ohm resistors. -+- 195.71.95.22 = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 2004-12-19 -+- -+- -+- I've found your delay_ms to be broken:

void delay_ms(unsigned short ms)
/* delay for a minimum of <ms> */
/* with a 1Mhz clock, the resolution is 1 ms */
{
unsigned short outer1, outer2;
outer1 = 50;

while (outer1) {
outer2 = 1000;
while (outer2) {
while ( ms ) ms--;
outer2--;
}
outer1--;
}
}

In this code, ms is decreased to 0 only once in the inner-most loop and then remains null.

I use this code :

void
delay_ms(ushort ms)
{
while(ms--) {
volatile BYTE i;
for (i=8; i ; i-- ) {
volatile BYTE b;
for(b=120*XTALFQ/12E6;b;b--);
}
}
}

Thank you for such a valuable work!
-+- 62.147.71.170 = Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.4.1) Gecko/20031008 2004-12-22 -+- Andreas -+- -+- Hi there

great article! I am using the AtMega8 for my own project and I was just going to worry about what has changed since AT90S4433 when I discovered your new article.

Thanks! -+- 192.33.100.8 = Mozilla/5.0 (WinNT; U; i686; en-US; rv:1.0.0; hi, Mom) Gecko/20020604 2005-01-29 -+- Richard Lechner -+- richardlechner@freenet.de -+- Hello,

I'm an absolute beginner. I read this article and I built this tesenvironment for my microcontroller. And what should I say? It worked.

Thanks Guido,
thanks linux

Richard
-+- 217.89.9.46 = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030630 2005-02-03 -+- Werner Borchers -+- werbo@t-online.de -+- I'm very glad to have found your article. I have build many devices with the C-Control Basic I - Unit from Conrad-Electronics.
The problems :
Only one Distributor
Now changed to Version 2

--> no more programming in assembler (you must not look into the OS)
--> IDE only for WIN

The whole C-Control thing seems to go now the "Microsoft - way"
(my opinion)

I'll try to do my next project (climate regulation, hot water, heating...)
with the AVR.

Solong, Werner
-+- 217.235.217.41 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.5)) 2005-02-12 -+- Gustav Schindelr -+- g.schindler@kabsi.at -+- When I try to install AVR gcc-core-2.4.2 or 3.4.3
I get follwing errors
../../gcc/config/avr/libgcc.S:72 Error: sufix or operants invalid vor for `clr`
../../gcc/config/avr/libgcc.S:72 Error: no such instruction ´clear result`
..
etc.
make[2]: *** [libgcc(//.//_mulqi3.o] Fehler 1
make [1} [stmp-multilib] Fehler 2

What shall I do ?????
or what`s wrong ??



-+- 81.217.6.182 = Mozilla/5.0 (compatible; Konqueror/3.3; Linux) (KHTML, like Gecko) 2005-02-27 -+- Mirza Nakicevic -+- mirza@[nospam]linux.org.ba - - remove [nospam] -+- Hi

I just want to ask you do you know how to back my at mega8 from dead ? :)
Accidentaly I had short circuit between plus and minus and afer that I can't program my mega8 :(

Thanks anyway,

Mirza N.

-+- 80.65.83.6 = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 2005-03-06 -+- Ole Robert Hestvik -+- ole.robert.hestvik@eunet.no -+- I'm happy to find your article. Several years ago I had an early version of avr-gcc working. Now I will install the system again.
I have installed binutils from binutils-2.15.tar.bz2 and gcc from
gcc-core-3.4.2.
However, trying avr-libc from avr-libc-1.2.3.tar.gz doconf says:

configure: error: Wrong C compiler found; check the PATH!

The same happens for avr-libc-1.0.4.tar.bz2. My compiler is gcc
version 3.3.2 20031022 (Red Hat Linux 3.3.2-1).
How shall I proceed? -+- 80.202.23.185 = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114 2005-03-28 -+- Volker -+- info@[nospam]vph.bnv-bamberg.de -+- Hello Guido,
thanks for this good article.

Let me add one comment: you say "We don't have several tasks and there is no other program running. There is not even an operating system."

In fact, this is true for a "naked" AVR.

I have no experience yet, but I found this while searching for AVR development: http://www.freertos.org

Perhaps you'll find some time to write an article about this "... portable, open source, mini Real Time Kernel - a free to download and royalty free RTOS"

Kind regards
Volker -+- 217.187.108.204 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) 2005-04-06 -+- Guido Socher -+- -+- A few people asked me how they
could use avrdude (instead of uisp) in combination with the
cable described in the article. Here the /etc/avrdude.conf entry
which you will need:

programmer
id = "dapa";
desc = "direct parallel port. uisp compatible.";
type = par;
reset = 16;
sck = 1;
mosi = 2;
miso = 11;
;

# the command to use this is:
# avrdude -p m8 -c dapa -e -U flash:w:YourHexFile.hex

-+- 195.71.95.98 = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1 2005-04-07 -+- francois schnell -+- francois.schnell@{[nospam]}free.fr -+- Hello Guido,

Thank you so much for all your articles around the AVR. I'm a newbie on AVR, I've installed all you said on Ubuntu and it works perfectly (I now can easily program digital I/O on the atmega8).
I'm now trying to use the UART line (and later the ADC) and there I must admit I'm stuck for the programming (MAX232 works fine). Do you advise any ressources on the net ? (I didn't find much help for my newbie level in the lib-c manual)

I also saw you mentionned this:

References * Pascal Stang's AVRlib: http://www.procyonengineering.com/avr/avrlib/index.html or http://hubbard.engr.scu.edu/embedded/avr/avrlib/

It looks great with lots of functions for UART and ADC but we didn't install it in the article ... ? Can I use it along side AVR lib-c ? How to install it on Linux, should I modify the makefile too ?

I must admit I'd love an article on serial connection to the PC and ADC in order to transform the atmega in an educational scientific lab. In France, schools have data aquisition board which works only on windows and you've got nothing under 1000 $. With the right quarts with atmega8 we could effectively have a 10 kHz sampling ?

Thanks again for your contributions -+- 130.79.188.34 = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041209 Firefox/1.0 (Ubuntu) (Ubuntu package 1.0-2ubuntu4-warty99) 2005-04-07 -+- Guido Socher -+- -+- Hello Francois,
for the libraries from Pascal Stang I would suggest to
just copy the relevant part of the source code. However
I have not looked at his uart code and I can't really comment on it.

What will definitly work is this:
copy the uart code (.c and .h file) from
linuxlcdpanel-1.4.tar.gz (linuxfocus article about the lcd pannel
for a server).
I have recently updated it and the uart code has a number of compatibility
defines which will make it work for both 4433 and atmega8.

The linuxlcdpanel-1.4.tar.gz contains also a little linux program to
initialize the uart in your linux pc with the right setting (speed, parity, etc...)

Regards
Guido
-+- 195.71.95.98 = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1 #2005-06-20 -+- Vladimir Riznic -+- liquidoo11@yahoo.com -+- hello guido,
i liked your article alot,
i already have a development board, but now i have needs for an in-system programming since dev-board is too big and has no mounts for wheels :)
i think of using your suggested method, but i need an oscillator, which values of capacitors near crystal should i use? same as with 4433 or some other value?
thnx -+- 213.244.195.49 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.54 [en] 2005-06-20 -+- Vladimir Riznic -+- liquidoo11@yahoo.com -+- hello guido,
i liked your article alot,
i already have a development board, but now i have needs for an in-system programming since dev-board is too big and has no mounts for wheels :)
i think of using your suggested method, but i need an oscillator, which values of capacitors near crystal should i use? same as with 4433 or some other value?
thnx -+- 80.93.228.42 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.54 [en] 2005-06-20 -+- Guido Socher -+- -+- Hi Vladimir,
what uC do you use? The atmega8 as described in this article
does not need a crystal.

Otherwise 10-22pf are ok for most crystals.

-+- 195.71.95.98 = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 2005-06-20 -+- Vladimir Riznic -+- liquidoo11@yahoo.com -+- hi Guido,
yes it is atmega8, but you mentioned that if UART and timers are needed, crystal should be provided to the uC.
im trying to build general purpose robot-brain-board which i could move from bot to bot when needed, so basically all i need is your board with something like IDC10 connections, but i try to make it complete for anything that i might use with it.
thanks and keep with uC articles, they are great, and your code helped me a lot. -+- 80.93.228.61 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.54 [en] #2005-06-21 -+- Vladimir Riznic -+- liquidoo11@yahoo.com -+- hi Guido,
yes it is atmega8, but you mentioned that if UART and timers are needed, crystal should be provided to the uC.
im trying to build general purpose robot-brain-board which i could move from bot to bot when needed, so basically all i need is your board with something like IDC10 connections, but i try to make it complete for anything that i might use with it.
thanks and keep with uC articles, they are great, and your code helped me a lot. -+- 80.93.228.75 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.54 [en] 2005-06-21 -+- Guido Socher -+- -+- Hi Vladimir,
OK, that is true. For sending larger strings of data over
rs232 you should have a crystal. You connect it exactly as for
the 4433 (see my old article). After that you have to modify the
fuse bits (note that you can not undo this unless you have
a working crystal). -+- 195.71.95.98 = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3 2005-06-22 -+- Vladimir Riznic -+- liquidoo11@yahoo.com -+- thanx again Guido,
all i needed to know is whether values of capacitors change if crystal speed is different (4433 - 4MHz, Mega8 - 16MHz)
the biggest help to me was that eagle file you posted in "autonomous linux robot" article, because it shed some light for me since i don't have lots of electronics experience.
thanx for great articles and keep them up -+- 80.93.228.32 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.54 [en] #2005-06-24 -+- Vladimir Riznic -+- liquidoo11@yahoo.com -+- hello Guido,
i see that i am becoming most boring poster here :)
i have a problem, i uploaded my code using avrdude with giveio driver installed (testcode, just to see the led blink) but the led doesn't blink although code is veryfied.
(i built my board without an oscillator, and everything else is up to specs of your article, tested it with multimeter to check voltages, while programming three AA batteries were connected to the uC)
on voltage input i read 4.66V, voltages on PC5 shows something over 3V constantly. i just copied and pasted your test code to KamAVR (WinAVR IDE) so it should work (i even compiled similar program using ICC compiler)
my settings are m8 for the device and 1MHz for the clock, no fuse bits
i wouldnt oppress you in this way :) and went to avrfreaks to post a question there, but since you wrote this great article, you are to pay consequences :))))))))))))))))
thanx, and sorry for inconviniences,
regards
Vladimir

ps yes i use windows for avr, because it has a driver to run my usb devboard, and i have trouble parting with ICC

pps it might be a good idea to put a switch on the + power from the supply, so not to need to plunge batteries from their holders each time you want to stop uC -+- 80.93.228.41 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.54 [en] 2005-06-24 -+- Vladimir Riznic -+- liquidoo11@yahoo.com -+- hello Guido,
i see that i am becoming most boring poster here :)
i have a problem, i uploaded my code using avrdude with giveio driver installed (testcode, just to see the led blink) but the led doesn't blink although code is veryfied.
(i built my board without an oscillator, and everything else is up to specs of your article, tested it with multimeter to check voltages, while programming three AA batteries were connected to the uC)
on voltage input i read 4.66V, voltages on PC5 shows something over 3V constantly. i just copied and pasted your test code to KamAVR (WinAVR IDE) so it should work (i even compiled similar program using ICC compiler)
my settings are m8 for the device and 1MHz for the clock, no fuse bits
i wouldnt oppress you in this way :) and went to avrfreaks to post a question there, but since you wrote this great article, you are to pay consequences :))))))))))))))))
thanx, and sorry for inconviniences,
regards
Vladimir

ps yes i use windows for avr, because it has a driver to run my usb devboard, and i have trouble parting with ICC

pps it might be a good idea to put a switch on the + power from the supply, so not to need to plunge batteries from their holders each time you want to stop uC -+- 80.93.228.62 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.54 [en] 2005-06-25 -+- Guido Socher -+- -+- Hello Vladimir,
you have probably soldered the LED with the wrong polarity
onto the board.
-+- 195.71.95.98 = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3 2005-06-26 -+- Vladimir Riznic -+- -+- no, i found the mistake, when i was plugging uC into the IC holder (i bought a cheap one, so i had to use some excessive force) i twisted that pin a little, i guess that some contact inside it broke because all other pins work ok, so for now, i just desoldered the side of the 1K resistor which went to PC5 and soldered it to PC4, i have one pin less, but this board is only first version which is to take heavy lab bashing until i develop a new one which will have 7805 regulated voltage a proper crystal clock, and upgrade pins...
for now im very pleased since this is my first hardware project with uC.
thanx again -+- 213.244.194.43 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.54 [en] 2005-07-23 -+- Frank Zacharias -+- fzachi [at] gmx [dot] -+- Hi,

i bought a complete kit, build the board and it works perfectly. For VCC i cutted an old usb-cable and use the usb_voltage to power the circuit. Unfortunately it works only with the code produced by the tools provided on the Linux AVR Programming CD. With downloaded and self-compiled tools(all have the same version like on cd) it doesn't work.
Anyway, i read on a different page(kreatives-chaos.com) and in the atmega8-specs that avcc should be connected to vcc even if the ADC is not used. What can happen if avcc isn't connected?

thx and regards, frank -+- 84.181.100.13 = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050517 Firefox/1.0.4 (Debian package 1.0.4-2) 2005-07-23 -+- Guido Socher -+- -+- Hello Frank,
probably there is something wrong with the installation of the
self-compiled tools. If there is no vcc voltage
on the adc then the adc can not be initialized. That's all. -+- 195.71.95.98 = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.9) Gecko/20050711 Firefox/1.0.5 2005-08-03 -+- Stefan -+- stef.wagner@t-online.de -+- Dear Guido,

when I tried "make avr_led_lcd_test.hex" I go a few errors:
some files (io.h and progmem.h) were not found
and lcd.c caused errors too "invalid lvalue in unary `&`" in the lines where lcd_data_port_in() and lcd_data_port_out() are defined.

I tried it with your CD "GCC AVR Microcontroller programming guide",
but it didn`t work.
The same happened when I configured my other Linux-PC (SuSE 9.1) according the article 352. I only used avr-libc-1.0.5 instead of avr-lib-1.0.4.

What can I do? (I am not expierenced with linux.)






-+- 80.184.158.31 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 8.02 #2005-08-03 -+- Stefan -+- stef.wagner@t-online.de -+- Dear Guido,

when I tried "make avr_led_lcd_test.hex" I go a few errors:
some files (io.h and progmem.h) were not found
and lcd.c caused errors too "invalid lvalue in unary `&`" in the lines where lcd_data_port_in() and lcd_data_port_out() are defined.

I tried it with your CD "GCC AVR Microcontroller programming guide",
but it didn`t work.
The same happened when I configured my other Linux-PC (SuSE 9.1) according the article 352. I only used avr-libc-1.0.5 instead of avr-lib-1.0.4.

What can I do? (I am not expierenced with linux.)






-+- 80.184.158.31 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 8.02 2005-08-03 -+- Guido Socher -+- -+- Hello Stefan,
to which software and which article does your question actually relate?
There is no make target called avr_led_lcd_test.hex in the software that
belongs to this article (avrm8ledtest-0.2). -+- 195.71.95.98 = Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/412 (KHTML, like Gecko) Safari/412 2005-08-03 -+- Stefan -+- stef.wagner@t-online.de -+- Hello Guido,

thank you for your quick answer!

Sorry, the file avr_led_lcd_test.c belongs to the article 251 in linuxfocus, from November 2002.
I wanted to build the power supply that you described in article251.
And I tried to compile the software in two ways:

1.) according to your article 352 "Programmieren des AVR Microcontrollers mit GCC, libc 1.0.4"
2.) with your cd "Linux AVR Programming CD"


1.) I tried to set up my Linux-Enviroment on a PC according to article 352.
I got all the files you suggested, but not libc 1.0.4. Instead I used libc 1.0.5.
To setup of the enviroment I followed exactly your instructions. It took a long time to install all the software but it seemed to be successfull.

However when I called make avr_led_lcd_test.hex I got errors.
Unfortunately I can't give the exact output now.
Some header-files (io.h, progmem.h) were not found and I got errormessages related to lcd.c.
(error: invalid lvalue in unary '&' in the lines where lcd_data_port_in() and lcd_data_port_out() were referenced).


2.) Then I tried to use the Linux-AVR-Programming-Cd.
I changed only the entry in the Makefile concerning the processortype. Then I called make avr_led_lcd_test.hex and got the following
output:

avr-gcc -mcall-prologues -Os -mmcu=atmega8 -Wall -Wstrict-prototypes -c avr_led_lcd_test.c
avr_led_lcd_test.c:11:16: io.h: No such file or directory
avr_led_lcd_test.c:12:21: progmem.h: No such file or directory
avr_led_lcd_test.c:13:23: interrupt.h: No such file or directory
avr_led_lcd_test.c:14:24: string-avr.h: No such file or directory
avr_led_lcd_test.c:16:21: sig-avr.h: No such file or directory
In file included from avr_led_lcd_test.c:17:
lcd.h:18:22: pgmspace.h: No such file or directory
In file included from avr_led_lcd_test.c:17:
lcd.h:113: error: parse error before '*' token
lcd.h:113: warning: function declaration isn't a prototype
lcd.h:118: warning: type defaults to `int' in declaration of `prog_char'
lcd.h:118: error: parse error before '*' token
lcd.h:118: warning: function declaration isn't a prototype
In file included from avr_led_lcd_test.c:19:
uart.h:17: warning: type defaults to `int' in declaration of `prog_char'
uart.h:17: error: parse error before '*' token
uart.h:17: warning: function declaration isn't a prototype
avr_led_lcd_test.c:27: warning: return type of 'main' is not `int'
avr_led_lcd_test.c: In function `main':
avr_led_lcd_test.c:35: warning: implicit declaration of function `sbi'
avr_led_lcd_test.c:35: error: `DDRC' undeclared (first use in this function)
avr_led_lcd_test.c:35: error: (Each undeclared identifier is reported only once
avr_led_lcd_test.c:35: error: for each function it appears in.)
avr_led_lcd_test.c:35: error: `PC5' undeclared (first use in this function)
avr_led_lcd_test.c:37: warning: implicit declaration of function `sei'
avr_led_lcd_test.c:41: warning: implicit declaration of function `cbi'
avr_led_lcd_test.c:41: error: `PORTC' undeclared (first use in this function)
make: *** [avr_led_lcd_test.o] Error 1

The cd-programming-enviroment would be a wonderful tool for use in school.


Regards Stefan

-+- 80.184.158.31 = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1 2005-08-04 -+- Stefan -+- stef.wagner@t-online -+- Dear Guido,

here is what I mentioned before.
It's the result of "make avr_led_lcd_test.hex" from my linux-enviroment that I tried to set up as you discribed it in this article (352).
(The file came with the power supply in article 251 in linux focus.
I only changed the entry for MCU to atmega8)

avr-gcc -mcall-prologues -Os -mmcu=atmega8 -Wall -Wstrict-prototypes -c lcd.c
lcd.c:15:16: io.h: No such file or directory
lcd.c:16:22: pgmspace.h: No such file or directory
In file included from lcd.c:19:
lcd.h:113: error: parse error before '*' token
lcd.h:113: warning: function declaration isn't a prototype
lcd.h:118: warning: type defaults to `int' in declaration of `prog_char'
lcd.h:118: error: parse error before '*' token
lcd.h:118: warning: function declaration isn't a prototype
lcd.c:41: error: parse error before '(' token
lcd.c:41: error: parse error before '(' token
lcd.c:41: error: parse error before '(' token
lcd.c: In function `lcd_out_low':
lcd.c:84: warning: implicit declaration of function `sbi'
lcd.c:84: error: `PORTC' undeclared (first use in this function)
lcd.c:84: error: (Each undeclared identifier is reported only once
lcd.c:84: error: for each function it appears in.)
lcd.c:84: error: `PC3' undeclared (first use in this function)
lcd.c:85: warning: implicit declaration of function `cbi'
...
lcd.c: In function `lcd_read':
lcd.c:169: error: `PORTD' undeclared (first use in this function)
lcd.c:169: error: `PD4' undeclared (first use in this function)
lcd.c:176: warning: implicit declaration of function `bit_is_set'
lcd.c:296: error: parse error before '*' token
lcd.c:296: warning: function declaration isn't a prototype
lcd.c: In function `rolltext_lcd_p':
lcd.c:300: warning: implicit declaration of function `PRG_RDB'
lcd.c:300: error: `text' undeclared (first use in this function)
lcd.c:303: error: `shiftlen' undeclared (first use in this function)
lcd.c: In function `lcd_read':
lcd.c:336: warning: type defaults to `int' in declaration of `prog_char'
lcd.c:336: error: parse error before '*' token
lcd.c:338: warning: function declaration isn't a prototype
lcd.c: In function `lcd_puts_p':
lcd.c:341: error: `progmem_s' undeclared (first use in this function)
lcd.c: In function `lcd_read':
lcd.c:403: error: parse error at end of input
make: *** [lcd.o] Fehler 1

-+- 80.184.151.98 = Mozilla/5.0 (compatible; Konqueror/3.2; Linux) (KHTML, like Gecko) 2005-08-04 -+- Guido Socher -+- -+- Hello Stefan,
ok, that is normal. The libc has changed a lot. You will
not be able to compile out of the box software which is
3 years old.
The basic idea will still work but header file names have
changed and remember that this old code was written for a
different microcontroller. The rs232 interface code is e.g
different. You can re-use ideas but the code needs major
re-writing.
Do you really want to build this old power supply?
There is a new one:
http://linuxfocus.org/English/July2005/article384.shtml
It is easier to build and better. This is why I did not
maintain the old code for the power supply from 3 years ago.
If you really want the old ciruit then I can help you to re-write
the code but it can not be done in a few minutes. It needs time. -+- 195.71.95.98 = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6 2005-08-06 -+- Stefan -+- stef.wagner@t-online.de -+- Dear Guido,

thank you for offering your help!
The new one looks nice and I decided to built it.


-+- 80.184.138.58 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 8.02 2005-08-07 -+- philius -+- -+- Hello Guido,
how can I programm the fuse bits?
I´m still a beginner. -+- 217.250.119.170 = Mozilla/5.0 (compatible; Konqueror/3.2; Linux) (KHTML, like Gecko) 2005-08-18 -+- cskao -+- joegtw@gmail.com -+- Dear Guido,

Thank you for sharing such a nice idea. I got a problem about that is this ISP programmer competible to ATmega128? Or where can I find an alternative for a cheaper version of an ATmega128 competible programmer? Thank you for your help. -+- 61.30.40.162 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322) 2005-09-10 -+- Matthias -+- ratzl@web.de -+- Hi Guido,

in the article 352 you write to download the "avr-libc-1.0.4.tar.bz2.tar"
file from http://savannah.nongnu.org/projects/avr-libc/
But this file is not available.Where can I download it?

Matthias -+- 213.6.133.228 = Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) 2005-09-11 -+- Guido Socher -+- -+- Hi Matthias,
just take the latest version. -+- 195.71.95.110 = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6 #2005-09-14 -+- matthias -+- ratzl@web.de -+- Hi Guido,

I have two questions.
1.
when I use the tar command this happens:

linux:/usr/local/avr # tar jxvf binutils-2.15.tar.bz2
tar: invalid option -- j
Try `tar --help' for more information.

this way it works :

tar Ijxvf binutils-2.15.tar.bz2

why?

2.
When I try to install avr-libc-1.0.5 this happens:

linux:/usr/local/avr # cd avr-libc-1.0.5
linux:/usr/local/avr/avr-libc-1.0.5 # PREFIX=/usr/local/avr
linux:/usr/local/avr/avr-libc-1.0.5 # export PREFIX
linux:/usr/local/avr/avr-libc-1.0.5 # sh -x ./doconf
+ : /usr/local/avr
+ rm -rf avr3 avr4 avr5 build
+ mkdir -p build
+ cd build
+ local_CC=
+ '[' x = xgcc ']'
+ PATH=/usr/local/avr/bin:/usr/local/linuxprinter/bin:/sbin:/usr/sbin:/usr/local
/sbin/:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games/bin:/usr
/games:/opt/gnome/bin:/opt/kde/bin
+ ../configure --prefix=/usr/local/avr
creating cache ./config.cache
checking host system type... avr-unknown-none
checking target system type... avr-unknown-none
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... missing
checking for working autoconf... missing
checking for working automake... missing
checking for working autoheader... missing
checking for working makeinfo... found
checking for avr-as... avr-as
checking for avr-ar... avr-ar
checking for avr-ranlib... avr-ranlib
checking for avr-gcc... no
checking for gcc... gcc
configure: error: Wrong C compiler found; check the PATH!
+ cd ..
linux:/usr/local/avr/avr-libc-1.0.5 #

Pease help -+- 213.6.131.7 = Konqueror/1.1.2 #2005-09-14 -+- matthias -+- ratzl@web.de -+- sorry I mean "tar Ixvf binutils-2.15.tar.bz2" -+- 213.6.131.58 = Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) 2005-11-01 -+- Jason -+- -+- Hey everybody - I think there's a tiny mistake in the article. When compiling GCC, I think the language option in the configure line should have be "--enable-languages=c" instead of "--enable-language=c"

Thanks for the help with AVR - I'm just learning how to play with them and looking forward to making some exciting applications!
Jason -+- 65.196.219.162 = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 2006-02-02 -+- Hans -+- -+- Jason is right.
It must be "--enable-languages=c" -+- 213.54.207.120 = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc4 Firefox/1.0.7 2006-03-02 -+- Michael -+- michael@clift.com.au -+- We had a product in development, which was done by a programmer who died. The firmware was in assembler, we employed an engineer to take over the project.

After six months (not full time, but a lot of time) the project was un-reliable, and full of bugs.

At the time I had no experience with Atmel chips, or unix based operating systems. I had about 1 year experience programming the msp430 with C using the imagecraft compiler.

Using your page as a starting point, I was able to set up avrgcc on a system running debian. debian's package installer made it a bit easier.

Using C I was able to re-write the whole project in 5 days. It is bug free and bulletproof.

Thankyou very much Guido for your help.

P.S. I would like to put 'modprobe ppdev' and 'chmod 666 /dev/parport0' into a startup script, but havn't figured it out yet.

-+- 143.238.16.57 = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1 #2006-03-19 -+- Winfried Motzkus -+- dk5eg-hh@t-online.de -+- Hi, Guido Socher,
i have assembled and installed the USB-Programmer-Bord, and am unable to get close to "bitbanging" the firmware into the Programmer.
-+- 84.142.58.253 = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050920 Firefox/1.0.7 SUSE/1.0.7-0.1 2006-03-25 -+- Doug -+- -+- Thanks, Guido! This article rocks!

Wish there were more linuxfocus articles on the way!

One comment: My low-voltage ATMEGA8 continues to run even if the power supply is disconnected (but programmer cable is still attached.) Apparently enough current leaks through the 10K resistor from the RESET line to keep the MC going....

The ATMEGA8L only needs about 2.7V.

Anyway--great job! -+- 69.81.146.106 = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1 2006-04-05 -+- John -+- bersig@yahoo.com -+- This article looks promising Guido. I downloaded and compiled everything without a hitch, now I just need the hardware. Thanks!

A few questions still remain however. First is, what about other electronics-related tools? I'm thinking about such things as circuit drawing (layout & artwork for PCB creation) and other misc. tools that would help with the rest of an electronics project. I'm also particularly interested in Linux software for interfacing with AVR tools such as the JTAGICE debugger. Maybe future articles could address some of these topics?

Also, with all the software that is needed to dl/compile to get this stuff to work, has anyone considered getting one of the major distros such as Debian or SuSE to integrate at least some of this? Maybe there should even be a distro dedicated to this stuff... kind of a linux-based engineering workstation thing. It would be awesome to have a system that not only came pre-configured to be able to build uC projects (not just the AVR, but also other microcontrollers too.. the PIC, 6811, and 8051 come immediately to mind, and there are probably others I don't know of yet) but also had tools for circuit layout, PCB artwork generation, etc.

I realize that's probably beyond the scope of your articles Guido. :) Just a thought I had to get out there.

BTW, Olimex ( http://www.olimex.com/ ) seems to have some decent-looking prototype boards that come pre-populated with things like a serial port, sockets for a crystal oscillator and an AVR chip, a JTAG port, a reset button, etc., plus a few square inches of pre-drilled prototype area. Anyone tried these? I'd gladly pay a few $$ if it means one less thing to build/compile/install before I can start -my- project.

Anyway, thanks again for the article(s). I'm just starting out with AVRs so I'm finding it very informative. I've messed around with the Basic Stamp from Parallax, and I build a complete (4-bit) CPU out of NAND gates as a college project so I'm not a complete electronics noob. Still, I can use whatever help I can get. :) I'm planning to start out with a couple simple projects to get some experience, eventually building up to an AVR-based AC/DC power monitoring gizmo for a solar power (pv) system we have installed at our house. ( http://sonic.net/~jmgrant/solar/solar.php will have details of the project if/when I get that far. )
-+- 63.194.251.2 = Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0 #2006-04-11 -+- Andi -+- jahnke_am@web.de -+- Where do I get the +5V Power, from the fan or hdd from my computer or parallel port?
Needs the programmer cable be connected all the time the microcontroller
should run?
-+- 84.150.252.110 = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 2006-05-28 -+- Nils -+- -+- Just wanna thank you.
I am a µC beginner but with this article it worked out of the box...
-+- 84.129.208.93 = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060419 Firefox/1.0.8 2006-11-07 -+- ken -+- ken_lutchu82 -+- hi sir,i want ask about my project.in my project when i compile with avr gcc i found text say that "PRG_RDB"was undifine,what that mean and what is PRG_RDB? thanx -+- 202.146.253.4 = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7