Re: TI-H: More AVR Qs
[Prev][Next][Index][Thread]
Re: TI-H: More AVR Qs
>Greetings,
>This is a consolidation of several replies and my responses to my questions
>about AVRs. There are a couple more questions at the bottom.
>
>Thanks for your input everyone!
>
>Nick wrote:
>>[Timing precision and accuracy depend] on what you're using as a clock
>>source. if you're using a high-grade crystal with some bullet-proof wiring,
>>the spec sheets for the part can be extremely accurate (i know that the
>>higher-end pics can meausre down to 10 nanoseconds or so..)
>
>For my data logging project I will be needing accuracy and not much
>precision. I'd like a drift of less than a second or two over a month. I'll
>probably be running it at 4Mhz (or slower, power conservation is more
>important than speed). The times I record only need to be precise to about
>a second or so.
>Would the internal RC clock get me that kind of accuracy (withing a couple
>of seconds a month)?
If you keep the temperature of the AVR THE SAME.
>For my timing project I'll be measuring durations of around 25 seconds, with
>precision of better than 1 millisecond. I figure I'll run that one at 12
>Mhz. Does this sound like a reasonable goal?
What kind of logging do you need? Analog? it takes about 39 instructions
to use the SAR method (fastest). That would mean you would need at least a
500kHz clock (saves power and gives you a little processing power)
>Grant wrote:
>>You should use the 8515 for digital logging and 8535 for analogue logging.
>>They both have 512bytes of SRAM.
>
>512 bytes is way small for my data logging application, which could require
>up to 8Kb per sensor channel if left unattented for a month or so.
Then throw on 64kbtye sram.
>The analog inputs would be nice (ie, cheaper), but for now I'm sticking with
>digital sensors (I happen to have some on hand). I'm thinking the One
>Wire(tm) sensors from DalSemi would be nice, but they cost too damn much. I
>like them cuz I can put several on the same bus, and they are reasonably
>small, so I can stick them at the end of probes and such.
>
>>Use a Mega103L if you need 4k.
>
>Cost and size are important factors here, I'm using the SOIC version of the
>AT90S1200, the Mega versions are both too big and too expensive.
$10 too expensive?
>>All memory bus AVRs can use an external 64kbyte of SRAM.
>
>What is a memory bus AVR? Does that apply to the 1200?
No. You can put SRAM on a 1200 though it only has a 3 layer stack.
>>EEPROM would die in a few hundred thousand accesses.
>PerErik wrote:
>>Thats true... better with a SRAM and a Battery.
>
>For my data logging application it would typicaly be cleared every month or
>every week at the most, so that won't really be a problem. The timer
>project won't need any memory for data storage (results will be sent
>directly to a computer via serial port).
EEPROM would work fine as long as you don't need it to run for 8,333 years
error free. :)
>Grant wrote:
>>Your AT90S1200 has built in EEPROM.
>
>Unfortunately the 64 bytes of EEPROM on the 1200 is next to useless for my
>data logging.
I2C.
>The commercial versions in 20 pin DIP from insight electronics are:
>AT90S1200 2.09
>AT90S2313 3.09
>AT90S2323 2.73
>AT90S4414 5.72
>AT90S4434 6.71
>AT90S8515 7.45
The 4414,4434,8515,8535 are not 20Pin.
>Ok, now a couple more questions.
>For now am locked into the AT90S1200 (I already have them).
>
>Is it difficult to communicate with the computer via a serial cable?
No.
>Since
>my AVR will be using 5v, I presume I will need an RS232 level shifter (I'll
>be communicating over fairly long distances).
MAX232 works fine. Get them free from maxim-ic.
>Is there AVR code available
>somewhere that I can use for RS232 communication?
Application note on Atmel's www site
>Is code available to do a PWM output?
Application note on Atmel's www site. :)
Follow-Ups:
References: