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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Jan Waclawek
06/21/09 14:57
Read: 158 times
Bratislava
Slovakia


 
#166318 - then that's R0 not R1
Responding to: Aleksandar Stancic's previous message
Aleksandar Stancic said:
I finally got it! After two days..

MOV R1,0
should be
MOV R1,#0!


The reason it worked from FLIP is that BOOT ROM
has left R1 at a fixed state (ie. a value from
0 to FF, but always the same).

It's not the value of R1 what counts, but R0.

MOV R1, 0 moves the content of address 0 to R1. Address 0 is identical to R0 (unless banks have been switched, which is not your case).

Aleksandar Stancic said:

I haven't read anywhere, but I bet that the
memory 0-7F is undefined after power-up, right?

You might not be aware of the fact, that the datasheet is not the only source of information. In the '51 world, it is a custom (started by Intel itself) to keep the "common information" in one document (dubbed as "bible" here - see http://www.8052.com/faqs/120112) and only "model-specific information" in the datasheet itself.

Funnily, somehow the section on reset behaviour is missing from the current Atmel's version of "bible" (although the content lists it...)

The Philips version (_HARDWARE_) says it, by the end of page 18:
The internal RAM is not affected by reset. On power up the RAM content is indeterminate.

That is ALL internal memory, 0-FF (and in the RD2/ED2, this is valid for the internal ERAM, too)

Aleksandar Stancic said:

The time it took me to remove the programming cable
was enough for CPU to 'forget' the memory contents
below SFRs.

SFRs are 'forgotten', too. Most of them are set to a defined state upon subsequent reset, though. Read again the reset section of "bible" carefully.

-------------------

Aleksandar Stancic said:

The RES pin is still floating, and it works.

Does anyone have experience with ED2 regarding
brown-outs, etc? Should I implement a reset IC
or is internal circuit sufficient?

Look, to implement a reset IC is staying on the safe side. The description of internal reset in the datasheets leaves too many questions open, e.g. whether there is a guarantee that the reset will last until the oscillator stabilises - there's no spec on the duration of the internal reset whatsoever.

Strictly speaking, at 48MHz the internal reset is insufficient anyway, as it releases at around 2.5V, and above 40MHz the operation below 4.5V is unspecified.

You might perhaps want to read the pamphlet on reset I wrote (and never finished... :-( ).

Aleksandar Stancic said:
The ED2 should work up to 60MHz. I've programmed it
with FLIP (all 64k, several times) at 48MHz.

Yes, but it works up to 60MHz only in the 12-clock mode. Make sure you don't set the x2 fuse.

Aleksandar Stancic said:
Does PSEN have internall pull-up?

Although the datasheet is far from being clear in this question, it would be foolish from Atmel if it would not have it.

JW


List of 14 messages in thread
TopicAuthorDate
AT89C51ED2 changing speed on its own      Aleksandar Stancic      06/21/09 03:21      
   apply proper reset      Jan Waclawek      06/21/09 05:37      
      apply proper reset      Aleksandar Stancic      06/21/09 12:21      
         then that's R0 not R1      Jan Waclawek      06/21/09 14:57      
         MAX1232 + 4k7 pull-up      Kai Klaas      06/22/09 07:26      
            I beliebe this chip has a built-in watchdog and thus ...      Erik Malund      06/22/09 09:43      
               I don't like those on-chip watchdogs and Vcc monitors      Kai Klaas      06/22/09 10:35      
                  Should be always on      Per Westermark      06/22/09 10:47      
                  external vs internal      Erik Malund      06/22/09 13:18      
                     ..      Aleksandar Stancic      06/22/09 13:45      
                        Ground plane?      Kai Klaas      06/22/09 14:01      
                           no ground plane      Aleksandar Stancic      06/22/09 14:10      
                              choose a "magic" frequency crystal ...      Jan Waclawek      06/22/09 15:00      
                                 20MHz and 57600      Aleksandar Stancic      06/22/09 17:33      

Back to Subject List