avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avrdude-dev] FW: avrdude + avrstudio / stk500 / ATMEGA162 - program


From: Galen Seitz
Subject: Re: [avrdude-dev] FW: avrdude + avrstudio / stk500 / ATMEGA162 - programming problems
Date: Wed, 22 Dec 2004 11:51:42 -0800


>From the mega162 datasheet:

Default Clock Source

 The device is shipped with CKSEL = 0010 , SUT = 10 and CKDIV8
 programmed. The default clock source setting is therefore the Internal
 RC Oscillator with longest startup time and an initial system clock
 prescaling of 8. This default setting ensures that all users can make
 their desired clock source setting using an In-System or Parallel
 programmer.

...

Calibrated Internal RC Oscillator

 The calibrated internal RC Oscillator provides a fixed 8.0 MHz clock.



This means that the clock coming from the STK500 oscillator is not being
used, assuming this is the first time you have programmed the part (ie
it is in its factory default state).  Thus the actual system clock is 1
MHz.  When the SPI is configured as Slave, the SPI is only guaranteed to
work at fosc/4 or lower.  You need to set the SCK period >= 4 us.  Use
the avrdude command 'sck 4'.  I think this will solve the problems you
are having.  BTW, AvrStudio has the ability to change the SCK period,
but I can't remember where.

galen






reply via email to

[Prev in Thread] Current Thread [Next in Thread]