| Author |
Message |
|
|
Posted: Apr 05, 2007 - 10:31 AM |
|


Joined: Jan 23, 2004
Posts: 9826
Location: Trondheim, Norway
|
|
I could do a quick one on managing multi-file C projects, if people want that instead of/before the dataflash one.
Can I get a quick feel for the relative desire for each tutorial topic?
- Dean  |
_________________ Atmel Studio 6.1 is now released, grab it here.
Report AS6/ASF bugs here.
|
| |
|
|
|
|
|
Posted: Apr 05, 2007 - 11:46 AM |
|


Joined: Jul 18, 2005
Posts: 62299
Location: (using avr-gcc in) Finchingfield, Essex, England
|
|
I'd have said there were just a shade more posts about Dataflash on a regular basis here than misunderstanding about the use of 'extern' - but the latter is a more fundamental concept that it's important for beginners to learn (how many times have you read about people defining variables in .h files!). It's a tricky call.
BTW another topic suggested the other day in (a GCC I think) thread was to have a tutorial about bootloaders. Again I read so often about people building boot+app as one project - maybe it's OK but it just doesn't seem right to me! Part of it is the perennial question of ways in which a bootloader can expose some of its routines for the use of the app - IOW "dynamic linking" |
_________________
|
| |
|
|
|
|
|
Posted: Apr 05, 2007 - 04:27 PM |
|


Joined: Dec 17, 2005
Posts: 1498
Location: Europe- Estonia- Tallinn
|
|
Multifile is a good idea. also the SPI communication...
As i know absolutely nothing about dataflash I think it would come in handy to read something about it  |
|
|
| |
|
|
|
|
|
Posted: Apr 06, 2007 - 01:14 AM |
|


Joined: Mar 28, 2001
Posts: 20363
Location: Sydney, Australia (Gum trees, Koalas and Kangaroos, No Edelweiss)
|
|
|
Quote:
I could do a quick one on managing multi-file C projects,
The principle would be the same for assembler I guess, breakdown the task into smaller, logical chunks, make reusable files like int vectors and int service, timers, usart, ram etc. |
_________________ John Samperi
Ampertronics Pty. Ltd.
www.ampertronics.com.au
* Electronic Design * Custom Products * Contract Assembly
|
| |
|
|
|
|
|
Posted: Apr 06, 2007 - 03:57 AM |
|


Joined: Nov 17, 2004
Posts: 6137
Location: Great Smokey Mountains.
|
|
Careful John, if you keep that up you'll invent C.
Smiley |
_________________ FREE TUTORIAL: 'Quick Start Guide for Using the WinAVR C Compiler with ATMEL's AVR Butterfly' AVAILABLE AT: http://www.smileymicros.com
|
| |
|
|
|
|
|
Posted: Apr 06, 2007 - 04:25 AM |
|


Joined: Mar 28, 2001
Posts: 20363
Location: Sydney, Australia (Gum trees, Koalas and Kangaroos, No Edelweiss)
|
|
|
Quote:
you'll invent C.
Do you mean I write my programs in C already whithout knowing it?  |
_________________ John Samperi
Ampertronics Pty. Ltd.
www.ampertronics.com.au
* Electronic Design * Custom Products * Contract Assembly
|
| |
|
|
|
|
|
Posted: Apr 06, 2007 - 02:47 PM |
|


Joined: Nov 17, 2004
Posts: 6137
Location: Great Smokey Mountains.
|
|
No, but when you wrap you functional modules in a macros that hide the pushing of parameters and popping of results, you'll be darn close. Remember, lots of folks call C a 'portable assembly language'. If you write a few simple C functions (NOT the printf('Hello world') monster) something like a function to set the bits in a port, and then look at the generated assembly code you might be surprised at how much it looks like C is using a good general method to 'modularize' subroutines in assembler. C really was invented by an assembly language programmer just trying to make his life easier.
Smiley |
_________________ FREE TUTORIAL: 'Quick Start Guide for Using the WinAVR C Compiler with ATMEL's AVR Butterfly' AVAILABLE AT: http://www.smileymicros.com
|
| |
|
|
|
|
|
Posted: Apr 06, 2007 - 02:52 PM |
|


Joined: Jul 18, 2005
Posts: 62299
Location: (using avr-gcc in) Finchingfield, Essex, England
|
|
Totally agree with Joe, C is nothing really more than an advanced assembler macro system.
Cliff |
_________________
|
| |
|
|
|
|
|
Posted: Apr 06, 2007 - 04:26 PM |
|


Joined: Nov 17, 2004
Posts: 6137
Location: Great Smokey Mountains.
|
|
With the great advantage that these 'macros' port easily to any assembler. Learn one set of 'macros' do all assemblers
Uh, sorry - looks like we hijacked another tread in the ongoing C vs Assembler tea party.
Smiley |
_________________ FREE TUTORIAL: 'Quick Start Guide for Using the WinAVR C Compiler with ATMEL's AVR Butterfly' AVAILABLE AT: http://www.smileymicros.com
|
| |
|
|
|
|
|
Posted: May 02, 2007 - 02:21 PM |
|

Joined: Oct 08, 2005
Posts: 96
|
|
| I would like to see a tutorial on how to select and setup timers to get a arbitrary timer interval, preferably using interrupt. And some discussion on the tradeoffs to get the highest precision. |
|
|
| |
|
|
|
|
|
Posted: May 02, 2007 - 08:41 PM |
|


Joined: Feb 14, 2007
Posts: 1858
Location: San Diego California
|
|
I can program anything in any language. Badly, I might add, but at least they’re all done.
The depressing part for me is. I don’t know enough about embedded systems to know what I even need to ask for a Tut on. So here is what I found time consuming to learn so far:
Have you done anything on fuses? Know I'm still confused as to when and why?
Timers, with interrupts, their precision, and when you need an exterior crystal.
When I first got here the acronyms and associated coding for SPI, TWI, JTAGICE mkII , AVRSAP, #&$#@!or whatever were a mystery. I still have to lookup new ones in a glossary and then the data sheet and then my head hurts. Is there an easier way to learn the embedded pin acronyms and systems?
Even hooking up the JTAGICE mkII with all the connectors for so many different chips for a first timer is a bit time consuming and scary. STK500 Tut would be nice.
The rest, thanks to you guys seem easy so far. Often you answer a question I don’t know I even have in someone else’s thread. Now that’s scary.
Thanks,
John |
_________________ Resistance is futile…… You will be compiled!
|
| |
|
|
|
|
|
Posted: May 02, 2007 - 11:20 PM |
|


Joined: Feb 14, 2007
Posts: 1858
Location: San Diego California
|
|
|
abcminiuser wrote:
I'm about to start a tutorial on interfacing with an Atmel dataflash. It'll cover SPI in the into, so that will take care of two birds with one stone (or keyboard!). Any objections?
- Dean
No. Good Idea!
Please do,
John |
Last edited by AllN on May 03, 2007 - 07:07 PM; edited 1 time in total
|
| |
|
|
|
|
|
Posted: May 03, 2007 - 02:39 PM |
|


Joined: Jan 23, 2004
Posts: 9826
Location: Trondheim, Norway
|
|
Actually I think I'll go for the timers for now. FAR too many timer-related questions in the main forums. I'll try to start tomorrow and continue next week, but I don't know how much free time I'll get.
Plan:
1) Introduction - What are they, what they can do, differences to software delays
2) Basic timers - running at Fcpu
3) Prescaler, clock sources
4) Setting up a simple timer, polled delay
5) Overflow interrupt
6) CTC interrupt mode
7) CTC hardware mode (tone generation example)
That seems like a pretty hefty gameplan for now. If I manage to write all that up into a tutorial, perhaps I'll write a second part for advanced uses (PWM, input capture, etc). Suggestions welcome.
- Dean  |
_________________ Atmel Studio 6.1 is now released, grab it here.
Report AS6/ASF bugs here.
|
| |
|
|
|
|
|
Posted: May 03, 2007 - 07:01 PM |
|


Joined: Feb 14, 2007
Posts: 1858
Location: San Diego California
|
|
|
abcminiuser wrote:
Actually I think I'll go for the timers for now. FAR too many timer-related questions in the main forums. I'll try to start tomorrow and continue next week, but I don't know how much free time I'll get.
Plan:
1) Introduction - What are they, what they can do, differences to software delays
2) Basic timers - running at Fcpu
3) Prescaler, clock sources
4) Setting up a simple timer, polled delay
5) Overflow interrupt
6) CTC interrupt mode
7) CTC hardware mode (tone generation example)
That seems like a pretty hefty gameplan for now. If I manage to write all that up into a tutorial, perhaps I'll write a second part for advanced uses (PWM, input capture, etc). Suggestions welcome.
- Dean
Including a comparison of watchdog timers?
Yeaaaaa Dean!!!
Thanks,
John |
|
|
| |
|
|
|
|
|
Posted: May 03, 2007 - 08:02 PM |
|


Joined: Dec 17, 2005
Posts: 1498
Location: Europe- Estonia- Tallinn
|
|
maybe in some years or so you can collect them all and publish a book "AVR programming in C for dummies"... can earn some more cash I know I would buy one even if I knew the stuff in it... It would be a reminder of a fellow freak in action and the early days of AVR'ing in my life... |
|
|
| |
|
|
|
|
|
Posted: May 03, 2007 - 08:36 PM |
|


Joined: Feb 14, 2007
Posts: 1858
Location: San Diego California
|
|
|
bloody-orc wrote:
maybe in some years or so you can collect them all and publish a book "AVR programming in C for dummies"... can earn some more cash  I know I would buy one even if I knew the stuff in it... It would be a reminder of a fellow freak in action and the early days of AVR'ing in my life...
As a new arrival here after reading all of Dean's Tut's I had always just assumed he was doing just that! And I though he was older. Then I read all the help he offers others and calculated the approximate time required and realized he probably isn’t.
But; dear Dean I hope you take Bloody-Orc's advice and compile your own book as a new constant source of income for years to come. Keep doing this at you're age on each subject you love and you will have several sources of income. Do what you love but (make plans to at least) support yourself, well.
Thanks for all you do,
John |
_________________ Resistance is futile…… You will be compiled!
|
| |
|
|
|
|
|
Posted: May 04, 2007 - 03:19 AM |
|


Joined: Jan 23, 2004
Posts: 9826
Location: Trondheim, Norway
|
|
|
Quote:
maybe in some years or so you can collect them all and publish a book "AVR programming in C for dummies"... can earn some more cash Wink
I've no talent for writing books. I'm able to make semi-coherent tutorials about specific subjects, but I'd be lost if I tried to link them all together. However, as far as cash goes, if I received $1 for each person who read one of my tutorials....
Quote:
As a new arrival here after reading all of Dean's Tut's I had always just assumed he was doing just that! And I though he was older. Then I read all the help he offers others and calculated the approximate time required and realized he probably isn’t.
I'm 18 since Feb 14th - I'm one of the young ones here (along with Daqq and a few others). Uni takes up a huge chunk of my days, and most of my home time is taken up by social commitments, Uni assignments, Uni homework and not a whole lot else. What time I do get to myself I usually spend posting and reading here. No time for anything else!
- Dean  |
_________________ Atmel Studio 6.1 is now released, grab it here.
Report AS6/ASF bugs here.
|
| |
|
|
|
|
|
Posted: May 04, 2007 - 04:06 AM |
|


Joined: Mar 28, 2001
Posts: 20363
Location: Sydney, Australia (Gum trees, Koalas and Kangaroos, No Edelweiss)
|
|
|
Quote:
No time for anything else!
and the "one" you were going out to dinner with a while ago??? IIRC you did NOT go to makkers either  |
_________________ John Samperi
Ampertronics Pty. Ltd.
www.ampertronics.com.au
* Electronic Design * Custom Products * Contract Assembly
|
| |
|
|
|
|
|
Posted: May 04, 2007 - 06:36 AM |
|


Joined: Jan 23, 2004
Posts: 9826
Location: Trondheim, Norway
|
|
Hey! I class that under "social commitments" . Quite seriously, with my girlfriend and Uni (and associated tasks for both!) I'm averaging only a couple of hours to myself per day. The only reason I remain pretty active at AVRFreaks is that I use some of my spare Uni time browsing and replying.
And no, not McDonalds . Nothing amazingly flash, but we'd rather do a nice restaurant/movies/etc a few times a month than waste our money on half the food at the really expensive places!
- Dean  |
_________________ Atmel Studio 6.1 is now released, grab it here.
Report AS6/ASF bugs here.
|
| |
|
|
|
|
|
Posted: May 07, 2007 - 08:44 AM |
|


Joined: Jan 23, 2004
Posts: 9826
Location: Trondheim, Norway
|
|
I've started work on the timers tutorial. If anyone would like to proof-read the tutorial as I complete it before I post (to reduce later corrections), please give me a yell here, or via PM.
I'm following the plan I wrote above - feel free to make your suggestions now!
- Dean  |
_________________ Atmel Studio 6.1 is now released, grab it here.
Report AS6/ASF bugs here.
|
| |
|
|
|
|
|