Go Down

Topic: Help in programming the Atmega1284 with maniacbug-mighty-1284p. (Read 25 times) previous topic - next topic


Feb 02, 2013, 12:17 pm Last Edit: Feb 02, 2013, 01:25 pm by pito Reason: 1
FYI - a simulation - signal from FTDI to the Rx pin, and Rx coupled via a parasitic capacitance to the XTAL1 pin of the 1284p's oscillator. For 3 parasitic capacitances - 1pF, 5pF, 10pF. You may see the effect on the frequency when the rising edge of the Rx signal comes in. May behave differently - depends on the gate (here 4011 gate model used), xtal (??), etc. parameters used.

Disclaimer: this is only a simple simulation with parts with different parameters as the 1284p probably includes. For demonstration purposes only. No warranties of any kind.


Feb 02, 2013, 12:55 pm Last Edit: Feb 04, 2013, 12:55 am by pito Reason: 1
And the same for 5pF parasitic capacitance between the pins and 200ohm (no resistor), 10k, 200k serial resistor. It seems the 200k does not create a glitch in the oscillation (in this simulation).

Disclaimer: simple simulation only, with different parts as included within 1284p. For demo purposes only. No warranties of any kind.

PS: The very bottom picture is probably the most realistic simulation out of all above- with 4049 inverter simulating the 1284p oscillator with more power (full swing), and 10pF capacitance between the RX and XTAL1 pins. The oscillator period changed from 127.1ns to 135.4ns after the Rx' rising edge (thus the frequency)..


With Low Fuse= F7 (Full Swing Oscillator 16K CK + 45ms) I cannot reproduce the upload errors anymore (the 10k serial resistor is not needed). It could be the 1284p operated @16MHz and 3V3 needs full swing (more power), otherwise the nearby RX pin may influence (modulate) the crystal oscillator frequency (especially with the DIP package with larger capacitance between the pins) and it comes to errors then..
PS: XTAL1 pin13 (RX is 14) - is the input of the crystal oscillator (high impedance, easy to modulate), would be better to have XTAL2 pin - the oscillator output - there (low impedance, harder to modulate)..

Huh! It's extremely cool that you've been carrying on with this problem while the rest of us have
been sleeping!

I don't know anything about USBasp or the ATmega fuses, and can barely understand the
convoluted description of the latter in the 1284 d/s, but you may have solved the problem.
Ref Table 9-1, maniacbug's boards.txt setup uses the low-power oscillator, low fuses = 0xFF,
instead of full swing oscillator, low-fuses = 0xF7 and there lies the RX0 sensitivity problem.
Plus, possibly the XTAL1 is in the wrong place.

Sheesh, can this endless muckup on 7 continents be that simple? !!!


Feb 03, 2013, 07:39 pm Last Edit: Feb 03, 2013, 08:58 pm by pito Reason: 1
I am using it just now w/o the resistor on a noisy breadboard with F7 and it works fine, no issues yet.. ;)

BTW, the 328p arduinos are lucky not to be affected by the issue as well as the Rx and Tx pins are far away off the XTAL1 pin. Moreover, XTAL1 (the critical sensitive crystal oscillator input) is flipped around against the 1284p and close to GND - GND acts as a shielding (GOOD)! See below..

IMHO the issue severity depends on the design (parasitic capacitance), crystal parameters, 2 crystal capacitors values, and how off is the actual crystal frequency from the recommended ie for 115k2:
Code: [Select]
8MHz crystal
57k   3.7% error
115k 7.8% error
16MHz crystal
57k   2.1% error
115k 3.7% error

Thus even a small additional error introduced ie. by such frequency pulling by Rx signal edges may disturb the Uart communication easily..
That is my current understanding  :P If Atmel plans a new die revision, I would recommend them to swap the oscillator pins, my invoice will follow :)


Good analysis, I think. Funny how Atmel flipped XTAL1,2 around between the 328 and 1284.
Also, 2.1 and 3.7% errors are on the edge of reliability, AFAIAC.

Go Up