??? 02/10/07 02:45 Read: times |
#132453 - . Responding to: ???'s previous message |
From reading all the replies to comments that you've made, that you have no oscilloscope, no logic analyzer, and no EPROM/EEPROM/PROM programmer. Do you have a multimeter? Do you have a reasonable supply of various logic components (74xxx-types)? What about passives (resistors, capacitors, inductors, etc.) and what about other semiconductors (transistors, diodes, etc.)? It appears that what you want is to get your 80C51 running as an 80C31, with your EEPROM as the program store and the SRAM as data memory. Further, you want to program the EEPROM from a PC's parallel port and subsequently run the programmed code on the 80C51. You've stated that you have an 805x assembler at your disposal. You've stated that you have already written code that runs properly on the 80C51BH that you have, despite the fact that you operated the device at 18.432 MHz rather than the 12MHz or less for which the part is specified. So, from where I sit, it looks as though you want to be able to compose and assemble code on your PC, download it to your 80C51BH, and execute it there. Is that right? Yes Do you need an EEPROM programmer to program other EEPROMs? No, unless the other eeproms have the same chip number. You said you have written an executed 805x code on that other system you built. How did you store the program there? I made a special eeprom programmer with a parallel port attachment, and downloaded code to it. Then I removed the eeprom from the socket, and then inserted it into the main system. I want to avoid constantly inserting and removing chips. 64 bytes is not a very big program. Are you sure that you can program an EEPROM with data from the PC's parallel port with only 64 bytes of code? The 64 bytes I am talking about is the maximum size of the code in the "hard-coded rom" that I want to make. The "hard-coded rom" made of logic gates will contain the code necessary for me to send data from the PC, through the parallel port to P1 of the microcontroller, and the INT lines. Why use an external EEPROM? I want to increase flexibility. I have about 5 of the same eeprom, and if later on I decide to change eeproms in the same system, I can do it with ease. Think of the eeprom as an extremely reliable floppy disk, and the system as a floppy disk drive. Why use the parallel port? It is fast enough for my application, it has flexibility, and it is easy to use. I avoid any port that involves bit-for-bit processing like the serial port and USB port. I just want to send byte-for-byte. I don't want to convert bits to bytes, or I will introduce synchronization problems. Why build a ROM in discrete hardware? I want a system that is guaranteed to perform any useful function, whether it be the system waiting to be programmed, or whatever. If the eeproms were damaged, whether it be software or hardware, and I didn't have this hard-coded "ROM", then the system will be useless and possibly unpredictable. With the hardware rom onboard, I can be certain that my system will start up every single time. There will be also nothing that can corrupt the code, because it is "hardwired". It is valid for me to say that this "hardware rom" can contain bootloader code. Why am I willing to spend time, money, and other resources on this particular solution when, for just a few dollars, I can get a microcontroller that has internal program memory of 64KB, programmable through the serial port and is capable of supporting external SRAM if I want it? Because I am willing to learn! From this experience, I have already learned 1/2 of the quine mcclusky algorithm. Why object to writing the assembled binary program to the SRAM, mapped, partially, into code space, and use that as program store in order to program the EEPROM? Because there isn't a direct way to do it synchronously? sure, I can steal the WR' pin for the port, but then I also must hog the address lines as well. I have a RAM and an EEPROM. My current setup in the system is that the EEPROM is enabled and RAM is disabled when A15 is low. When A15 is high, the reverse is true. Once you've downloaded the code, you can reconfigure the circuit automatically to provide the desired memory map. An EEPROM can be programmed piecewise, so you can download 2K or so at a time and program it, then use the same 2KB space to download the next 2KB segment. I don't know if I will do that. |