From: MooseFET on
On Sep 5, 1:46 pm, Robert Baer <robertb...(a)localnet.com> wrote:
> TT_Man wrote:
> > "Eeyore" <rabbitsfriendsandrelati...(a)hotmail.com> wrote in message
> >news:48BF4043.AE375BE5(a)hotmail.com...
>
> >>TT_Man wrote:
>
> >>>Anyone using this part experiencing problems? we have used them for 4
> >>>years
> >>>or so. Date codes up to 0705 work ok, 0814 misbehaves....same chip, same
> >>>software, 0814 doesn't execute properly...
>
> >>Have you contacted the manufacturer ?
>
> >>Graham
>
> > Yes, that was my first port of call, with full details, source code etc.and
> > an indication of the approximate area of failure, within 10 lines of
> > code......
>
> *Within* 10 lines of code? Not more specific? Probably "C" code...

I think two causes are most likely:

(1)
Something isn't being initialized. The memory locations of an 8051
are not forced reset at power on. They can have any value in them but
a given chip will tend to either have highs or lows.

(2)
A timing of interrupt issue. If the interrupt code messes with
something that the non-interrupt code uses, the results can depend on
the exact timing of interrupts. Which instruction an interrupt
happens on can be effected by where the chip's 0/1 boundary is on the
input lines.
From: TT_Man on

">>
>> >> I think he said it was all written in asssembler <yuk>.
>>
>> > 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
>>
>> Not a prayer in hell 100% assembler. :)
>
> Are you using interrupts?
Everything is interrupt driven. Processor spends 99% in sleep mode.Int
routines set flags and the background processes flags, then goes back to
sleep. Dual 3 of 5 uarts are processed with 125uS RTC.


From: Eeyore on


Spehro Pefhany wrote:

> Eeyore wrote:
> >Rich Grise wrote:
> >
> >> If I could get an 8051 equivalent but with Motorola's timer system (see
> >> 68HC11, e.g.), I'd be in hog heaven. ;-)
> >
> >What's so great about Motorola's timers ?
>
> Much better designed.

In any specific way ? The only thing I might like in 8051 family timers is more
than 16 bits.

Graham

From: Eeyore on


MooseFET wrote:

> Eeyore wrote:
> > MooseFET wrote:
> >
> > > Is it written in ASM or C?
> >
> > I think he said it was all written in asssembler <yuk>.
>
> 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.

I still use PL/M 51. So easy to use. You can treat it as highish level language and
set a register directly in the next line.

I can't even begin to imagine coding some of the fairly complex (for microcontrollers)
stuff that we did with 8051s in asm. The mind boggles. Never mind code maintenance.

Graham

From: Eeyore on


MooseFET wrote:

> "TT_Man" <Some...(a)ntlworld.com> wrote:
> > >> > Does the code have interrupts enabled?
> >
> > >> > Is it written in ASM or C?
> >
> > >> I think he said it was all written in asssembler <yuk>.
> >
> > > 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
> >
> > Not a prayer in hell 100% assembler. :)
>
> Are you using interrupts?

in PLM/51

Declare procedure blah-blah interrupt(n) using (n);

code

end;