Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/09/07 10:48
Read: times


 
#132342 - KISS, and one step at a time
Responding to: ???'s previous message
Mike Stegmaier said:
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.


I would get rid of the "maybe" and ground X1 and X2 through 33pF caps as indicated in the relevant datasheets.


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).


What do you mean by hardwired? A rom is looks fairly "hard-wired" to me.


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 stated by others, that's the purpose of a (cross-)assembler. No need to invent anything new here.


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.


I would say knowledge of boolean algebra is a prerequisite for programming in general, and certainly for embedded systems/microcontrollers..



Why?

because I want to avoid wasting two months or more on creating the optimal circuit.


Pardon my french.. but using an ISP-programmable part would have gotten you "on track" somewhere half-way last year... see http://www.8052.com/forum/read.phtml?id=117231



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.


That is what a ROM does. You can replace ROM by EPROM, EAROM, EEROM, FLASH.... whatever device will keep it's data on power loss... You could even consider a battery backed SRAM.


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.


What you actually want to acheive is something that is easily (re-)programmable from a PC, using the paralell port as interface.

Why not use a SRAM chip (6264 or others) that you write to using the lpt port, and then by means of a switch, map the SRAM into the address space of the 8051, issue a reset, and run your code from SRAM?

or just build something like: http://www.pjrc.com/tech/8051...dware.html

Once you get more proficient in assembler _and_ boolean algebra/logic, only then try somthing that's more difficult.

Problem with what you are trying to accomplish is that if it does not work, you will have a hard time figuring out what is wrong... Is it your PC-software? your parallel port usage? your hardware? your 8051 assembler program? You will have nothing to run a "sanity check", lacking a running 8052 system to do some experimenting on...

I am not saying that what you want to do is impossible, but I am saying that for you (and for me) it would be a lengthy process, probably ending with a big disappointment...



List of 99 messages in thread
TopicAuthorDate
new plan. RE: 8051 SBC/PGMR            01/01/70 00:00      
   Make a front panel            01/01/70 00:00      
      clock needed.            01/01/70 00:00      
         in \"the bible\" there is a discussion of the \"once            01/01/70 00:00      
            think about this            01/01/70 00:00      
               That's how early MCU's were prototyped            01/01/70 00:00      
   FPGA software            01/01/70 00:00      
      Maybe not just yet ...            01/01/70 00:00      
         Logic minimisation            01/01/70 00:00      
      hmm...            01/01/70 00:00      
         Complicate things?            01/01/70 00:00      
            I have guts ;-)            01/01/70 00:00      
               guts?... maybe, but what about brains?            01/01/70 00:00      
         development            01/01/70 00:00      
            what i mean is...            01/01/70 00:00      
               Where's the directory? Where's the FCB, and FAT?            01/01/70 00:00      
         Reality vs perception            01/01/70 00:00      
   Back to basics, ... not BASIC!            01/01/70 00:00      
      .            01/01/70 00:00      
         comments            01/01/70 00:00      
            Erik ... you've struck a nerve ...            01/01/70 00:00      
               if you, just for once, would take the time to read            01/01/70 00:00      
                  So ... where's the help for him in that example?            01/01/70 00:00      
                     right there            01/01/70 00:00      
                        Front panel            01/01/70 00:00      
                     But...            01/01/70 00:00      
               Nerves            01/01/70 00:00      
                  You're right about that ...            01/01/70 00:00      
                     BINGO!            01/01/70 00:00      
                        So why not use a PROM?            01/01/70 00:00      
            did you visit here before?            01/01/70 00:00      
               ISP is not special!            01/01/70 00:00      
         Simple            01/01/70 00:00      
         Why not using an ISP-micro?            01/01/70 00:00      
   Why dismiss rom?            01/01/70 00:00      
      .            01/01/70 00:00      
         Yes, but, still, why dismiss ROM?            01/01/70 00:00      
   Sooooooooooooooooooooooooooooooooooooo complicated            01/01/70 00:00      
      That's an understatement ...            01/01/70 00:00      
         Aren't you doing an Erik now?            01/01/70 00:00      
            It's because I'm confused ...            01/01/70 00:00      
      no            01/01/70 00:00      
         but you said you already have a programmer            01/01/70 00:00      
   KISS, and one step at a time            01/01/70 00:00      
      KISS: alreay been said.            01/01/70 00:00      
   plan vs No_idea            01/01/70 00:00      
   Mike ... It looks as though you want ...            01/01/70 00:00      
      .            01/01/70 00:00      
         It looks as though you have some thinking to do.            01/01/70 00:00      
         Yes, a lot of thinking to do!            01/01/70 00:00      
            why do you worry about that?            01/01/70 00:00      
               Mark this on your calendar! ... Erik and I agree!            01/01/70 00:00      
   Mike - Time to fess up...            01/01/70 00:00      
      I kind of agree            01/01/70 00:00      
   not guts but folly            01/01/70 00:00      
   RE: Free Chips            01/01/70 00:00      
   I give up seeking help here            01/01/70 00:00      
      Because what you plan to do is just idiotic!            01/01/70 00:00      
      good plan!            01/01/70 00:00      
         Bootloader project gone bad            01/01/70 00:00      
            ...            01/01/70 00:00      
               Instead of the mishmash you propose, how about one            01/01/70 00:00      
                  Homework            01/01/70 00:00      
                     if it is, then whoever assigned it is crazier tha            01/01/70 00:00      
                        IT IS NOT HOMEWORK            01/01/70 00:00      
                           really?            01/01/70 00:00      
               16 bytes? Are you sure?            01/01/70 00:00      
      He who laughs last...            01/01/70 00:00      
         let me reword my question one step at a time            01/01/70 00:00      
            Guts            01/01/70 00:00      
            I don't get it Mike            01/01/70 00:00      
               here's the code again            01/01/70 00:00      
                  Mike please read good plan post            01/01/70 00:00      
                  Try to go back to reality, Mike ...            01/01/70 00:00      
                     It looks like he is trying to do minimisation            01/01/70 00:00      
      Sorry know one can help            01/01/70 00:00      
         blatant errors in syntax            01/01/70 00:00      
            Come on, Richard...            01/01/70 00:00      
      The CrazyROM            01/01/70 00:00      
         Agreed            01/01/70 00:00      
         CrazyRom(tm)            01/01/70 00:00      
            It is already taken...            01/01/70 00:00      
               Mike Stegmaier, I found the solution            01/01/70 00:00      
         Blast from the past            01/01/70 00:00      
         welcome back Michael Karas, we missed you            01/01/70 00:00      
            ade7756 interface with 89c51 urgent code needed            01/01/70 00:00      
               Why post that in THIS thread?            01/01/70 00:00      
               Not only is it entirely irrelevant to this thread            01/01/70 00:00      
         Thanks All            01/01/70 00:00      
            Warm welcome, Michael!            01/01/70 00:00      
            Cross-post            01/01/70 00:00      
            Link            01/01/70 00:00      
            Micheal Karas            01/01/70 00:00      
               that ois why there is 'stuff' around the            01/01/70 00:00      
   History lesson            01/01/70 00:00      
      ROM Reliability            01/01/70 00:00      
         high failure rate            01/01/70 00:00      
            Out of Market. Hmmm            01/01/70 00:00      
               Not SLOW, but slower ...            01/01/70 00:00      

Back to Subject List