??? 02/09/07 03:10 Read: times |
#132326 - new plan. RE: 8051 SBC/PGMR |
After everyone's comments and my ideas, I think it is now time for me to create a new plan for my 8051 system/programmer combo.
What I will do is attach the crystal to the microcontroller the way it is supposed to be attached (to X1 and X2 on the micro), and maybe I will ground X1 and X2 through 33pF capacitors. Then I can guarantee a working clock. Then I can connect the parallel port to port 1 pins and 2 control pins from the parallel port to INT0' and INT1'. I can write the code, BUT here's the catch. The code must be hardwired. The reason for that is because the code must run, even if the rom is not programmed (example: a new chip has beem put in). I know for a fact that I need a set of buffers (74HC245 will work) between the hardwired section and the data lines, so that it wont interfere when data is read from the EEPROM or RAM. I know that I need to use some address lines as inputs. Here is where problems come in: Rather than me manually writing out the codes for each instruction on paper, and manually decoding it, I want to automate the whole thing. As for converting a script to the correct byte codes (the codes that you see in an EXE file for example), I can easily do that. Now converting the byte codes to a simplified requires boolean algebra knowledge. I can do it by hand, but I would rather see that software can do it instead. Why? because I want to avoid wasting two months or more on creating the optimal circuit. The easiest way out is to use a bunch of "and" gates and inverters, but if I can avoid that, I will be happier. So I see that I need to perform boolean algebra. I can write many programs in Quick Basic and PHP. so if someone can give me a basic idea in an easy mathematical sense on how the laws of boolean algebra work, then maybe I can figure the rest out. So in other words, I want to make a hardware based rom that supplies code to the data lines based on a fixed address. As for the code, it may vary depending on the number of gates required. I am willing to add a few "nops" in my code if it makes the logic alot easier. Please help me on this. Thanks. |