Keil Logo Arm Logo

8051 Counter 0 Example Program

This example program shows how to configure timer/counter 0 as a 16-bit counter taking input from Port 3.4. Each time P3.4 goes low, the 16-bit counter increments by 1.

To test this program...

  1. Start the debugger.
  2. View the Toolbox window.
  3. View the Serial window.
  4. Run the program.
  5. Click the Toggle Port 3.4 button in the toolbox.

You will see the value of the counter increase each time you click on the Toggle button in the ToolBox.

8051_COUNTER0.ZIP (10K)
Monday, November 27, 2000

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

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.