Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8458195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:00:54+00:00 2026-06-10T13:00:54+00:00

The datasheet of my microcontroller C8051F120 is clear on when it comes to reading

  • 0

The datasheet of my microcontroller C8051F120 is clear on when it comes to reading the 16 bit value PCA0L and PCA0H:

“Reading PCA0L automatically latches the value of PCA0H into a “snapshot” register; the following PCA0H read accesses this “snapshot” register. Reading the PCA0L Register first guarantees an accurate reading of the entire 16-bit PCA0 counter.”

However, I did not find a similar statement regarding the TMRnL and TMRnH registers. I remember on an Atmega128CAN90, I have used the following

unsigned char chL,chH;
#asm("cli")
chL=TCNT3L;
chH=TCNT3H;
#asm("sei")

Does anybody knows if the above quote also holds for the TMRnL and TMRnH registers of the C8051F120? Or, what is a safe way to get a consistent reading? Do interrupts need to be disabled?
Thanks for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T13:00:55+00:00Added an answer on June 10, 2026 at 1:00 pm

    Page 116 of the datasheet says:

    The TCNTn, OCRnx, and ICRn are 16-bit registers that can be accessed by the AVR CPU via the 8-bit data bus. The 16-bit register must be byte accessed using two read or write operations. Each 16-bit timer has a single 8-bit register for temporary storing of the high byte of the 16-bit access. The same temporary register is shared between all 16-bit registers within each 16-bit timer. Accessing the low byte triggers the 16-bit read or write operation. When the low byte of a 16-bit register is written by the CPU, the high byte stored in the temporary register, and the low byte written are both copied into the 16-bit register in the same clock cycle. When the low byte of a 16-bit register is read by the CPU, the high byte of the 16-bit register is copied into the temporary register in the same clock cycle as the low byte is read.

    So it does appear a similar thing is happening.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am reading a datasheet which uses the prefix 0x (e.g. 0x2185AD12) to indicate
is there a way to clear an entire column in a datasheet in access?
I have some VB that copies OLE objects into PowerPoint automatically for me. The
Following the instruction found here: Insert a datasheet into a form I get an
I am working with an LPC1768 ARM Cortex M3 microcontroller by NXP ( datasheet
I already read the datasheet and google but I still don't understand something. In
I have a sub form that looks like a datasheet view. It returns prices
I was doing some reading and have even gotten a master SPI working on
I have a datasheet that looks like this: ID name_ 1 2 3 4
I am trying to create a basic datasheet in my application using a TableLayout.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.