Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Programming ATMega128

Programming ATMega128

2006-03-14 by filipesbp

Hi, 
I use Ponyprog and the parallel programmer of the Ponyprog page,
I've started to use the Atmega128 and i wanted to use a cystal 
oscilator, so i've tried to program the fusebits, in ponyprog i've 
make a reading of the fusebits, changed the CKOPT and the CKSEL, after 
that i make a write.. 
Now the problem, after that i've can not read or write the ATmega, 
what it i do wrong? 
I've tried t scope the pins and the MISO pin (PE1) is always at 1.

Re: [AVR-Chat] Programming ATMega128

2006-03-15 by Jeffrey Engel

I had a simillar problem with PonyProg and an ATmega8.
 In my case, I had programmed the fuse bits the
opposite of what I thought I had.  Naturally, I blame
PonyProg for being non-intuitive and confusing me. . .
<grin>

Good Luck!

Jeff Engel
Arlington, TX  USA
--- filipesbp <filipesbp@sapo.pt> wrote:

> Hi, 
> I use Ponyprog and the parallel programmer of the
> Ponyprog page,
> I've started to use the Atmega128 and i wanted to
> use a cystal 
> oscilator, so i've tried to program the fusebits, in
> ponyprog i've 
> make a reading of the fusebits, changed the CKOPT
> and the CKSEL, after 
> that i make a write.. 
> Now the problem, after that i've can not read or
> write the ATmega, 
> what it i do wrong? 
> I've tried t scope the pins and the MISO pin (PE1)
> is always at 1.


Happiness is - positive intake manifold pressure.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com

RE: [AVR-Chat] Programming ATMega128

2006-03-15 by wbounce

I do not have the ponyprog but sometime use a different programmer. I
had in the past corrupted the fuse bits. To get things working again I
had to connect another board to the xtal1 and 2 and generate a 1mhz
pulse on the other board long enough for me to reprogram the fuse bits
to the right clock setting
Show quoted textHide quoted text
-----Original Message-----
From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On
Behalf Of Jeffrey Engel
Sent: Tuesday, March 14, 2006 10:05 PM
To: AVR-Chat@yahoogroups.com
Subject: Re: [AVR-Chat] Programming ATMega128


I had a simillar problem with PonyProg and an ATmega8.
 In my case, I had programmed the fuse bits the
opposite of what I thought I had.  Naturally, I blame
PonyProg for being non-intuitive and confusing me. . .
<grin>

Good Luck!

Jeff Engel
Arlington, TX  USA
--- filipesbp <filipesbp@sapo.pt> wrote:

> Hi,
> I use Ponyprog and the parallel programmer of the
> Ponyprog page,
> I've started to use the Atmega128 and i wanted to
> use a cystal 
> oscilator, so i've tried to program the fusebits, in
> ponyprog i've 
> make a reading of the fusebits, changed the CKOPT
> and the CKSEL, after 
> that i make a write.. 
> Now the problem, after that i've can not read or
> write the ATmega, 
> what it i do wrong? 
> I've tried t scope the pins and the MISO pin (PE1)
> is always at 1.


Happiness is - positive intake manifold pressure.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


 
Yahoo! Groups Links

RE: [AVR-Chat] Programming ATMega128

2006-03-15 by Jean-Christophe Pince

You should double check in the ATMega128 documentation
but when you select an external clock, you cannot
access the ATMega since it is not correctly clocked
with the external oscillator.
Check that the oscillator is correctly connected to
the XTAL1 and XTAL2 pins and that your oscillator
capacitors are adapted.


--- filipesbp <filipesbp@sapo.pt> a écrit :


---------------------------------
Hi, 
I use Ponyprog and the parallel programmer of the
Ponyprog page,
I've started to use the Atmega128 and i wanted to use
a cystal 
oscilator, so i've tried to program the fusebits, in
ponyprog i've 
make a reading of the fusebits, changed the CKOPT and
the CKSEL, after 
that i make a write.. 
Now the problem, after that i've can not read or write
the ATmega, 
what it i do wrong? 
I've tried t scope the pins and the MISO pin (PE1) is
always at 1.




      

      SPONSORED LINKS  
                                                Atmel
avr                                   
Microcontrollers                                   
Intel microprocessors                                 
                              Pic microcontrollers    
                                  
    
---------------------------------
  YAHOO! GROUPS LINKS

  
    Visit your group "AVR-Chat" on the web.
   
    To unsubscribe from this group, send an email to:
 AVR-Chat-unsubscribe@yahoogroups.com
   
    Your use of Yahoo! Groups is subject to the Yahoo!
Terms of Service.

  
---------------------------------





	

	
		
___________________________________________________________________________ 
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com

Re: [AVR-Chat] Programming ATMega128

2006-03-17 by pinky elodia

hi
i used to have problem also with atmega128
just wanna give some tips
for atmega128, miso is PE1, and mosi is PE0
fuse setting..as i use oscillator 8MHz - i selected on JTAGEN, BOOTSZ1,BOOTSZ0, SUT0...then it should be ok

Jeffrey Engel wrote:
Show quoted textHide quoted text
I had a simillar problem with PonyProg and an ATmega8.
In my case, I had programmed the fuse bits the
opposite of what I thought I had. Naturally, I blame
PonyProg for being non-intuitive and confusing me. . .


Good Luck!

Jeff Engel
Arlington, TX USA
--- filipesbp wrote:

> Hi,
> I use Ponyprog and the parallel programmer of the
> Ponyprog page,
> I've started to use the Atmega128 and i wanted to
> use a cystal
> oscilator, so i've tried to program the fusebits, in
> ponyprog i've
> make a reading of the fusebits, changed the CKOPT
> and the CKSEL, after
> that i make a write..
> Now the problem, after that i've can not read or
> write the ATmega,
> what it i do wrong?
> I've tried t scope the pins and the MISO pin (PE1)
> is always at 1.


Happiness is - positive intake manifold pressure.

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Yahoo! Mail
Use Photomail to share photos without annoying attachments.

Long delays

2006-03-19 by OWEN-A

I need to generate delays of up to 24 hours on a Mega16 has anyone any suggestions, I could use an RTC but there may be another option as strict timekeeping is not necessary for this application.

Thanking You,

Owen.

Re: [AVR-Chat] Long delays

2006-03-19 by Ned Konz


On Mar 18, 2006, at 6:52 PM, OWEN-A wrote:

I need to generate delays of up to 24 hours on a Mega16 has anyone any suggestions, I could use an RTC but there may be another option as strict timekeeping is not necessary for this application.


Why not just extend one of the timers with your own variable? For instance, if you have a 10 Hz interrupt from an 8-bit timer, you can increment a 24-bit variable from its overflow and get a 32-bit timer (the low byte is the timer register, the upper 3 are your variable).

Re: [AVR-Chat] Long delays

2006-03-19 by David Kelly

On Mar 18, 2006, at 8:52 PM, OWEN-A wrote:

> I need to generate delays of up to 24 hours on a Mega16 has anyone  
> any suggestions, I could use an RTC but there may be another option  
> as strict timekeeping is not necessary for this application.
As others have said, implement a timer overflow counter. RTC hardware  
is a PITA and totally unnecessary. Pick any timer that you don't  
reset. Size your counter according to how long of an interval you  
wish to measure.

Then I suggest rather than counting overflows, you subtract the  
overflows from your "software timer" variable. So when you wish to  
know when 24 hours has elapsed you preload 24 hours worth of  
overflows in the variable. When it reaches zero, time is up!

Make sure you catch it reaching zero by only decrementing non-zero  
values:

Put this in your hardware timer overflow IRQ service routine:

	if( my_24_hour_timer )
		my_24_hour_timer--;

If my_24_hour_timer is larger than 8 bits (most likely) wrap it in cli 
()/sei() when testing outside of an IRQ service routine so that the  
value doesn't change in the middle of your compare. Is also best to  
declare "volatile" to ensure the compiler doesn't optimize out the  
reloading of my_24_hour_timer every time thru your loop.

	cli();
	if( my_24_hour_timer == 0 ) {
		sei();
		do_the_24_hour_thing();
	}
	sei();	//  doesn't hurt to have an extra sei()

--
David Kelly N4HHE, dkelly@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.

RE: [AVR-Chat] Long delays

2006-03-19 by OWEN-A

Thank you for all that have replied to the long delay question you have all helped considerably.

Owen.

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.