Forums

Atmel TS80C32X2 Timer bug?

Started by nospam March 30, 2004
I have a board designed for a generic 80C32 for which I am writing some
software. For some reason the supplier sourced and fitted Atmel TS80C32X2
parts which seem to have a few 'issues'. 

The processor runs on an 11.0592MHz crystal and I need to run its serial
port at 19k2 baud. 

I use timer 1 in mode 2 (8 bit auto reload) which ought to require a reload
value of 0xFD for 19k2 baud but actually requires a reload value of 0xFC to
get 19k2. 

I use timer 0 in the same mode as an interrupt generator and it appears not
to have the same out by one problem.

I did not find anything in the data sheet errata about this problem. 

Anyone else experienced this? 


nospam schrieb:

> I have a board designed for a generic 80C32 for which I am writing some > software. For some reason the supplier sourced and fitted Atmel TS80C32X2 > parts which seem to have a few 'issues'. > > The processor runs on an 11.0592MHz crystal and I need to run its serial > port at 19k2 baud. > > I use timer 1 in mode 2 (8 bit auto reload) which ought to require a reload > value of 0xFD for 19k2 baud but actually requires a reload value of 0xFC to > get 19k2. > > I use timer 0 in the same mode as an interrupt generator and it appears not > to have the same out by one problem. > > I did not find anything in the data sheet errata about this problem. > > Anyone else experienced this?
No, I think you must be doing something wrong. Verify your crystal frequency, and verify the event rate of timer 1 by assigning an ISR to it, too. Verify that the reload value is really correctly written to the timer registers. -- Dipl.-Ing. Tilmann Reh Autometer GmbH Siegen - Elektronik nach Ma�. http://www.autometer.de
Tilmann Reh <no.tilmann.reh.spam@autometer.de> wrote:

>> Anyone else experienced this? > >No, I think you must be doing something wrong.
Well I thought that also, but it took a long time to see it. I was configuring TL1, TH1, then TCON 2 instructions before configuring TMOD. So the timer was running for 2 or 3 instructions in its default mode which depending on the value loaded into TL1 (prescaler) would increment the value in TH1 before carrying on in auto reload mode. The bug has been in the code for years, just never showed till trying to run a timer fast enough for 19k2.
nospam wrote:

> > I have a board designed for a generic 80C32 for which I am writing > some software. For some reason the supplier sourced and fitted Atmel > TS80C32X2 parts which seem to have a few 'issues'. > > The processor runs on an 11.0592MHz crystal and I need to run its > serial port at 19k2 baud. > > I use timer 1 in mode 2 (8 bit auto reload) which ought to require a > reload value of 0xFD for 19k2 baud but actually requires a reload > value of 0xFC to get 19k2. > > I use timer 0 in the same mode as an interrupt generator and it > appears not to have the same out by one problem. > > I did not find anything in the data sheet errata about this problem. > > Anyone else experienced this?
The Atmel TS80C32 is a former Temic product (bought by Atmel). I got some samples. Could never get it to perform as a 100% replacment for for other makes.
dont know schrieb:

> The Atmel TS80C32 is a former Temic product (bought by Atmel). I got > some samples. Could never get it to perform as a 100% replacment for > for other makes.
We also have used it for years (when it still was Temic). Never had any problems. Can you provide some more detailed information about your problems? -- Dipl.-Ing. Tilmann Reh Autometer GmbH Siegen - Elektronik nach Ma&#2013265951;. http://www.autometer.de
Tilmann Reh wrote:

> dont know schrieb: > > > The Atmel TS80C32 is a former Temic product (bought by Atmel). I > > got some samples. Could never get it to perform as a 100% > > replacment for for other makes. > > We also have used it for years (when it still was Temic). > Never had any problems. > > Can you provide some more detailed information about your problems?
When we were looking into reducing production costs we looked at the temic parts too. We could no use that part as a drop-in replacement unless we made software changes. Which was out of the question. Certain functions created a timing problem. The original part was a OKI product but they dropped their selection of 51' products and upped the price at that time.
dont know schrieb:

> When we were looking into reducing production costs we looked at the > temic parts too. We could no use that part as a drop-in replacement > unless we made software changes. Which was out of the question. Certain > functions created a timing problem. The original part was a OKI product > but they dropped their selection of 51' products and upped the price at > that time.
Can you provide more detailed information about those "timing problems"? Different instruction execution times than the OKI parts? Til now, all "standard" 8051 cores I've seen so far had exactly the same behaviour. -- Dipl.-Ing. Tilmann Reh Autometer GmbH Siegen - Elektronik nach Ma&#2013265951;. http://www.autometer.de