Re: TI-H: More AVR Qs


[Prev][Next][Index][Thread]

Re: TI-H: More AVR Qs




From: Grant Stockly <gussie@stockly.com>
> >> 500kHz clock (saves power and gives you a little processing power)
> >
> >No, in this case it will be digital.
>
> You could get away with a real slow clock.

In this case it will be a small part of a commercial product, so as long as
accuracy is high, the more precision I can get, the better :)  1000nS
accuracy is the target, so that we can advertise sub mS precision and
actually get it (thats 0.001mS).

For the best accuracy I figure I should use a crystal running at about 4x
the speed I want the AVR to run at, then divide it down and use that to
clock the AVR.  That way I get a very stable clock and keep the high
precision of running the AVR at high speed.

I think a clock of 1MHz should be about right, so I could use a 4MHz or so
crystal and divide by 4.  Does it sound like I'm on the right track here?

> >Specificly I have two
> >phototransistors, one sensing ambiant light, one sensing ambiant + the
light
> >from a 2-5mW laser pointer at about 15M.  The ambiant light sensor is
> >bypassed with a resister, output of the sensors is fed into a comparator,
> >the output of which will be read by the AVR.
>
> The comparator compares two voltages, so you'd have to have a refrence.

The ambiant light sensor is the refrence.  When the second sensors input
falls below the ambiant light input I will know that the beam has been
broken.

> Each AVR pin can supply 20ma.  If you tie two together...

Ok, so source and sink currents for those pins are the same?


> There are also a free "Keep it simple yet powerful" pascal compiler.

Do you have a URL for it, or is there a refrence to it on Atmel's site?

DK



Follow-Ups: References: