Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: Beginner, I want a simple prog

2007-12-27 by John

Also, while we could provide some simple samples, the thing about the
world of micro-controllers is that most applications (even simple
ones) tend to be specific to the circuit used.

i.e.  I could provide you an example to blink the LED on an
ATmega8535, but that program would only work exactly the same for you
IF and only IF you had a similar LED attached in a similar fashion AND
ran your system off of a similar speed clock source.

That is - if I were to send you a sample app designed to blink the LED
using a 32 kHz clock and you were using a 16 MHz clock, the LED would
blink too fast.

That is - (same sample) if you had the LED attached to a different
port (or a different pin of the same port,) your LED would not blink.

That is why some of us get a bit frustrated when asked overly vague
questions.  We do not know which board you are using, the schematic of
the board is not known to us.  We could guess, but it would likely be
wrong and add to your level of frustration and confusion.

So, back to your original post of asking for a delay routine.  Things
that are ambiguous/need clarification:

1. What clock speed are you running at?
2. What range of delays do you want - microseconds or days or both?

These both are very necessary things to know to solve your delay look
problem.

Also, there is a really neat library called Avr LibC for WinAVR/GCC. 
(This is where googling and spending time digesting the freely
available info on the web come in.) It provides some sample wait
routines as well:

http://www.nongnu.org/avr-libc/user-manual/group__util__delay.html

Now, if you really wanted a delay routine, you could read through the
Avr LibC delay routines, contemplate how the above two questions are
pertinent to your original post - then try to ask very specific questions.

John

--- In AVR-Chat@yahoogroups.com, "Wael Abd Elgilil" <w.abdelgilil@...>
wrote:
>
> --- In AVR-Chat@yahoogroups.com, Jim Wagner <wagnerj@> wrote:
> >
> > 
> > On Dec 27, 2007, at 2:24 PM, Wael Abd Elgilil wrote:
> > 
> > > --- In AVR-Chat@yahoogroups.com, Tom Becker <gtbecker@> wrote:
> > >  >
> > >  > mido glgl wrote:
> > >  > > ... Me and Youssef are student in the same class...
> > >  >
> > >  > Why did you tell us November 30 that:
> > >  > "... really i'm in faculty of engineering..."?
> > >  >
> > >  > Are you a student or are you faculty?
> > >  >
> > >  mido glgl and youssef not in implementing so
> > >
> > >  any one can help us do that or don't wast our and his time
> > >
> > >
> > Wael Abd Elgilil
> > 
> > You question is so basic that most of us do not know how to
answer. It 
> > is as if you have never read a book about embedded processor 
> > programming, or the data sheet for the chip you wish to use.
> > 
> > Until you do some of that on your own, it is very hard to help you. 
> > Further, nobody will "give" you a simple program. If it is simple,
you 
> > need to learn how. The AVR Freaks website has many tutorials.
There is 
> > also an AVR Beginner website with lots of information about how to
get 
> > started.
> > 
> > Jim Wagner
> > Oregon Research Electronics
> > Tangent, OR, USA
> > 
> > 
> > [Non-text portions of this message have been removed]
> >
> Jim Wagner
> 
> thank you for your advice but be aware that iam a begginer and i want 
> the first footstep to start so i need an express way to walk
>

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.