Re: [AVR-Chat] Finally, really, actually, starting off with C
2009-01-09 by David VanHorn
> Hope you have fun in C :) So far, so good.. Still feeling my way through it.
Yahoo Groups archive
Messages
Page 65 of 307 · 15341 messages matched
2009-01-09 by David VanHorn
> Hope you have fun in C :) So far, so good.. Still feeling my way through it.
2009-01-09 by Kathy Quinlan
David VanHorn wrote: > > Yes.. The world probably will end in 2012, brought about in no small > part by my conversion to C. > Hi Dave, Sorry but I have already bookmarked the world to end in 2009 ;) Hope you have fun in C :) Regards, Kat.
2009-01-07 by David VanHorn
> Was "/n" a deliberate goof in the 2nd line? fumblefingers.. :)
2009-01-07 by David Kelly
On Wed, Jan 07, 2009 at 04:25:07PM -0500, David VanHorn wrote: > > > And if you thought debugging in asm was bad enough..fasten your seat > > belts!! > > while(1) > { > printf("C IS MORE EFFICIENT AND EASIER TO DEBUG AND MAINTAIN.\n"); > printf("EVERYONE SAYS SO, SO IT MUST BE TR
2009-01-07 by David VanHorn
> ..add an ICE (50 or mk2) and we better have mass repentance > before it's too late. I'm running iceless for now, but my experience with atmels ices has been less than stellar. (see comments from spring of 08..) > Watch out for the "optimizer" (aka code terminator) it will > get
2009-01-07 by dlc
You bet. It really isn't very difficult. If you get "Servo Magazine" you'll find a couple of articles that I wrote in the "Mr. Roboto" column about how to do this in the August and September 2008 issues. DLC wagnerj@proaxis.com wrote: > Got a Mac, also, and I'd like to use AVREcl
2009-01-07 by Dave Hylands
Hi John, > Watch out for the "optimizer" (aka code terminator) it will > get you "Time after time" (just to add a musical note). Interesting comment. I almost always compile with -Os and I've not had any problems at all with the optimizer. I do embedded linux drivers professional
2009-01-07 by David Kelly
On Wed, Jan 07, 2009 at 04:15:40PM -0200, Alexandre Guimar?es wrote: > Hi, Dave. > > Do you really need to use GCC ? Codevision is SO much more "user > friendly" for assembler programmers !! It was specifically conceived > for small targets and generates ( most of the time ) grea
2009-01-07 by John Samperi
At 03:45 AM 8/01/2009, you wrote: >Yes.. The world probably will end in 2012, brought about in no small >part by my conversion to C. . > WINAVR to get going.. . ..add an ICE (50 or mk2) and we better have mass repentance before it's too late. Watch out for the "optimizer" (aka co
2009-01-07 by subscriptions@aeolusdevelopment.com
Don Kinzer Wrote >The gcc compiler generates three distinct sections for RAM-based data >whose names are .noinit, .bss and .data. The .noinit section is for >uninitialized data items. The .bss section is for zero-initialized >data items (BSS stands for Block Started by Symbol, a
2009-01-07 by subscriptions@aeolusdevelopment.com
David VanHorn Wrote >> Global and static variables will always be auto-initialized to zero >> (according to the docs I've read), you'll need to initialize locals >> yourself if you care about their initial state (which you should). The >> compiler will not remove an unnecessary i
2009-01-07 by David VanHorn
> The generated code will look something like this excerpt: > 26a: 0e 94 3b 01 call 0x276 > 26e: 0c 94 4e 48 jmp 0x909c > 00000276 : > 276: ff cf rjmp .-2 > > Leaving out the return statement (as is commonly done) produces the > same result and no compiler warnings. One thing I w
2009-01-07 by wagnerj@proaxis.com
Got a Mac, also, and I'd like to use AVREclipse instead of WinAVR-AVRStudio/Windoze/VMWare but have been a bit afraid of it. Could I contact you off-list for some guidance? Jim Wagner > I'm a Mac user so I don't have > AVRStudio for my avr-gcc stuff. I use Eclipse with the AVREcl
2009-01-07 by David VanHorn
> Global and static variables will always be auto-initialized to zero > (according to the docs I've read), you'll need to initialize locals > yourself if you care about their initial state (which you should). The > compiler will not remove an unnecessary init. You are correct, do
2009-01-07 by Don Kinzer
The gcc compiler generates three distinct sections for RAM-based data whose names are .noinit, .bss and .data. The .noinit section is for uninitialized data items. The .bss section is for zero-initialized data items (BSS stands for Block Started by Symbol, a throwback to FORTRAN
2009-01-07 by Don Kinzer
--- In AVR-Chat@yahoogroups.com, "David VanHorn" wrote: > He assures me that GCC does not init variables automatically. If your question was specifically about statically allocated variables, then he knows not of what he speaks (at least in this regard). If you weren't clear as t
2009-01-07 by Alexandre Guimarães
Hi, Dave. Do you really need to use GCC ? Codevision is SO much more "user friendly" for assembler programmers !! It was specifically conceived for small targets and generates ( most of the time ) great code and when it does not using assembly inside of it is very easy also. And
2009-01-07 by David VanHorn
> GCC might be a rude surprise then! There is an init section of code > linked in that handles startup housekeeping that will take up several > hundred bytes. That is what handles the "int foo = 1;" stuff, so I > don't think that is avoidable. Of course it also handles setting up
2009-01-07 by dlc
David VanHorn wrote: >> As for variable initialization, I can't provide any information with any >> confidence. My reference is the avr-libc documentation and the gas (gnu >> assembler) documentation. For gcc tutorial, Smiley has a nice book out >> with some of the chapters on li
2009-01-07 by David VanHorn
> If you compile your code using the -ffreestanding option, then the > compiler won't complain that main doesn't return an int. Ok, I hacked that into the makefile, and it definitely works! Thanks :)
2009-01-07 by dlc
I'm a Mac user so I don't have AVRStudio for my avr-gcc stuff. I use Eclipse with the AVREclipse plugin for my dev environment. I say all of this because the AVREclipse plugin builds the make file automagically like any other "hand-holding" IDE. You do have control over your gcc
2009-01-07 by David VanHorn
> As for variable initialization, I can't provide any information with any > confidence. My reference is the avr-libc documentation and the gas (gnu > assembler) documentation. For gcc tutorial, Smiley has a nice book out > with some of the chapters on line on his website. You se
2009-01-07 by David VanHorn
> You can declare main like this instead: > > void main( void ) > { > .... > } > > If you compile your code using the -ffreestanding option, then the > compiler won't complain that main doesn't return an int. Ok, I'd already found that I can declare the return as void, but the co
2009-01-07 by Dave Hylands
Hi David, >> All their examples have main as returning an int. >> Returning a value from main, in a microcontroller is nonsensical, isn't it? >> Where would it return that to? >> Why would I want to spend four bytes of RAM on that? > > You can declare main like this instead: > >
2009-01-07 by dlc
Thanks Dave, I'd never have found that compiler option! DLC Dave Hylands wrote: > Hi David, > >> All their examples have main as returning an int. >> Returning a value from main, in a microcontroller is nonsensical, isn't it? >> Where would it return that to? >> Why would I want
2009-01-07 by Roy E. Burrage
No, the world will not end in 2012, Dave ... or 2011.5, Jim. Samperi and I'll hold a seat for you at the table when you're done with your excursions into crypticism. Isn't that what "C" stands for, cryptic? REB wagnerj@proaxis.com wrote: > Welcome to the world of the "kicking and
2009-01-07 by Dave Hylands
Hi David, > All their examples have main as returning an int. > Returning a value from main, in a microcontroller is nonsensical, isn't it? > Where would it return that to? > Why would I want to spend four bytes of RAM on that? You can declare main like this instead: void main( v
2009-01-07 by Dave Hylands
Hi David, > Welcome to GCC! GCC is a "big iron" compiler front end and all > programs written for full OS's require a return code for main(). AVR is > a custom backend of the compiler so main must be of type int for > compatibility reasons. Also, I highly recommend that you compi
2009-01-07 by dlc
David, David VanHorn wrote: > Yes.. The world probably will end in 2012, brought about in no small > part by my conversion to C. > > I bought an AVR-LIP kit from Deccan, and am using WINAVR to get going. > > I have a few questions. > > All their examples have main as returning an
2009-01-07 by wagnerj@proaxis.com
Welcome to the world of the "kicking and screaming". No, the world will end in 2011.5 because I "converted" slightly before you. 'Tis my understanding that SOME compilers require the return statement. IAR perhaps? My understanding is that gcc does not require it but tolerates it.
2009-01-07 by David VanHorn
Yes.. The world probably will end in 2012, brought about in no small part by my conversion to C. I bought an AVR-LIP kit from Deccan, and am using WINAVR to get going. I have a few questions. All their examples have main as returning an int. Returning a value from main, in a micr
2009-01-07 by Don Kinzer
>Why would I want to spend four bytes of RAM on that? If your main() is in the form of an infinite loop and you're using a suitably high level of optimization (typically -Os is recommended), the code actually generated by the compiler doesn't waste any RAM or code space. For exam
2009-01-07 by David Appleton
The ATMega128 is one that I've worked with that has 2 UARTs. Search ATMega128 on ebay. There are many development boards for the ATMEga128 [some already have the 9pin D connector in place for both UARTs. [Non-text portions of this message have been removed]
2009-01-07 by John Samperi
At 06:43 PM 6/01/2009, you wrote: >Is there any AVR series with 2 UART? LOTS of them. Start with the Mega164 etc. family. Some larger beast can have even 4. Regards John Samperi ******************************************************** Ampertronics Pty. Ltd. 11 Brokenwood Place Ba
2009-01-06 by Tim Mitchell
----Original Message---- From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf Of ichwanto Sent: 06 January 2009 07:44 To: AVR-Chat@yahoogroups.com Subject: [AVR-Chat] AVR with 2 UART > Is there any AVR series with 2 UART? I need it to make > contactless syst
2009-01-06 by ichwanto
Is there any AVR series with 2 UART? I need it to make contactless system which AVR connect to the contactless reader and PC with different UART, thank you very much.
2009-01-06 by Steven Hodge
I'm confused. The OP only said a few inches to a vague less than a couple of feet. I can easily envision a single board where the path length is "a few inches", and thus it would seem unnecessary to insert buffers or whatever just because the "few inches" had an off-board segment
2009-01-06 by leon Heller
----- Original Message ----- From: "Brian" To: Sent: Tuesday, January 06, 2009 12:33 AM Subject: [AVR-Chat] Comms between AVR's > What is the common comms method to use to commuicate between AVR's > (mega series) for short distances (USART, SPI, IIC, CAN), a few inches > to less
2009-01-06 by Julian Higginson
Of course, with the infrared, you also can move away from point to point and have much more flexibility in data addressing to and from different units, too (if you want to spend time making your own basic data transport layer) Also... a wired option for multiple listeners/respond
2009-01-06 by John Samperi
At 12:49 PM 6/01/2009, you wrote: >So... the software should not change when going from the ATMega128 to >the ATMega16? Shouldn't be..but then again. I think I have run some test code for both processors some time ago but I'm only a relatively new convert to I2C despite having so
2009-01-06 by John Samperi
At 11:58 AM 6/01/2009, you wrote: >Sure John, poetic, inspiring... etc. - Just like Vogon poetry ;-) How emotional, first C v ASM war for the year. :-) But beauty is in the eyes of the beholder..... And yes I have done my first (/last??) C project to find out first hand how painf
2009-01-06 by englsprogeny
John, I got it. This board I am playing with (this one is new to me) isn't wired as I expected. They put jumpers along both sides of the ATMega16. I assumed that the jumpers were for the pins that they were closest to.... I was wrong. They actually routed the traces so that the p
2009-01-06 by Julian Higginson
What kind of network topology? If you can work out a way to do point-to-point I'd go USARTS if you have at least one spare on each AVR. Nice and simple to use, and opens up all sorts of other comms options if you want. As John said, if you're going off-board, buffered signals are
2009-01-06 by Ivan Vernot
> -----Original Message----- > Sent: Tuesday, 6 January 2009 11:17 AM John Samperi Wrote: > > > At 07:22 AM 6/01/2009, you wrote: > >I just don't want to read asm > > But it's so poetic, inspiring, refreshing.... > Sure John, poetic, inspiring... etc. - Just like Vogon poetry ;-)
2009-01-06 by John Samperi
At 11:33 AM 6/01/2009, you wrote: >a few inches >to less than a couple of feet (not on the same board)? This could be >for 2 or more AVR's. I am using IIC for my eeprom and RTC. Once you go off board you should have buffers. As you are already using I2C you could get some buffers
2009-01-06 by englsprogeny
Hi John, Both configurations have 4.7K pullups for the clock and data lines. ATMega16 pin-22 to DS1307 pin-6 (SCL) ATMega16 pin-23 to DS1307 pin-5 (SDA) ATMega128 pin-25 to DS1307 pin-6 (SCL) ATMega128 pin-26 to DS1307 pin-5 (SDA) I am using a separate breadboard for the DS1307.
2009-01-06 by John Samperi
At 07:22 AM 6/01/2009, you wrote: >I just don't want to read asm But it's so poetic, inspiring, refreshing.... Regards John Samperi ******************************************************** Ampertronics Pty. Ltd. 11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA Tel. (02) 967
2009-01-05 by Brian
What is the common comms method to use to commuicate between AVR's (mega series) for short distances (USART, SPI, IIC, CAN), a few inches to less than a couple of feet (not on the same board)? This could be for 2 or more AVR's. I am using IIC for my eeprom and RTC. Brian
2009-01-05 by Cat C
I'm glad you did (release it)! I don't know if it's hard to read, I just don't want to read asm :-( ... if I have a choice,it takes me too long, but you do get what you were looking for (timing/control) so often there's no choice. Far from me to criticize your choice. Thanks agai
2009-01-05 by Cat C
That looks very nice, WOW. I wish it was NOT in asm, as I have no desire to go back to that... and that makes it hard for me to read, but WOW, great work! Cat ---------------------------------------- > To: AVR-Chat@yahoogroups.com > From: halfoster@gmail.com > Date: Sat, 3 Jan 20