View previous topic :: View next topic |
Author |
Message |
matti
Joined: 18 Mar 2005 Posts: 3 Location: Weyhe, Germany
|
Posted: Sun Apr 03, 2005 12:00 am Post subject: Mega16 or Mega32 and FuseBits |
|
|
Hi there,
I have a Mega16. Since the "WAITMS"- Instruction was to slow I wanted to change the FuseBit from "internal 1 Mhz RC- Osc" to "external Osc". So I switched the FuseBit in the FuseBit Section of the BasCom Prog and pushed the "WriteF"- Button. After doing so my Mega16 refused to work. Every Programmer says "unknown device" What can I do ???
Is it possible to put this Chip back to work ?
I get the same result with a Mega32
Thanks in advance for every help...
Matti |
|
Back to top |
|
|
DToolan
Joined: 14 Aug 2004 Posts: 1384 Location: Dallas / Fort Worth, Texas (USA)
|
Posted: Sun Apr 03, 2005 12:44 am Post subject: |
|
|
What you didn't mention is, after doing this... did you attatch an external oscillator? |
|
Back to top |
|
|
matti
Joined: 18 Mar 2005 Posts: 3 Location: Weyhe, Germany
|
Posted: Sun Apr 03, 2005 7:36 am Post subject: |
|
|
Hello,
yes, of course, I put a crystal (4 Mhz) between the pins XTAL1 and XTAL2. On the Mega16 I put the Fusebit A987 to "0000" (external clock), and on the Mega32 I set the Fusebit to "1000" (ext low frequency xtal). Do these bits match my external crystal between XTAL1 and XTAL2 ?
matti |
|
Back to top |
|
|
Luciano
Joined: 29 Nov 2004 Posts: 3149 Location: Italy
|
|
Back to top |
|
|
Juergen
Joined: 13 Nov 2004 Posts: 85 Location: AZ, USA
|
Posted: Sun Apr 03, 2005 8:31 pm Post subject: |
|
|
matti wrote: | Hello,
yes, of course, I put a crystal (4 Mhz) between the pins XTAL1 and XTAL2. On the Mega16 I put the Fusebit A987 to "0000" (external clock), and on the Mega32 I set the Fusebit to "1000" (ext low frequency xtal). Do these bits match my external crystal between XTAL1 and XTAL2 ?
matti |
yes, but you also have to add a capacitor from each pin to ground! 18pF or 22pF should be ok for the start.
XTAL2 is an output. This is where you can actually sniff with a scope whether it's oscillating.
Juergen |
|
Back to top |
|
|
Luciano
Joined: 29 Nov 2004 Posts: 3149 Location: Italy
|
Posted: Mon Apr 04, 2005 9:31 am Post subject: |
|
|
Hi!
Verify the datasheets.
For the Mega 16:
CKSEL3..0 = 0000 (External Clock source)
This is not the setting for a Crystal!
See page 29 and 260-261 of the M16 datasheet.
For the Mega 32:
CKSEL3..0 = 1000 (External RC Oscillator Frequency Range MHz 8.0 - 12.0)
This is not the setting for a Crystal!
See page 26-27-28 and 255-256 of the M32 datasheet.
Luciano |
|
Back to top |
|
|
matti
Joined: 18 Mar 2005 Posts: 3 Location: Weyhe, Germany
|
Posted: Mon Apr 04, 2005 6:35 pm Post subject: |
|
|
Hi Folks,
YES, You're right. I had to read the datasheet first. As a newbee I learnt my lesson. Thank You for Your assistance.
Finally, with an external Clock, I got both ATMELs back to work. Now I set them to the right clock source !
FuseBits 1110, if the Clockoption bit were unchanged (CKOPT: 1).
Matti |
|
Back to top |
|
|
|