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

Back to Subject List

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


 
#92062 - A variety of answers
Responding to: ???'s previous message
First, have you made sure that you have your project in Keil set up as a project that is built around a DS89C450, and not another chip, such as a generic 8051? You seem to be including a legitimate startup file, which suggests you have this right, but if you included that manually, and do not have the project set up properly, the simulator will almost certainly not know that it is supposed to simulate the DS89C450's enhanced timers, and instead, will most likely be simulating ordinary 8051 timers. That could explain why what you see in the simulator is not what you see in hardware.


I set Keil up according to the recommendations on the Dallas website, but had to bend them a little (see next answer):
http://www.maxim-ic.com/appnotes....umber/3267

Also, I am wondering what version of Keil you have. I do not know at what version simulation support for the enhanced DS89C450 peripherals was added. However, I should note that 7.50a should have you including START4XX.A51 for a DS89C450, which leads me to believe you might not have the latest version.


I am running the 7.07 version of the compiler and the 7.08a version of the assembler. The uVision IDE is version 2.39.

And, for your information, in this version, if you enable the startup file's manipulation of PMR, you can find yourself in a problematic situation: a bug in that code will put your device in 2x clock frequency multiplication mode. This can easily pass unnoticed if your oscillator is less than 16 MHz or so, but if it is much above that frequency, the device will be internally overclocked as a result and is likely to hang. Keil acknowledged this problem, and said they will fix it in a future release.


In that case, I consider myself both fortunate for not having that bug and unfortunate for not having the opportunity to specify this exact device.
But then again, I am currently only using an 11.0592 MHz quartz, but I was thinking about exchanging it for a 33 MHz quartz oscillator.

I have not thoroughly looked through your SFR initializations, but you might want to double check them; during a quick run through, I noticed you were manipulating, among other things, the number of stretch cycles used for external memory accesses. I suspect that was not intentional; it certainly is not part of the comments.


I just had a look into at - I hadn't noticed that at first. I wrote that piece of the code when I was already tired and irritated. It has been changed back - http://www.8052.com/forum/read.phtml?id=92059 - to the "original" setup.

/Thomas

List of 33 messages in thread
TopicAuthorDate
DS89C450 / uVision2, timer0 trouble            01/01/70 00:00      
   perhaps            01/01/70 00:00      
      nope - didn't work            01/01/70 00:00      
   never used Dallas but            01/01/70 00:00      
      I just followed orders            01/01/70 00:00      
         link, please            01/01/70 00:00      
            my apologies            01/01/70 00:00      
               try system clock            01/01/70 00:00      
                  The system clock vs. External Oscillator            01/01/70 00:00      
                     Try >=?            01/01/70 00:00      
                        good idea            01/01/70 00:00      
                           probably a watchdog or such            01/01/70 00:00      
                              about the beer ...            01/01/70 00:00      
                                 reason            01/01/70 00:00      
                                    puzzled by the simplicity            01/01/70 00:00      
                                       It's getting late in Denmark            01/01/70 00:00      
                                          the Thomas Skyt late night show ...            01/01/70 00:00      
                                             kiss            01/01/70 00:00      
                                                KISS/2            01/01/70 00:00      
   A variety of thoughts            01/01/70 00:00      
      A variety of answers            01/01/70 00:00      
         Thoughts for variety of answers            01/01/70 00:00      
            sfr's            01/01/70 00:00      
            the watchdog            01/01/70 00:00      
               The watchdog, timed access, and errata            01/01/70 00:00      
                  setting the OCR to disable the watchdog            01/01/70 00:00      
                     Timed access, take 2            01/01/70 00:00      
                        unnecessary excersize            01/01/70 00:00      
                           The watchdog, take 3            01/01/70 00:00      
                              when in doubt            01/01/70 00:00      
                                 Examining the assembly            01/01/70 00:00      
                                    get out of there            01/01/70 00:00      
                                       I got out, found a solution            01/01/70 00:00      

Back to Subject List