ATmega48V and ATtiny13V question

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi there,

I have a very serious problem. A month ago I finished with a new designe that uses the ATtiny13V been supplied by mains power and when mains fail, by a rechargable battery 2,4V(NiCd). The micro is clocked by the internal RC at 9.6MHz. The micro is sellected as 'V' because it must be functionable in the range of 1.8V - 5V.
The datasheet tell us that the ic is functionable using maximum clock frequency 6MHz in the range of 1.8 - 2.7V.

My question is what will be hapened if the Vcc is lower than 2.7V while the clock sellection is Internal 9.6MHz.
I have seen the safe operating area at the electrical characteristics, in the datasheet. There is no problem for me if the frequency is decreased while Vcc decreased

****************************************************
Is there any posibility for the internal RC to stop oscillate?????????????????????????????????????
****************************************************

It is very difficult for me to switch to internal 4.8MHz sellection, because the micro drives a step-up circuit (in the range of Vcc = 3 to 5V).

I also have the same problem in another design I am work on now. The diferense is that I use the ATmega48V (with 8MHz Internal RC) while the datasheet tells me that below 2.7V the maximum frequency cannot be more than 4MHz.

Please, I need some help.

Thanks for your time,

Michael.

Michael.

User of:
IAR Embedded Workbench C/C++ Compiler
Altium Designer

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In a newer datasheet such as for Mega48P or Mega48V, look for the section called "Speed Grades"; it is 28.3 in my version.

You will see a ramp on speed vs. voltage at the low end. You will see that your Mega88 will fall into the allowed area.

The AVR will not drop dead when you stray over the line, but for a production design I would honor the datasheet.

The Tiny13 also has such a ramp diagram, "Maximum Speed vs. Vcc". That would indeed indicate that over all temperature conditions 9.6MHz needs a Vcc of about 2.5V.

--You have a system clock prescaler, so you could divide your clock when on battery.
--You could see if the Tiny25 specs are better.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Regardless of whether the oscillator continues to work or not at the lower voltages, it is not a good idea to allow your oscillator to be influenced by such things.

Quote:
It is very difficult for me to switch to internal 4.8MHz selection, because the micro drives a step-up circuit (in the range of Vcc = 3 to 5V).

What does this have to do with running at 4.8MHz? You just need to adjust the code that is creating the output drive to generate the same frequency at the lower clock speed. Post your step-up code here for us to look at.

If you think education is expensive, try ignorance.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just to clarify:
The uC will not automatically change its clockspeed depending on the voltage it's supplied with.
[Edit: at least not to the extent required to keep the uC within 'spec' - there will be some drift]

It's up to you to keep your clockspeed within the limits given in the documentation. As previously mentioned, this can be achieved by using the clock pre-scaler 'on-the-fly'. Bear in mind that this will alter all the clock sources that rely on clk_CPU (e.g. clk_IO - used by timer[s]).

I'm sure it would be easier to just pick a clockspeed that's valid for the whole expected supply voltage range and adjust any timer pre-scalers / compare-points to suit.

Nigel Batten
www.batsocks.co.uk

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think that the clock prescaler is what I need.

Thanks for your help.

Michael.

Michael.

User of:
IAR Embedded Workbench C/C++ Compiler
Altium Designer

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

And how do you propose to do that? Use the comparator to detect power failure and switch to the lower frequency?

If you think education is expensive, try ignorance.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I use one of the ADC inputs to measure the battery voltage which directly supplies the uC.

Michael.

Michael.

User of:
IAR Embedded Workbench C/C++ Compiler
Altium Designer

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I use one of the ADC inputs to measure the battery voltage which directly supplies the uC.
Please note that the ATmega48 can directly measure its power supply without wasting an IO pin. Select Vcc as ADC reference voltage and internal 1.1V bandgap as ADC input. The ATtiny13 doesn't have this feature but the ATtiny25 does have it.

Regards
Sebastian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks,

S-Sohn, I will keep this suggestion inside my mind for the next design, using the ATmega48.

Michael.

Michael.

User of:
IAR Embedded Workbench C/C++ Compiler
Altium Designer