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?
What does the Data Sheet say?
That's what the data sheet says. I'm double-checking that the BLBJ bit will accomplish what I want. Plus, the data sheet does not say how.
You "set" a bit by writing a '1' to it. ("clear" it by writing a '0').
I doubt this is an SFR bit considering it determines the source of opcode fetches. If it were, you'd be changing your code source on the fly which might be a bit tricky to manage. If this is not an SFR bit, then perhaps its something you set with an option in a device programmer?
Ah yes, as the Data Sheet clearly states: "Hardware register can only be accessed through the parallel programming modes which are handled by the parallel programmer." and, "The only hardware register of the AT89C51RD2/ED2 is called Hardware Byte or Hardware Security Byte (HSB)." The BLJB bit is in the Hardware Security Byte; ergo, you must use a programer option to set it. Is that not clear?
Yes, that answers my question. Thank you.
Andy, are you getting soft you asked the poster to find it in the datasheet and ended up finding it for him :) Erik
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.
"The BLJB bit is in the Hardware Security Byte; ergo, you must use a programer option to set it. Is that not clear?" It's plain wrong. It can be modified by software.
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 :)