
Originally Posted by
LakisFM1
Hello to the forum,
Using PicKit2 i write/verify a hex file on 16F877A , all ok.
I even load another file and back read the 877A and all still ok.
BUT then i close the pickit application,
when i re-open Pickit application and read the 877A the first 8 bytes are FF , the rest bytes are proper.
My program has nothing to do with on-the-fly code-programming to overwrite the first 8 program memory bytes ...
The program is (now only a simple port-toggle , problem is still happening ...)
OPTION_REG.7 = 0 ; ENABLE PORTB PULLUPS
LOOP:
portb.0 = not portb.0
GOTO LOOP
Hello LakisFM1,
Welcome to the forum !
I have some thoughts, which manifest as questions.
Here goes . . .
Are you compiling this code using PBP and MCS ?
If so, Make sure to choose, " Compile " and Not, " ICD Compile " There is a world of difference in the hex output between these. As I usually do not use the ICD, I have unchecked it's selection in the toolbar settings, so as to avoid tripping myself.
EDIT: Anyway here is your code working for me
Code:
DEFINE OSC 4
TRISB = 0
OPTION_REG.7 = 0 ; ENABLE PORTB PULLUPS
LOOP:
portb.0 = NOT portb.0
PAUSE 500
GOTO LOOP
Last edited by Archangel; - 9th February 2010 at 01:50.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks