Best C tutorial for AVR
2005-02-02 by fredit@charter.net
Yahoo Groups archive
Index last updated: 2026-04-28 22:41 UTC
Thread
2005-02-02 by fredit@charter.net
Hello, I need to get a good C tutorial for the AVR. I have been programming for the bs2.. and would now like to move over to the AVR and C. Is there any good online resources to learn C for the AVR? thanks! Lee
2005-02-04 by Eric
Lee I believe you have had no response, I think you might not have to learn anything new on C, if you are up to speed on C as a programming language, all you have to learn is how to interface C with the microprocessor, and learn what header files you need to make your program to work. I hope you are not confused here what I have just said. From Eric
----- Original Message ----- From: <fredit@charter.net> To: <AVR-Chat@yahoogroups.com> Sent: Thursday, February 03, 2005 6:48 AM Subject: [AVR-Chat] Best C tutorial for AVR Hello, I need to get a good C tutorial for the AVR. I have been programming for the bs2.. and would now like to move over to the AVR and C. Is there any good online resources to learn C for the AVR? thanks! Lee Yahoo! Groups Links
2005-02-04 by Alex Shepherd
> Is there any good online resources to learn C for the AVR? Not sure about best but here is one I read a while ago: http://www.SmileyMicros.com/ Alex
2005-02-04 by Ralph Hilton
On Sat, 05 Feb 2005 01:13:51 +1300 you wrote: The book at http://www.prllc.com/productcart/pc/viewPrd.asp?idcategory=6&idproduct=12 gives a good description of using C on AVRs with lots of good example code. >Lee I believe you have had no response, > >I think you might not have to learn anything new on C, >if you are up to speed on C as a programming language, all you have to learn is how to interface C with >the microprocessor, and learn what header files you need to make your program to work. > > >I hope you are not confused here what I have just said. > > >From Eric > > > >----- Original Message ----- >From: <fredit@charter.net> >To: <AVR-Chat@yahoogroups.com> >Sent: Thursday, February 03, 2005 6:48 AM >Subject: [AVR-Chat] Best C tutorial for AVR > > > >Hello, I need to get a good C tutorial for the AVR. I have been programming for the bs2.. and would now >like to move over to the AVR and C. > >Is there any good online resources to learn C for the AVR? > >thanks! >Lee > > > > >Yahoo! Groups Links > > > > > > > > > > >Yahoo! Groups Links > > > > > > > -- Ralph Hilton http://www.ralphhilton.org C-Meter: http://www.cmeter.org FZAOINT http://www.fzaoint.net
2005-02-04 by Eric
I am sure if you knew you C you would not have slash out with $67.95 (US) I take it. do you own this book Ralph? From Eric
----- Original Message ----- From: "Ralph Hilton" <ralph@ralphhilton.org> To: <AVR-Chat@yahoogroups.com> Sent: Saturday, February 05, 2005 9:28 AM Subject: Re: [AVR-Chat] Best C tutorial for AVR On Sat, 05 Feb 2005 01:13:51 +1300 you wrote: The book at http://www.prllc.com/productcart/pc/viewPrd.asp?idcategory=6&idproduct=12 gives a good description of using C on AVRs with lots of good example code. >Lee I believe you have had no response, > >I think you might not have to learn anything new on C, >if you are up to speed on C as a programming language, all you have to learn is how to interface C with >the microprocessor, and learn what header files you need to make your program to work. > > >I hope you are not confused here what I have just said. > > >From Eric > > > >----- Original Message ----- >From: <fredit@charter.net> >To: <AVR-Chat@yahoogroups.com> >Sent: Thursday, February 03, 2005 6:48 AM >Subject: [AVR-Chat] Best C tutorial for AVR > > > >Hello, I need to get a good C tutorial for the AVR. I have been programming for the bs2.. and would now >like to move over to the AVR and C. > >Is there any good online resources to learn C for the AVR? > >thanks! >Lee > > > > >Yahoo! Groups Links > > > > > > > > > > >Yahoo! Groups Links > > > > > > > -- Ralph Hilton http://www.ralphhilton.org C-Meter: http://www.cmeter.org FZAOINT http://www.fzaoint.net Yahoo! Groups Links
2005-02-04 by Ralph Hilton
On Sat, 05 Feb 2005 09:47:24 +1300 Eric wrote: > >I am sure if you knew you C >you would not have slash out with $67.95 (US) I take it. > > >do you own this book Ralph? Yes, I bought a copy when I started with AVRs. I'd used C++ quite a bit before but there are aspects of C that one doesn't get into using something like C++ Builder for windows apps. Only the first chapter covers an intro to C and that is worth reading as it presents the language with an embedded processing orientation. I felt the material was well presented in a gradient that was very workable for me. I would say that its time they updated in for current processors and some changes in CVAVR such as pointer syntax. I had quite a heavy learning curve and brainache switching to thinking with microprocessors. One of the reasons I bought CVAVR was that an easy to read and understandable book was available. Another reason was that the CVAVR list seemed very friendly to newcomers and helpful. Given that I don't have a large budget available I considered using Bascom but was put off by the brusque and occasionally rather unpleasant attitudes on the support list. At that time I was only considering developing one application. Now its become somewhat addictive and I'm glad I got that C compiler as Basic is very restrictive. Pavel was even good enough to give me free updates for life after I ported the Megaload bootloader to CVAVR and put up a webpage on it http://cmeter.org/CVmegaload/ If someone wants a copy of the book I would search around for the best price. It was cheaper for me to get it sent from the UK for GBP33 than locally. > >From Eric > >----- Original Message ----- >From: "Ralph Hilton" <ralph@ralphhilton.org> >To: <AVR-Chat@yahoogroups.com> >Sent: Saturday, February 05, 2005 9:28 AM >Subject: Re: [AVR-Chat] Best C tutorial for AVR > >On Sat, 05 Feb 2005 01:13:51 +1300 you wrote: > >The book at >http://www.prllc.com/productcart/pc/viewPrd.asp?idcategory=6&idproduct=12 >gives a good description of using C on AVRs with lots of good example code. > -- Ralph Hilton http://www.ralphhilton.org C-Meter: http://www.cmeter.org FZAOINT http://www.fzaoint.net
2005-02-05 by Eric
Thanks you see the list of contents, like the other posting (book) but also you can download the first 2 chapters (in *.pdf) free. From Eric
----- Original Message ----- From: "Alex Shepherd" <maillists@ajsystems.co.nz> To: <AVR-Chat@yahoogroups.com> Sent: Saturday, February 05, 2005 8:27 AM Subject: RE: [AVR-Chat] Best C tutorial for AVR > Is there any good online resources to learn C for the AVR? Not sure about best but here is one I read a while ago: http://www.SmileyMicros.com/ Alex Yahoo! Groups Links
2005-02-06 by fnatmed
--- In AVR-Chat@yahoogroups.com, Ralph Hilton <ralph@r...> wrote: > On Sat, 05 Feb 2005 01:13:51 +1300 you wrote: > > The book at > http://www.prllc.com/productcart/pc/viewPrd.asp? idcategory=6&idproduct=12 > gives a good description of using C on AVRs with lots of good example code. I'll second the recommendation for this book. I think it's excellent. It does a good job at introducing C in conjunction with the AVR, and does a reasonably complex project start to finish. It covers many practical aspects in the project. Check around, you can find it cheaper online sometimes. Amazon, or even Borders Books. Dean.
2005-02-06 by Lee Leathers
2005-02-06 by Jose Fuentes
Use this: http://hubbard.engr.scu.edu/embedded/avr/doc/avr-libc/avr-libc-user-manual/twi_demo.html Just compile it with AVR GCC, and that's all. Take into account that this example is for devices like 24C04. If you use another device with different addressing then you will have to modify the source code. Check the documentation of mcp23016 and compare with 24C04's documentation. Regards Jose --- Lee Leathers <fredit@charter.net> escribió: > Hello, I am toying around with an mcp23016 (i2c port > expander) with my atmega 32. > > I have everything hooked up right.. but lack sample > code for hardware i2c (as I have heard this is very > diff from software i2c). > > Does anyone have any stripped down code (code just > to handle 1 device on the i2c) for the avr to be the > master on an i2c bus? > > > thanks-Lee ___________________________________________________________ 250MB gratis, Antivirus y Antispam Correo Yahoo!, el mejor correo web del mundo http://correo.yahoo.com.ar
2005-02-06 by Joe
The is some code on the Bascom list. http://groups.yahoo.com/group/bascomlist/files/ look for TWI --- In AVR-Chat@yahoogroups.com, "Lee Leathers" <fredit@c...> wrote: > Hello, I am toying around with an mcp23016 (i2c port expander) with my atmega 32. > > I have everything hooked up right.. but lack sample code for hardware i2c (as I have heard this is very diff from software i2c). > > Does anyone have any stripped down code (code just to handle 1 device on the i2c) for the avr to be the master on an i2c bus?
> > > thanks-Lee
2005-02-06 by Lee Leathers
----- Original Message -----From: JoeSent: Sunday, February 06, 2005 1:39 PMSubject: [AVR-Chat] Re: Hardware i2c with atmega 32
The is some code on the Bascom list.
http://groups.yahoo.com/group/bascomlist/files/
look for TWI
--- In AVR-Chat@yahoogroups.com, "Lee Leathers" <fredit@c...> wrote:
> Hello, I am toying around with an mcp23016 (i2c port expander) with
my atmega 32.
>
> I have everything hooked up right.. but lack sample code for
hardware i2c (as I have heard this is very diff from software i2c).
>
> Does anyone have any stripped down code (code just to handle 1
device on the i2c) for the avr to be the master on an i2c bus?
>
>
> thanks-Lee
2005-02-06 by Jim McGinn
2005-02-06 by Brian Dean
Hi Lee,
On Sun, Feb 06, 2005 at 02:36:14PM -0500, Lee Leathers wrote:
> I really needed C code.
I think I've come to this thread late, so I'm not sure exactly what
you are doing, Lee, but I have some sample code on my web site for
talking to several different I2C devices using my MAVRIC boards. My
MAVRIC uses an ATmega128, but the I2C stuff should be very similar to
the ATmega32.
http://www.bdmicro.com/code
Specifically, look at the following examples:
* i2cscan - simple I2C bus scanning tool
* srf08 - ping and read responses from Devantech SRF08 - and
ultrasonic ranger that communicates using I2C
* cmps03 - operating with a Devantech CMPS03 compass that uses
I2C
* sp03 - operating with a Devantech SP03 text to speech board
that also uses I2C for communications
In all of these cases, the MAVRIC board is the master device which I
think you mentioned is what you need to do. All are written using
GCC.
Hope this helps.
-Brian
--
Brian Dean
BDMICRO - ATmega128 Based MAVRIC Controllers
http://www.bdmicro.com/2005-02-07 by James Washer
Often, when you load a newer version of Studio, it loads new "firmware" down to the STK500, iirc - jim On Sun, 6 Feb 2005 15:42:10 -0700 "Jim McGinn" <mcginn@mcginnovation.com> wrote:
> Hi, > > I've got > AVR Studio 4.05 > STK500 > hardware Rev. C-2 > firmware revsion 1.30 > > A friend of mine has > AVR Studio 4.06 > STK500 > hardware Rev. C-2 > firmware revsion 1.40 > > His computer works with his STK500, and my computer works with mine, but my computer cannot talk to an ATmega8 in his STK500. My computer can read the osc., VTaget, and ARef from his STK500, but it won't talk to the ATmega8. > > Any idea why this might be? > > Regards, > Jim McGinn
2005-02-07 by Lee Leathers
@awk '/# .Id/,/^# DO NOT DELETE/' Makefile > Makefile.new
What should this be then?
thanks! Lee
----- Original Message -----From: Brian DeanSent: Sunday, February 06, 2005 6:01 PMSubject: Re: [AVR-Chat] Re: Hardware i2c with atmega 32Hi Lee,
On Sun, Feb 06, 2005 at 02:36:14PM -0500, Lee Leathers wrote:
> I really needed C code.
I think I've come to this thread late, so I'm not sure exactly what
you are doing, Lee, but I have some sample code on my web site for
talking to several different I2C devices using my MAVRIC boards. My
MAVRIC uses an ATmega128, but the I2C stuff should be very similar to
the ATmega32.
http://www.bdmicro.com/code
Specifically, look at the following examples:
* i2cscan - simple I2C bus scanning tool
* srf08 - ping and read responses from Devantech SRF08 - and
ultrasonic ranger that communicates using I2C
* cmps03 - operating with a Devantech CMPS03 compass that uses
I2C
* sp03 - operating with a Devantech SP03 text to speech board
that also uses I2C for communications
In all of these cases, the MAVRIC board is the master device which I
think you mentioned is what you need to do. ; All are written using
GCC.
Hope this helps.
-Brian
--
Brian Dean
BDMICRO - ATmega128 Based MAVRIC Controllers
http://www.bdmicro.com/
2005-02-07 by Lee Leathers
----- Original Message -----From: Brian DeanSent: Sunday, February 06, 2005 6:01 PMSubject: Re: [AVR-Chat] Re: Hardware i2c with atmega 32Hi Lee,
On Sun, Feb 06, 2005 at 02:36:14PM -0500, Lee Leathers wrote:
> I really needed C code.
I think I've come to this thread late, so I'm not sure exactly what
you are doing, Lee, but I have some sample code on my web site for
talking to several different I2C devices using my MAVRIC boards. My
MAVRIC uses an ATmega128, but the I2C stuff should be very similar to
the ATmega32.
http://www.bdmicro.com/code
Specifically, look at the following examples:
* i2cscan - simple I2C bus scanning tool
* srf08 - ping and read responses from Devantech SRF08 - and
ultrasonic ranger that communicates using I2C
* cmps03 - operating with a Devantech CMPS03 compass that uses
I2C
* sp03 - operating with a Devantech SP03 text to speech board
that also uses I2C for communications
In all of these cases, the MAVRIC board is the master device which I
think you mentioned is what you need to do. ; All are written using
GCC.
Hope this helps.
-Brian
--
Brian Dean
BDMICRO - ATmega128 Based MAVRIC Controllers
http://www.bdmicro.com/
2005-02-07 by John Samperi
At 09:42 AM 7/02/2005, you wrote:
>Hi,
>
>I've got
> AVR Studio 4.05
> STK500
Studio 4.11 has been out for a few weeks if you would like to update.
Regards
John Samperi
******************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495 Fax (02) 9674-8745
Email: samperi@ampertronics.com.au
Website http://www.ampertronics.com.au
* Electronic Design * Custom Products * Contract Assembly
******************************************************2005-02-07 by Lee Leathers
----- Original Message -----From: Brian DeanSent: Sunday, February 06, 2005 6:01 PMSubject: Re: [AVR-Chat] Re: Hardware i2c with atmega 32Hi Lee,
On Sun, Feb 06, 2005 at 02:36:14PM -0500, Lee Leathers wrote:
> I really needed C code.
I think I've come to this thread late, so I'm not sure exactly what
you are doing, Lee, but I have some sample code on my web site for
talking to several different I2C devices using my MAVRIC boards. My
MAVRIC uses an ATmega128, but the I2C stuff should be very similar to
the ATmega32.
http://www.bdmicro.com/code
Specifically, look at the following examples:
* i2cscan - simple I2C bus scanning tool
* srf08 - ping and read responses from Devantech SRF08 - and
ultrasonic ranger that communicates using I2C
* cmps03 - operating with a Devantech CMPS03 compass that uses
I2C
* sp03 - operating with a Devantech SP03 text to speech board
that also uses I2C for communications
In all of these cases, the MAVRIC board is the master device which I
think you mentioned is what you need to do. ; All are written using
GCC.
Hope this helps.
-Brian
--
Brian Dean
BDMICRO - ATmega128 Based MAVRIC Controllers
http://www.bdmicro.com/