PIC16f877A first 8 bytes destroyed after closing PicKit2 programmer app....


Results 1 to 10 of 10

Threaded View

  1. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by LakisFM1 View Post
    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.

Similar Threads

  1. Help MCS with PICKIT2 programmer question
    By luminas in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 1st February 2008, 17:57

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts