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 23:49
Read: times


 
#92099 - Timed access, take 2
Responding to: ???'s previous message
Thomas Skyt said:
The timed access procedure looks relatively straightforward. From page 34 of the user's guide:

1. Write 0xAA to TA (SFR 0xC7)
2. Write 0x55 to TA within 3 cycles
3. Modify timed-access protected register within 3 cycles. You want to clear bit 1 of WDCON. (SFR 0xD8).

If you feel compelled to used C code to do this, make sure you look at the disassembly to guarantee those three things happen within 3 instructions of one another.

Basically, that would like:
mov TA,0xAA
mov TA,0x55
wouldn't it?

Close. How about:
  mov TA,#0xAA
  mov TA,#0x55
The "#" indicates immediate data.

Well, how do I come about clearing just a single bit of WDCON in assembly?

How about:
  anl TA,#0xFD
I can't justclr WDCONsince that would erase all information therein.
Would it be so simple as this?clr WDCON.1Mind you - I have never used this language!

I do not believe this is a bit-addressable register.

I will take a look at it tomorrow - in ten hours sleep and a cup of coffee or so ...

That's probably a good idea.

Now, all discussion of timed access and IAP, have you done Erik's test to see if the watchdog is enabled?

If you are referring to the bit-toggling before the while(1)-loop, then yes, otherwise I must take a deeper look into his comments to find the reference to the watchdog.

Yes, that is what I am referring to. His point was that if your scope shows periodic toggling of the pin you toggle before the loop, your '450 is resetting periodically, most likely due to unintended operation of the watchdog timer. Of course, it could also be resetting due to something else, like noise on the reset line, but I suspect you have probably already made sure that your circuit is electrically sound.

Have you looked at the errata sheet for the latest revision level of the '420? It's rather long. Perhaps what you really want is an A4 revision of the '450.


Yes, I have, but I couldn't select a footprint / casing for the '450 and wouldn't want to risk having even more darned TQFP's, which I won't use until I am completely certain that my schematic works on stripboard and paper (yes I am one of those who initially do all the circuitry with pencil and paper).

/Thomas
good night

Hmm, I have ordered '450s from Dallas online, and have had no trouble getting DIP packages. Sometimes, though, the leadtimes are very long, which can be problematic.

--Sasha Jevtic

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