At 03:50 PM 11/07/2007, you wrote:
>The code that I'm using to handle the WDR is a very old
That COULD be the problem, I think the M128 needs a different
init than the older chips.
This is what I had in one project when I had to use either old 8515 or new
M8515. Of course I don't know if this is true in your case. :-)
.if mega8515
clr r16
out mcusr,r16 ;Clear reset flags
ldi r16,(1<<wdce)|(1<<wde) ;Start WD
change timed sequence
out wdtcr,r16
ldi r16,(1<<wde)|(1<<wdp2)|(1<<wdp1)|(1<<wdp0)
out wdtcr,r16
.else
ldi r16,(1<<wde)|(1<<wdp2)|(1<<wdp1)|(1<<wdp0)
out wdtcr,r16
.endif
From the data sheet:
1. In the same operation, write a logic one to WDCE and WDE. A logic
one must be
written to WDE regardless of the previous value of the WDE bit.
2. Within the next four clock cycles, in the same operation, write the WDE and
WDP bits as desired, but with the WDCE bit cleared.
Regards
John Samperi
********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495 Fax (02) 9674-8745
Email: john@ampertronics.com.au
Website http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.10.2/894 - Release Date: 10/07/2007 5:44 PMMessage
Re: [AVR-Chat] Further Adventures
2007-07-11 by John Samperi
Attachments
- No local attachments were found for this message.