AVR446, first stepper pulse delay calculation

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

Hi all,

 

As a pure learning exercise I wanted to work through writing a stepper motor control library from scratch, without using any example source.

 

Microchip have an app note from back in the Atmel days, AVR446 (http://ww1.microchip.com/downloa...), which is helpful - though at the same time I'm lost.

 

Section 2.3.1, calculation of the first counter delay c0 - am I just being thick, or how does one solve for c0, without knowing tt? I feel like I'm missing something obvious but after a day of reading and re-reading, thought I'd see if anybody could point me to where I'm missing the point!

 

All the best

This topic has a solution.
Last Edited: Sun. Oct 10, 2021 - 03:21 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ah got it... I've realised my confusing is from the fact that app note discusses calculation of counter delays (as in, hardware timer/counters), and time intervals - without greatly distinctive naming conventions.

 

t= a timer period. I.e. timer running at 2MHz, tt = 1 / 2000000 = 0.0000005.