Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

atmega8 to atmega168 porting problem
Goto page Previous  1, 2
 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> AVR
View previous topic :: View next topic  
Author Message
laborratte

Bascom Expert



Joined: 27 Jul 2005
Posts: 262
Location: Berlin

germany.gif
PostPosted: Wed Nov 06, 2013 12:23 pm    Post subject: Reply with quote

Writing random stuff to EEPROM is definitively a sign of unsufficient voltage.

Mega8 and mega168 are different generations of chips, they have different electrical characterics. The interesting part is, that the newer mega168 has nominal better values (faster EEPROM write, higher LOW border on input pin) but seems not as stable as the old mega8 on low voltages. With 8Mhz you should also not drop below 2,7V for mega168 (same as mega8), 1,8V is for max. 4Mhz (maybe you can reduce clock at all, this can lead to more stable EEPROM write - mmmh - maybe not, EEPROM write mechanism is derived from internal RC...).

If you have no chance to measure the voltagedrop-vs.-time before and behind the diode measure the current consuption (total, as you said 100-200mA) and the current through the diode. Then you can roughly calculate the time, when Vcc reaches the difficult point of 2,7V (about 0,6*C*U/I).

Timer-INT: you can work with nested interrupts. enable interrupt in timer-isr like
Code:

timer0_isr:
  disable timer0
  enable interrupts
  ..
  ..
  disable interrupts
  enable timer0
return
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> AVR All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum