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?
BLJB does not have to do anything with the choice of internal or external ROM. With setting the BLJB you decide wether to execute the built-in Bootloader on a Reset or not. Maybe this section of the Datasheet is what you were looking for: External Access Enable: EA must be externally held low to enable the device to fetch code from external program memory locations 0000H to FFFFH. If security level 1 is programmed, EA will be internally latched on Reset. EA is a pin on your controller.
Hertel, a little boo-boo: The pin is !EA (NOT EA), not EA. Oh how many times has someone tried to "debug" what was a polarity misunderstanding. Erik
The pin is !EA (NOT EA), not EA. We get it. No need to repeat yourself.
No need to repeat yourself repeat??? I do not see this higher up Erik
I do not see this higher up It was a joke. reread what I orginally quoted ;^)
I am sorry being so daft. As this is Monday I hope to be excused. Erik
I hear ya. That's usually the way I am all week. Today's an exception. Hmmm...I must have slept well last night :)
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. :)
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.
"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'.
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