gnupic: Re: [gnupic] Cannot get 18f252 to blink-success!!
Subject:
Re: [gnupic] Cannot get 18f252 to blink-success!!
From:
Jeff ####@####.####
Date:
25 Oct 2006 06:37:03 +0100
Message-Id: <200610242238.12246.j_post@pacbell.net>
On Tue October 24 2006 22:00, David Froseth wrote:
> Thanks guys for the replies,
> I got it working. What I did is I erased the program memory in the
> 18f252 before I tried programming it again. (?)
>
:-)
>
> Is it standard procedure to erase the chip before
> writing to it?
Yes.
> I thought that reprogramming it automatically did that.
No, although I may change that in picp since many people expect that behavior.
Picp is intended to give low level control, which also means that you have
the ability to shoot yourself in the foot ;-)
There may be, albeit relatively rare, cases in which you want to change only
one or two bytes in the program (keeping in mind that you can only change 1s
to 0s, not 0s to 1s without erasing). Erasing and reprogramming the entire
chip to change some 1s to 0s in one byte is overkill. Each erasure causes
additional stress on the chip. Ok, I'm being a bit nit-picky--I began working
with flash memory when it was limited to a few hundred erase cycles.
> I would really like to understand what I am seeing when I look at these
> hex files and program reads. The new info coming out of the chip is
> still different than the .hex file.
The format is different. The data is the same, and that's what counts.
Glad you got it working,
Jeff