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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/27/07 23:13
Read: times


 
#133895 - Proving one is crazy
Responding to: ???'s previous message
Does a crazy man not think he is crazy?


Mike, we've all tried to point out the fundamental flaws in your approach. Unfortunately, you have half an idea, and half of that is wrong. It not that any of us couldn't get an eeprom to be loaded with code via the parallel port, so there's no proof needed as to if it could be done. Given your box of parts, I'm sure most of us could solve your basic criteria of being able to load code from the PC into your eeprom. Most likely we would:

1/ Use the serial port as it is easier, less wires and Windows supports it. It also allows us to use Hyperterminal or your terminal program of choice to download the code with - this means we don't need to write a special application on the PC

2/ We would most likely have bootloader code.

The net result is that our design would converge quickly.

Regardless of how you store your boot code, to get any sort of functionality on 16 bytes is most likely pushing it. We could have a competition to see who could do the most in the least bytes - but to what end. In 1970 it would have been reasonable as you had to key in the bootloader by using switches on many computers - so less bytes would have been a bonus. We have no such constraint these days.

Doing the interface via the parallel port has fundamental problems - as you're finding. Having the cpu wake up with the bootload code and poll the parallel port for bytes will most likely require more than 16 bytes of code. At best you might be able to write code to load,say 128bytes via the parallel port into ram then execute it - you might be able to squeeze that into 16 bytes. By the same token, one could do the same with the serial port - and probably easier.

Something like:
org 0
mov r2,#128 ;128 bytes- change to suit taste
mov dptr,#8000h ;point to ram - hardware maps it into code space also
loop:
jb P1.0,loop ;wait for strobe low
mov a,P3 ;read byte
movx @dptr,a ;store into ram
inc dptr ;->++
loop1:
jnb P1.0,loop1 ;wait for strobe high
djnz r2,loop ;loop for 128 bytes
ljmp 8000h ;run bootstrap

It's no use pissing about with interrupts. Once the 128bytes of code is loaded via the parallel port into the ram, it runs that code. With 128bytes of code, you can implement fancier code to load the eeprom. All this would happen in less than a second I would guess. So your challenge is to make this code smaller and fit into 16 bytes without losing the functionality. I know a couple of tricks I could pull.

Using a two stage boot process is not a new idea- in the old days one would load the initial boot via the front panel switches that would read the next bootstrap from floppy or paper tape. It might work for you......




List of 96 messages in thread
TopicAuthorDate
Boolean Algebra with "dont cares"            01/01/70 00:00      
   I do not fully get your applicatiojn, but            01/01/70 00:00      
      Let me explain            01/01/70 00:00      
   Karnaugh Mapping            01/01/70 00:00      
      longer?            01/01/70 00:00      
         8 times is longer?            01/01/70 00:00      
            I explained it            01/01/70 00:00      
               a square wheel is not that easy to make, is it?            01/01/70 00:00      
               Do you understand Karnaugh Mapping?            01/01/70 00:00      
   theres a very old program called espresso            01/01/70 00:00      
   also remember logic minimisation            01/01/70 00:00      
   Don't Cares            01/01/70 00:00      
      I don't think he needs an RS232 receiver            01/01/70 00:00      
         Well spotted            01/01/70 00:00      
            Deja Vu            01/01/70 00:00      
               Everything old is new again!            01/01/70 00:00      
                  For the paranoid...            01/01/70 00:00      
                     I have made my decision            01/01/70 00:00      
                        depending...            01/01/70 00:00      
                           yes and yes            01/01/70 00:00      
                              DPTR initialized            01/01/70 00:00      
                                 ...            01/01/70 00:00      
                                    fewest number of chips            01/01/70 00:00      
                                       You can do it with TWO chips.            01/01/70 00:00      
                                    You keep saying that!            01/01/70 00:00      
                                       Well ... he's on a crusade now ... let him be            01/01/70 00:00      
                                          ok            01/01/70 00:00      
                                             Common approach            01/01/70 00:00      
                                                I have a different idea            01/01/70 00:00      
                                                   that square wheel will get you in the ditch in 5 m            01/01/70 00:00      
                                                      No Sync -- The Same            01/01/70 00:00      
                                                         but            01/01/70 00:00      
                                                            thanks to Mr. Gates, that will not work            01/01/70 00:00      
                                                               at least I try.            01/01/70 00:00      
                                                                  driving your car into a tree also "can be done"            01/01/70 00:00      
                                                                     ...            01/01/70 00:00      
                                                                        I would never pay for something with 47 chips wher            01/01/70 00:00      
                                                                        well anyroad up            01/01/70 00:00      
                                                                        Proving one is crazy            01/01/70 00:00      
                                                                           Russell, you forgot the REAL issue            01/01/70 00:00      
                                                   just once            01/01/70 00:00      
                                 give him a a break ... he's using the INTEL part            01/01/70 00:00      
                        CrazyROM2 Still 15-18 Chips            01/01/70 00:00      
                           Practical? Credible?            01/01/70 00:00      
                              Impractical and Incredible            01/01/70 00:00      
                                 These guys knew what they were doing!            01/01/70 00:00      
                           That code is pretty much what I use            01/01/70 00:00      
      answer            01/01/70 00:00      
         Remove the blinkers!            01/01/70 00:00      
            A light dawns?            01/01/70 00:00      
   Don't cares are Dangerous Here            01/01/70 00:00      
      Now there's the thing...            01/01/70 00:00      
         Mike S I wish you a lot of fun            01/01/70 00:00      
   One 74154 and a handful of diodes            01/01/70 00:00      
      omg            01/01/70 00:00      
         Depends on buffer...            01/01/70 00:00      
            so does using ROM banks not make the use of a ROM            01/01/70 00:00      
               Used to have one...            01/01/70 00:00      
   has anyone ever 'lost' a ROM?            01/01/70 00:00      
      Yea, but I found it later :)            01/01/70 00:00      
      Lost ROMs            01/01/70 00:00      
         No part is failure-proof            01/01/70 00:00      
            statistical reliability issues            01/01/70 00:00      
               it's a learning experience ... [sigh]            01/01/70 00:00      
                  as usual, Mike replied "that is not what I want"            01/01/70 00:00      
                     well, maybe not zero ...            01/01/70 00:00      
                        ah, now I understand why Mike is doing this            01/01/70 00:00      
                           Buggy Whip Pricing            01/01/70 00:00      
                              oh, well            01/01/70 00:00      
                                 Maybe he should be left to his own devices            01/01/70 00:00      
                                    I made a better decision            01/01/70 00:00      
                                       the wheel is still square            01/01/70 00:00      
                                       why nop?            01/01/70 00:00      
                                          correction            01/01/70 00:00      
                                             answer            01/01/70 00:00      
                                                another question            01/01/70 00:00      
                                                   something else            01/01/70 00:00      
                                                      and I should have added...            01/01/70 00:00      
                                                         hard-coded            01/01/70 00:00      
                                       a couple of \'138\'s should do it            01/01/70 00:00      
                                          answer            01/01/70 00:00      
                                             not the first, more like #237654            01/01/70 00:00      
                                             "Invent"- Try 8052-BASIC            01/01/70 00:00      
                                       Just a thought            01/01/70 00:00      
                                       No thanks to anyone            01/01/70 00:00      
                                          Let the boy flounder ... he'll figure it out!            01/01/70 00:00      
                                          a bit of a chuckle?            01/01/70 00:00      
                                             sooner or later ...            01/01/70 00:00      
                                                you may be right :)            01/01/70 00:00      
                                                if I must lower my speed for programming, I will            01/01/70 00:00      
                                                   Capacitors on the write line            01/01/70 00:00      
                                                      NAAH            01/01/70 00:00      
                                                         anyone tell ya I have a slower clock too?            01/01/70 00:00      
                                                            Do you mean a crystal?            01/01/70 00:00      
                                                               it may            01/01/70 00:00      
   So, Mikey ... have you finally wised up?            01/01/70 00:00      

Back to Subject List