Strobe Bits of ATmega

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey.

 

So I've just read about the FOC0/FOC2 bit, which is implemented as a strobe and triggers an immediate compare match when writing a logical one to it.

So what exactly is a strobe in this context ? What is so special about strobe bits ? Is it maybe the fact that even when writing a logical one to FOC, its value will be always read as zero ? 

 

The earliest use of the 'strobe' keyword is at page 20 of the ATmega32 datasheet, but sadly without any further explanation.

I need these details for my simulator and sometimes datasheet is not enough :)

 

Thank you.

This topic has a solution.
Last Edited: Fri. Oct 16, 2020 - 02:14 AM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The act of writing a ‘1’ is a one-shot. You’re not writing a bit as such but causing an action.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you Kartman :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Or, putting it another way, it's a bit that when you write '1' to it, on the very next cycle it writes itself back to '0', thus saving you (programmer and CPU) the hassle of clearing it manually.  When '1' it causes an action, but doesn't stay at '1' once the action has been triggered.

 

Some strobes (although none, as far as I know, in the AVR) work the other way, sitting at '1' until flipped to '0' - and flipping right back.  S.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:
You’re not writing a bit as such but causing an action

This is an important thing to understand about SFRs - see: https://www.avrfreaks.net/commen...

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...