Yahoo Groups archive

AVR-Chat

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

Message

Re: Mega2560 chips - using for first time and am looking for coaching :-)

2006-09-15 by lcdpublishing

David,

Thanks so much for the information.  I believe I am going to be able 
to dedicate the SPI soley for programming - no other functions that 
I need will use those pins.

Uh-oh on the crystals and caps!!! I have always been using the cap 
rating as speced by the Xtal.  For instance if it says 18pF that is 
what I use - I don't know enough to know otherwise.  I would like to 
learn more about that but don't know what "the Fox site" is?


Can you clarify what this means " (2C)-5pF is a good starting "

Sorry, I am pretty much new to electronics and such and have only 
been stumbling my way through some relatively complex projects.  I 
have made some good progress, but electronics is far more complex 
than I ever imagined :-(

Thanks again!

Chris




--- In AVR-Chat@yahoogroups.com, "David VanHorn" <microbrix@...> 
wrote:
>
> >
> >
> > 1) ISP, I have never used ISP yet. It appears as though I just 
place
> > a 6 pin header on my board - wire that to the correct pins (SPI) 
and
> > plug the cable in for programming.  I will NOT be using SPI on my
> > project so it looks like those pins will only be used on my 
project
> > as PCINT input pins.  Any comments or suggestions about ISP for a
> > first-timer?
> 
> 
> You can use the pins, just put your programming connector so that 
it's
> directly connected to the chip, and resistors in the signals that 
feed other
> devices.  You need to make sure that the programmer "wins" any 
contention,
> easily.   Also watch that activity on those pins won't do anything 
bad in
> your hardware, like activate motors or something hazardous.
> 
> 
> 2) Coupling, someone suggested there could be coupling problems 
with this
> > chip and the mounting method. I don't know much about
> > electronics so I have no idea.  Should I just add some 1 uF caps 
at
> > every power entry point to prevent this problem?
> 
> 
> Oh boy.. Power Decoupling is something you need to take seriously, 
and 1uF
> caps are not a good choice.  This depends on your frequency of 
operation,
> and the actual caps you use, but generally 0.047 at 8 mhz is about 
right.
> If you have any choices, locate the caps at the ground pins on the 
chip, and
> take VCC to the cap, and from there to the chip. (forms an 
L/C "tee" filter
> using the track inductances)
> 
> 3) Is there anything "Different" to watch out for when using this
> > chip as compared to the mega48,88,168 chips that I am familiar 
with?
> 
> 
> Something you might not be aware of, I mention it a lot because the
> consequences are SO nasty.. The CKOPT fuse has a default state 
that enables
> a "vittoz mode" oscillator.  You definitely do NOT want this fuse 
in the
> default state!   If you scope the crystal with it in "vittoz 
mode", you'll
> see that the amplitude is about 0.5 VCC.   The chip will skip 
cycles, baud
> rates will be a bit off (always slow) and sometimes the chip will 
execute
> instructions wrong.  Or, if you got "lucky", you'll have just 
enough
> amplitude that everything will work.  Until you get a new batch of 
chips, or
> crystals, or have 10,000 units in production.
> 
> Also, crystal caps are determined by the crystal, NOT the chip, 
and a 22pF
> crystal does NOT use 22pF caps.  (2C)-5pF is a good starting 
point, see the
> app notes at Fox for details and a more rigorous treatment.
> 
> 
> [Non-text portions of this message have been removed]
>

Attachments

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.