|
|||||||||||
|
Technical Support Support Resources
Product Information |
C51: Using Timed Access Registers on Dallas PartsInformation in this article applies to:
QUESTIONHow do I use the Timed Access registers on the Dallas Semiconductor parts? I can't seem to get the compiler to generate code that sets or clears the timed access registers fast enough. Is there a way to do this in C? ANSWERYes. The following example shows how to reset the watchdog timer for the Dallas 320 using the C Programming Language.
This example generates the following code:
As you can see from this listing, the TA register is set to 0xAA and then to 0x55 and the next instruction writes to the RWT bit. The C51 C Compiler is an optimizing compiler. Some optimization levels may cause problems with timed access registers like those supported by the Dallas Semiconductor parts. It is a good idea to create a function for each type of timed access and manually set the optimizer level for that routine. For example:
MORE INFORMATION
SEE ALSOLast Reviewed: Thursday, February 25, 2021 | ||||||||||
|
|||||||||||
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.