I would like to set a (fuse?) bit to select the external Flash/PEROM as program memory instead of default Flash internal to the AT89C51. Is the BLJB bit the one I want to set? How do I set it?
hi, it seems, my English is so bad that nobody understands what I said. Once again: I see the subject, I see the part name AT89C51ED2 in it. But here I re-post original message (the first message in the thread): I would like to set a (fuse?) bit to select the external Flash/PEROM as program memory instead of default Flash internal to the AT89C51. Is the BLJB bit the one I want to set? How do I set it? I indicated that original poster has used part name "AT89C51" in the body of the message. As about the question then the things are simple: bootprocess is described at page 103 of AT89C51RD2/ED2 datasheet http://www.atmel.com/dyn/resources/prod_documents/doc4235.pdf ; as well, there at bottom of page 99 we have found: "Memory Organization When the EA pin is high, the processor fetches instructions from internal program Flash. If the EA pin is tied low, all program memory fetches are from external memory." Regards, Oleg
Same topic, new problem: With the ~EA pin tied low, the processor will be accessing program memory on the external PEROM. OK. The BLBJ bit is (by default) 0. BSB is 0, SBV is FCh (default values). So the Atmel bootloader tries to run at address F800h. My understanding is that, at this point, the processor tries to execute instruction at address F800h on the external PEROM, thinking it's running the bootloader. My questions: 1. Am I correct that this is what is happening? 2. I want to execute at 0 on the external without programming/modifying the processor's hardware registers nor its pin connections. The only modification that can be made is to program memory (on the flash). I tried to follow the Keil directions for relocating code, to hard-wire a long-jump to 0 at F800h, but "CSEG AT F800h" gives an error ("Expression with forward reference not permitted"). Is there an elegant solution?
Try putting a zero in front of your F800h. That may eliminate the error.
Oh. My. Thanks.