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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/21/09 19:57
Read: times


 
#166318 - then that's R0 not R1
Responding to: ???'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            01/01/70 00:00      
   apply proper reset            01/01/70 00:00      
      apply proper reset            01/01/70 00:00      
         then that's R0 not R1            01/01/70 00:00      
         MAX1232 + 4k7 pull-up            01/01/70 00:00      
            I beliebe this chip has a built-in watchdog and thus ...            01/01/70 00:00      
               I don't like those on-chip watchdogs and Vcc monitors            01/01/70 00:00      
                  Should be always on            01/01/70 00:00      
                  external vs internal            01/01/70 00:00      
                     ..            01/01/70 00:00      
                        Ground plane?            01/01/70 00:00      
                           no ground plane            01/01/70 00:00      
                              choose a "magic" frequency crystal ...            01/01/70 00:00      
                                 20MHz and 57600            01/01/70 00:00      

Back to Subject List