From: "Marco Tuzzi"
Subject: Re: PIC16F877A
Date: Sun, 13 Oct 2002 11:50:39 +0200
Organization: Tiscali Spa
NNTP-Posting-Date: 13 Oct 2002 09:50:40 GMT
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
I once had a problem with a uC which showed strange behavior.
The problem was that when the uC wrote into flash, reading from it before
the actual writing finished didn't output the "real" data, but a control
flag representing the status of the writing process.
Since the code of you program is in flash, when the PIC is writing in flash,
it can't goo on with normal opperations, since it can't read instructions;
it reads from flash the control flag during write but it "thinks" it's an
instruction from your code; so it executes nonsense!
May it be the problem?
To avoid this, I had to copy part of the code to RAM and swith to executing
the code from RAM when the uC was writing into flash. then, after the write
command finished, I switched back to executing from Flash.
"dhrm77" ha scritto nel messaggio
> I was actually one of the first one to receive a version of picstart's
> firmware from Microchip only a few days ago, that was able to program the
> PIC16F877A. Until now, MPLAB was able to handle the 877A, but not
> I upgraded picstart to the latest version 3.00.40. and was finally able to
> program those new chips. We verified the chips to make sure that they were
> programmed correctly. The 877 and the 877A have the exact same hex
> One works, not the other....
> About the erratic behavior..
> It seems that depending on WHERE the code is located in memory, the code
> exhibit different malfunctions.
> This seems to point to a problem accessing the right location of the code
> some cases by the core, or problems in jump instructions.... but we still
> haven't been able to pin-point the problem...
> "Wouter van Ooijen (www.voti.nl)" wrote in message
> > > > We migrated code from the PIC16F877 to PIC16F877A, and the code
> > >I had the same problem with the 509 and 509A it was tracked down to the
> > >programmer
> > So make sure your programmer can handle an 877A, the programming
> > algorithms for 877 and 877A are quite different (I know, I implemented
> > both in my programmer).
> > Wouter van Ooijen
> > -- ------------------------------------
> > http://www.voti.nl
> > PICmicro chips, programmers, consulting