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?
So it turns out I have the correct polarity on EA (it is grounded, so external code should be executing), but I still believe that BLJB=0 (default) is forcing my program into the Atmel boot loader. This page (http://www.phaedsys.demon.co.uk/chris/8051/atmel.html) says the factory default will force hardware boot address at FC03h. Is is just me, or does that seem odd to anyone else, since it's not divisible by 4? Anyway, I guess a workaround to setting BLBJ is to put some absolute code at the starting PC that jumps to the user application at 0h. Thanks for being patient -- I'm new at this and want to double-check everything before I make a huge ass of myself. :)
The BLJB bit is in the Hardware Security Byte; ergo, you must use a programer option to set it. Is that not clear? No, it is not clear. Elsewhere in the data sheet, an API call is listed to program both the BLJB fuse, and the HSB ! See Table 76 of doc4235. So it may be possible that this can be accomplished with FLIP.
FC03 is wrong. The correct address is F800, according to my data sheet. Also be sure to read the posts above about software programming of the BLJB.
hi, 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? And what does the subject do with AT89C51 indicated in your post? AT89C51 does not have BLJB. Regards, Oleg
AT89C51ED2 has this bit!
"This page (http://www.phaedsys.demon.co.uk/chris/8051/atmel.html) says the factory default will force hardware boot address at FC03h." That page does not refer to the device you are using - don't confuse the parts prefixed with 'T' and those prefixed with 'AT'.
hi, AT89C51ED2 has this bit! Indeed, I know, I use this chip. But I told that in original message body poster has indicated AT89C51. Maybe just due typpo. Regards, Oleg
FC03 is wrong. The correct address is F800, according to my data sheet. I do not use Atmel and thus do not know if "FC03 is wrong", but the source of FC03 could be a PHILIPS data sheet. Philips cured some "chip errors" of goinig into ISP by making FC00 a jump to 0 so runaway programs did no cause a report of a chip malfunction. Erik
Oleg look at the part number after RE: in every post down the line ! The FC03 Jump IS the IAP entry point for a T89C51RD2, not for the AT89C51RD2, ID2, or ED2
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.