WRITECODE, ERASECODE, and interrupts


Results 1 to 4 of 4

Threaded View

  1. #3
    Join Date
    Aug 2006
    Location
    Omaha, Nebraska USA
    Posts
    263


    Did you find this post helpful? Yes | No

    Default

    Thanks, Charles.

    The PBP manual says of DEFINE WRITE_INT 1

    Disable/enable global interrupts in Write, which is why it sounded like a toggle to me.

    Looking at the 16F88 manual at 3.6.1, "FLASH PROGRAM MEMORY ERASE SEQUENCE", Step 3 is "Disable interrupts". Oddly, there is no complementary step to re-enable them. However, the code example 3-4 shows disabling interrupts with

    BCF INTCON,GIE

    and then enabling them again with

    BSF INTCON, GIE

    Equally oddly, the example at 3-5 for writing to flash program memory has the BSF at the end but not the BCF anywhere prior.

    So . . .

    It looks like interrupts do need to be disabled/re-enabled with ERASECODE, too.

    Any reason why I can't just use an @ ahead of the above statements instead of the DEFINE? Would it save any time/space?
    Last edited by RussMartin; - 5th March 2010 at 19:56.
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

Similar Threads

  1. Bootloader and Instant Interrupts Atn:_DT_
    By Josuetas in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 16th May 2007, 01:59

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