im wondering why the MCU uses the wire as a clock ?Hi
I agree with brian.
Lucky you that it works most of the time. But it's surely not reliable.
I don't agree. There always is a reason....
Some rules
* a fast ceramics capacitor at almost each supply pin of each IC.
* a signal is never a one way from A to B, one alwas has to consider the way back from B to A. It is a loop.
* for "switching signals" one has to think about "impedance". Thus thick and wide wires/traces do not improve signal quality. Short traces, small enclosed area in the "signal and return" loop is what counts.
* it's the "edge" that causes high frequency ... and ringing. Thus a 1Hz LED blink signal cuases the same ringing as a 100kHz PWM signal, it´s just multiplied with time.
* especially for not that experienced PCB layouters I recommend to use a GND plane. It reduces all the above mentioned problems.
Hi GuysIn your case: to reduce the "loop area" --> just twist all (IN, OUT, GND) wires to the XTAL. It´s still not perfect, but much better regarding EMI, EMC and stray inductance.
Klaus
A general rule says:im wondering why the MCU uses the wire as a clock ?
check the video with 1 wire to pin XTAL1
hiYou are asking the wrong questions. Instead of asking why does the crystal oscillator "work" with just a wire connected (at whatever frequency), you should ask how to operate it stable at the designed frequency.
no internal 16MhzHi,
When I read post#25 I have more questions than answers.
* when talking about 16MHz ... there are two (or more options): external oscillator, or external chrystal (is internal 16MHz possible?)
* when talking about Arduino ... then often they use a Uart interface combined with a bootloader.
first time i used the Mighty core Library i just used the hex file genrated by Arduino IDE & set the fuses by Atmel studio & AvrISP MKIIIf I'm not mistaken, then fuses can't be set by bootloder / via Uart. But to modify the system clock you have to write the fuses. How is this done exactly?
No i didnt choose "external oscillator" & for sure i know what the XTAL is* when you say "the chip got bricked" .. then most likely when you choose "external oscillator" but use "XTAL" instead. (XTAL usually is a passive device with 2 legs. An oscillator is an active device that needs VCC and GND, CLK is output)
yes i have tried many ways to test*************
I think in post#25 you are using several methods...I'm mever sure which you use when
i write code using Arduino then upload it using AvrISP & Atmel studio 7* code (executable): arduino, studio, assembler...
* set fuse setup
what software you suggest to use with the MKII programmer ?* uploading the compiled to to the chip (Uart via bootloader, Jtag, ISP via external programmer, ... different PC software)
AvrISP & Atmel studio 7* uploading the fuses to the chip (programming hardware, PC software..)
in AVR fuse calculator :Thus I recommend to give use for each trial these informations.
**************
CKOPT is an option for XTAL operation. It selects the oscillation amplitude. Low amplitude for low power, high amplitude when you use the clock additionally on external devices. In doubt activate high amplitude)
Klaus
anyway in post 25 i uploaded a screen shot of Atmel studio 7 fuses pageHi,
For the ATMEGA32 to run with 16MHz. (Just from mind, no guarantee to be complete)
* don't use the ATMEGA32"L"
* use clean and stable 5V supply
* use correct XTAL
* use correct capacitors (for XTAL) according XTAL datasheet
* use proper PCB layout for XTAL circuit
* use proper supply bypass capacitors and PCB layour
* use CKOPT = 0
* use CKSEL = 1111
* RESET cycle
yes i know this from the previous issue when have locked the atmegha328 ChipProgramming fuses needs an extra programming step. I'm not sure you ever confirmed this.
Klaus
thanks klausHi,
I have not worked since years with AVRs. Thus I can not recommend any programming software. The programming GUI is textual, you have to compare the available options with the datasheet.
I rather use the bare bits than text. Every person has to find it's his way...
Klaus
Hithanks klaus
so i need someone works with Atmel Studio7 to explain how to set this values
i thought its easier with its options to select which crystal to use but seems to be very complicated
as i see in microchip getting started videos for newer Chips there are options to select the clock Source clearly
but not for ATmega32 as its old device i guess
Johnny
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?