strange t13A from AliExpress

Go To Last Post
15 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've  recently been doing a lot of testing on a t13A that I bought a few years ago.  I had done some basic testing (blink an LED) when I first received it to confirm I wasn't sent a dead chip.

With more thorough testing I found it only runs at 9.2Mhz, not 9.6.  Although unusual (most other AVRs I've used are within 1-2% of their rated clock), it's technically not out of the +-10% spec.  However with the fuses set for 4.8M, it's only running at 3.6M.  What I find particularly perplexing is that section 6.2.2 of the datasheet says:
"There are separate calibration bytes for 4.8 and 9.6 MHz operation but only one is automatically loaded during reset (see section “Calibration Bytes” on page 105). This is because the only difference between 4.8 MHz and 9.6 MHz mode is an internal clock divider."

 

If that were true, then with the 4.8M fuse setting (L:79), I should get exactly half the speed of the 9.6M fuse setting (L:7A).  The default OSCCAL value is 36(0x24).  Changing OSCCAL works as expected; adding 11 results in 10.0Mhz with the 9.6M fuse setting and  4.0Mhz with the 4.8M fuse setting.

 

The top markings are:

ATMEL1448
TINY13A
SSU

 

And the bottom markings are:

446PH
A2HVXA
I-F e3

 

My only theory so far is that this t13 has separate 9.6 & 4.8M oscillators.  I looked in the datasheet revision history to see if this was the case for an earlier version of the chip, but that doesn't appear to be the case for the t13A.  The t13 datasheet has some revision notes about chances to the 4.8/9.6Mhz oscillator section.  Does anyone know if the early versions (2535A & 2535B)of the t13 have separate oscillators?  I'm wondering if I have an old t13, re-badged as a t13A.

 

 

I have no special talents.  I am only passionately curious. - Albert Einstein

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ralphd wrote:
"There are separate calibration bytes
Surely the whole reason for two calibration bytes IS two separate oscillators? (it was certainly true of all the early AVRs like mega8, mega16, mega32 etc) which all had four oscillators (1/2/4/8 MHz) and four calibration bytes. Rather curiously (I always thought) the chip would only ever load OSCAL with the 1MHz calibration byte even if 2/4/8 were active. So for 2/4/8 it was your responsibility to seek out the calibration for those and load it manually.

 

Sounds like T13 is similar - it always preloads the 9.6 one even if you have set 4.8 active.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How are you measuring the freqs?  Freq counter?  Could your measurements be off?

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

ralphd wrote:
"There are separate calibration bytes
Surely the whole reason for two calibration bytes IS two separate oscillators? (it was certainly true of all the early AVRs like mega8, mega16, mega32 etc) which all had four oscillators (1/2/4/8 MHz) and four calibration bytes. Rather curiously (I always thought) the chip would only ever load OSCAL with the 1MHz calibration byte even if 2/4/8 were active. So for 2/4/8 it was your responsibility to seek out the calibration for those and load it manually.

 

Sounds like T13 is similar - it always preloads the 9.6 one even if you have set 4.8 active.

 

So are you suggesting the datasheet is wrong, or that the current datasheet is right (just one oscillator) but they used to be separate in long ago versions?

 

I have no special talents.  I am only passionately curious. - Albert Einstein

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies wrote:

How are you measuring the freqs?  Freq counter?  Could your measurements be off?

 

I used two different meters, both verified to withing +-0.5% of my DS1054Z.  When I last calibrated the 1054Z, it was 3ppm slow.

http://nerdralph.blogspot.com/20...

 

I left the same code flashed to the t13, and only changed the fuses to test 4.8/9.6.

 

I have no special talents.  I am only passionately curious. - Albert Einstein

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just tested the internal "128Khz" oscillator (L:7B) and it runs at 136Khz.

I also tested the BODCR and PRR, which are new in the t13A.  As would be expected for a t13A, I can change the lower two bits of those registers, and the upper 6 always read 0.

 

I have no special talents.  I am only passionately curious. - Albert Einstein

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I also have an ATtiny (DIP-8) that I gout from Ebay a few years ago. Both oscillators runs too slow (at 5V), but they require different OSCCAL values to be accurate. I had to increase the OSCCAL value from 0x5C to 0x67 to get it accurate for the 4.8 MHz one, and For the 9.6 MHz one I had to increase it from 0x5C to 0x61.

 

On the top my chip says:

Atmel 1234

ATTINY13A

PU

 

On the bottom:

H74 954J

H1   3P

1234 ea

 

Inside the molded circle on the underside:
L8

TAIWAN

A3

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MCUdude wrote:

I also have an ATtiny (DIP-8) that I gout from Ebay a few years ago. Both oscillators runs too slow (at 5V), but they require different OSCCAL values to be accurate. I had to increase the OSCCAL value from 0x5C to 0x67 to get it accurate for the 4.8 MHz one, and For the 9.6 MHz one I had to increase it from 0x5C to 0x61.

 

On the top my chip says:

Atmel 1234

ATTINY13A

PU

 

On the bottom:

H74 954J

H1   3P

1234 ea

 

Inside the molded circle on the underside:
L8

TAIWAN

A3

 

Thanks for the data point.  Requiring a different OSCCAL value at 4.8 than 9.6 indicates two different oscillators, not one with an internal divide-by-two.

Do you think we got clones? Some old revision of the t13A?

I have no special talents.  I am only passionately curious. - Albert Einstein

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What was the temperature and VCC voltage at the time you measured the RC clock?

The DS indicates factory cal is done at VCC 3.0v, while the data sheet shows only minor change with VCC, it will change a lot with temperature.

Since your RC clock was low, I would guess your room temp was lower then 25C.

Have you read the two CAL values and compared them to what is in the OSCCAL register?

 

Jim

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ralphd wrote:
So are you suggesting the datasheet is wrong,
That's probably where I would put my money. Specifically the sentence:

This is because the only difference between 4.8 MHz and 9.6 MHz mode is an internal clock divider

If that were really the case why would the silicon designer even had made provision for TWO calibration bytes ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

but only one is automatically loaded during reset 

This had me scratching my head a few years ago....Why don't they say which is loaded???  I see now they say elsewhere the 9.6 is by default.  Perhaps there is no 2x divider at all or was present, then removed at some point.

 

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Wed. Mar 25, 2020 - 06:14 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies wrote:
  Perhaps there is no 2x divider at all or was present,

Compare the two osccal values and compare to the datasheet graphs, should tell you.

 

Jim

 

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ki0bk wrote:

What was the temperature and VCC voltage at the time you measured the RC clock?

The DS indicates factory cal is done at VCC 3.0v, while the data sheet shows only minor change with VCC, it will change a lot with temperature.

Since your RC clock was low, I would guess your room temp was lower then 25C.

Have you read the two CAL values and compared them to what is in the OSCCAL register?

 

Jim

 

~21C & 5V.  At 3V3, the oscillator is about 0.5% slower.

Comparing both calibration values is a good idea.  I'll check that out.

 

I have no special talents.  I am only passionately curious. - Albert Einstein

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

ralphd wrote:
So are you suggesting the datasheet is wrong,
That's probably where I would put my money. Specifically the sentence:

This is because the only difference between 4.8 MHz and 9.6 MHz mode is an internal clock divider

If that were really the case why would the silicon designer even had made provision for TWO calibration bytes ?

 

My thought is an earlier version had two oscillators, and it was reduced to one in a later die revision.  One oscillator and a flip-flop probably saves some silicon, and means only one oscillator to be tested at fabrication time.

I have no special talents.  I am only passionately curious. - Albert Einstein

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ralphd wrote:
I also tested the BODCR and PRR, which are new in the t13A.  As would be expected for a t13A, I can change the lower two bits of those registers, and the upper 6 always read 0.

 

I'm not sure if this is a 100% proof that you have a T13A. You could disable Timer0 and/or ADC in the new PRR, and verify if they still function.

Last Edited: Fri. Mar 27, 2020 - 10:19 PM