Author Topic: SCK frequency for programming attiny13a  (Read 2218 times)

0 Members and 1 Guest are viewing this topic.

Offline ralphdTopic starter

  • Frequent Contributor
  • **
  • Posts: 445
  • Country: ca
    • Nerd Ralph
SCK frequency for programming attiny13a
« on: December 06, 2015, 04:42:35 pm »
I've been working on an AVR programmer using a m328p clocked at 16Mhz.   The datasheet for the 13a says the same thing as the other tiny AVRs:
The minimum low and high periods for the serial clock (SCK) input are defined as follows:
Low: > 2 CPU clock cycles for fck < 12 MHz, 3 CPU clock cycles for fck >= 12 MHz
High: > 2 CPU clock cycles for fck < 12 MHz, 3 CPU clock cycles for fck >= 12 MHz

The 13s have the CLKDIV8 fuse set (lfuse: 0x6A), so they should be OK with a 300kHz clock (9.6Mhz/8 /4).  Testing with a USBASP at 187500 works OK, and 375kHz fails as expected.
Using the m328p clocked at 16Mhz, I used SPI DIV64, for a 250kHz clock, but it didn't work.  DIV128 (125kHz) worked OK.  I wondered if I had messed up the SPI clock settings, so I put a scope on the SCK line and confirmed DIV64 gives 250kHz and DIV128 gives 125kHz.

I tried this with 3 different attiny13a-pu, date code 1430, and got the same result.  Any ideas what's going on?  Datasheet errata (i.e. 3 clock cycles are required for fck >9 Mhz) ?  Batch of chips out of spec?
Unthinking respect for authority is the greatest enemy of truth. Einstein
 

Offline MagicSmoker

  • Super Contributor
  • ***
  • Posts: 1408
  • Country: us
Re: SCK frequency for programming attiny13a
« Reply #1 on: December 06, 2015, 11:19:20 pm »
You didn't specify the Vdd voltage, but typically the higher speed is only attained at 5V, speed is reduced at 3.3V (and even more so at 1.8V, which, IIRC, is the absolute minimum for some [not all!] of the ATTiny series) .
 

Offline ralphdTopic starter

  • Frequent Contributor
  • **
  • Posts: 445
  • Country: ca
    • Nerd Ralph
Re: SCK frequency for programming attiny13a
« Reply #2 on: December 07, 2015, 12:07:26 am »
You didn't specify the Vdd voltage, but typically the higher speed is only attained at 5V, speed is reduced at 3.3V (and even more so at 1.8V, which, IIRC, is the absolute minimum for some [not all!] of the ATTiny series) .
This is at 5V.
Unthinking respect for authority is the greatest enemy of truth. Einstein
 

Offline MagicSmoker

  • Super Contributor
  • ***
  • Posts: 1408
  • Country: us
Re: SCK frequency for programming attiny13a
« Reply #3 on: December 07, 2015, 12:47:57 pm »
This is at 5V.

Hmmm... Okay, should work. Did you get the '13A from a reputable distributor (ie - not ebay or a parts broker)?

 

Offline ralphdTopic starter

  • Frequent Contributor
  • **
  • Posts: 445
  • Country: ca
    • Nerd Ralph
Re: SCK frequency for programming attiny13a
« Reply #4 on: December 07, 2015, 01:07:43 pm »
This is at 5V.

Hmmm... Okay, should work. Did you get the '13A from a reputable distributor (ie - not ebay or a parts broker)?

No.  I don't think there is any "fake" AVRs out there (too complicated to be cloned), but I guess factory rejects that work but are out of spec could find their way into the market.
I've attached a photo of the chip underside.
Unthinking respect for authority is the greatest enemy of truth. Einstein
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf