> "TT_Man" wrote:
> > > > How does the defect manifest itself ?
>
> > > > 8051s have been 'rock solid' IME. As someone else memtioned, do you have
a
> > > critical timing issue anywhere ? Like an I/F chip maybe ? Are PSEN, ALE,
> > > > /WR
> > > > and /RD all clean ? You're probably not using PSEN but never hurts to
> > > > check.
>
> > > > No-one's messed about with the clock oscillator parts have they ?
>
> > > > What do the 10 lines of code do ?
>
> > > > Graham
>
> > > An extra speech phrase is output.... ALE PSEN /wr/rd are all unused as the
> > > device is a 64K flash part. We have several generations of board that all
> > > support various chip types, 52, 53 ED2 etc. The faulty ED2's will not
> > > execute correctly in any board.
> > > The 10 lines of code basically index a speech phrase and output it 3 times
> > > to a dac. Then the routine checks an input and proceeds or not via a
branch.
> > somewhere in these lines of code, another speech phrase is output. Speech
is
> > terminated via a null byte. The extra speech phrase in not contiguous with
> > > the correct phrases, so it's not going to be a DPHL corruption...that
> > > somehow skips the null byte detection.
>
> > Does the code have interrupts enabled?
>
> > Is it written in ASM or C?
>
> I think he said it was all written in asssembler .
On an 8051, asm is really the way to go. The OP was making comments about DPTR so I suspected asm but vagueness of his descriptions sounded like a C programmer who doesn't really know what is going on under the hood. Many C compilers overlay variables on the 8051 if he is doing interrupts in C code he may be running a routine in the interrupt code that overlays one of his variables.
> Graham