Hi
I need the following information about ATmega1284P.
1) Is it easily available? i.e. is it frequently used for designing.
2) what is its cost?
3) In the comparison sheet in the RTC column Yes was written.
I want to know whether RTC is there inside or does it mean that it
provides support for connecting RTC..
This questions may be too childish but please reply as I don't have
much experience inthis field.
------------------------------------
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.
(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
On Tue, Oct 14, 2008 at 06:53:33PM -0000, Sharad Bagri wrote:
> Hi
> I need the following information about ATmega1284P.
>
> 1) Is it easily available? i.e. is it frequently used for designing.
>
> 2) what is its cost?
You have to ask that question of whoever you plan on purchasing parts
from.
> 3) In the comparison sheet in the RTC column Yes was written.
> I want to know whether RTC is there inside or does it mean that it
> provides support for connecting RTC..
>
> This questions may be too childish but please reply as I don't have
> much experience inthis field.
Go to http://www.atmel.com/ and download the datasheet (probably 400+
pages of PDF) and find out for yourself.
IIRC the ATmega64 has "RTC" which requires a separate 32,678 Hz watch
crystal but isn't easily "battery backed." Depending on how many
thousands of items you intend to sell, its probably best to glue a
Dallas PC-compatible clock module which contains the battery and
isolation circuits and everything you need.
OTOH its pretty standard practice to set one of the timers on the chip
as a periodic timer incrementing a memory variable every time the timer
overflows. Then in software you can consult that variable to know how
much time has passed. But even better in that interrupt routine I like
to place multiple "software timers" which count down to zero like this:
volatile uint8_t
timer_user_interface = 0,
timer_serial = 0,
timer_egg = 0;
interrupt real_time(void) {
if( timer_user_interface )
timer_user_interface--;
if( timer_serial )
timer_serail--;
if( timer_egg )
timer_egg--;
...
}
Then elsewhere if you want to know if real_time() has been called 54
times since something you might say, "timer_egg = 54;" at that
something, then test for timer_egg == 0 in your loop.
If you need longer time interval than fits in uint8_t you can use a
larger type but when setting or testing outside of the interrupt you
need to disable interrupts for a moment so that the interrupt does not
change your timer variable.
--
David Kelly N4HHE, d...@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.
------------------------------------

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )