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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/07/05 23:21
Read: times


 
#91226 - other things...
Responding to: ???'s previous message
basically if the security bits are not set, you can switch the EA pin "on-the-fly" for most of the 80C51 parts. Its the same basic idea. You shadow the bootcode into the internal user space using ENBOOT=1. Then you execute a jump to FC00h. But, in this case we just need some logic that switches the EA pin at the correct time. So lets say we have those two instructions in memory.... address 0000h to 0002h contain the ORL AUXR,#20h instruction (3 bytes). The next three bytes, from addresses 0003h to 0005h contain the LJMP FC00h code. The next byte will be at address 0006h. We don't care what's in here, BUT, it will be fetched! Why? One of the things I learned a long time ago, from a chip designer, is that the 8051 core fetches instruction in groups of two. A three byte instruction will fetch fetch four bytes and simply not use the fourth byte. So what we need to do is detect when the end of our third byte of the LJMP has been fetched and simply switch the EA pin to EA=1. We can use the rising edge of PSEN/ and the address = 0005h to tell us that the third byte of the LJMP has been fetch. So lets use a f/f with a clear input. All the ones that I have seen are active low clears. We need this to be cleared by power on reset and otherwise not drive the clear. So connect a wire from the RSt pin to the input of an inverter. Connect the output of the inverter to the CLR/ input of a f/f. Connect the D-input of the f/f to a "1" (pull it up). Connect the Q output of the f/f to the EA/ pin of the MCU. Using AND gates the clock input to the f/f = A0*(A1/)*A2*(PSEN/), so that only when the address = xxxx xxxx x110 and PSEN/ pulses from low to high at the end of the fetch of the third byte, will the f/f get clocked and drive the EA/ high. Once it switches to external memory we shouldn't see any more pulses on PSEN. Even if the f/f gets clocked again for some reason we don't care 'cause we already said "make my PC=FC00h!". Anyone want to try it? Anyone have time?


List of 34 messages in thread
TopicAuthorDate
Philips p89c51RDx Programmer project            01/01/70 00:00      
   Useful Project            01/01/70 00:00      
   Useful Project. Count me in            01/01/70 00:00      
      lets try something....            01/01/70 00:00      
         No Go            01/01/70 00:00      
            see my "other things.."            01/01/70 00:00      
               bootrom code            01/01/70 00:00      
                  Jan, please email me at .....            01/01/70 00:00      
                  BootRom Code            01/01/70 00:00      
                     Boot ROM address range            01/01/70 00:00      
                        2kb boot code            01/01/70 00:00      
                           B oot from External Memory            01/01/70 00:00      
                              !EA/Vpp            01/01/70 00:00      
   why not the simple solution: NoTouch            01/01/70 00:00      
      Too Late            01/01/70 00:00      
         Try this, it has worked for some            01/01/70 00:00      
   Philips's angwer            01/01/70 00:00      
      the most often changed            01/01/70 00:00      
      an RX2 'fix' from the horse's mouth...            01/01/70 00:00      
         neat            01/01/70 00:00      
         Nice!            01/01/70 00:00      
            I'll look tomorrow...            01/01/70 00:00      
               I take it back            01/01/70 00:00      
                  you're NOT as stupid as you think.......            01/01/70 00:00      
         Not possible !!!            01/01/70 00:00      
            respectfully disagree...            01/01/70 00:00      
               Re: respectfully disagree...            01/01/70 00:00      
                  I didcussed it above earlier today...            01/01/70 00:00      
               difference Philips.vs.Atmel            01/01/70 00:00      
                  other things...            01/01/70 00:00      
                     lets make the ckt even simpler...            01/01/70 00:00      
                     maybe ?            01/01/70 00:00      
                        using the EA pin            01/01/70 00:00      
               which bits            01/01/70 00:00      

Back to Subject List