Skip to content

Commit 57be321

Browse files
author
Elliot Williams
committed
tweaks to readme
1 parent c8f7269 commit 57be321

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

code/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ I've even included the .hex files if you just want to run it, and don't want to
1010

1111
There's one trick: I wanted sub-microsecond pulses for experimentation, and the AVR's `_us_delay` function has one microsecond as the lower bound. The solution is to tell the delay function that we're running the CPU at 1 MHz, and then actually run the CPU at 8 MHz. (If you want more resolution, you can play around with other combinations.)
1212

13-
So, in the Makefile, you'll find `F_CPU` defined as 1 MHz, and in the code you'll see that I've set the clock prescaler to 1, which means the chip is running at the full 8 MHz. If you want to play around with other ratios, define `F_CPU` to be even slower.
13+
So, in the Makefile, you'll find `F_CPU` defined as 1 MHz, and in the code you'll see that I've set the clock prescaler to 1, which means the chip is running at the full 8 MHz.
1414

1515
But caveat: the routines for calculating the baud rates on the serial hardware also rely on `F_CPU` . If you're using that peripheral, you'll need to adjust things accordingly.
1616

17-
Anyway, if you want a nominal 1 us pulse, you'll need to call `_delay_us(8)`. That's all there is to it.
17+
Anyway, if you want a nominal 1 us pulse, you'll need to call `_delay_us(8)`. There's some function-call overhead that makes this not work out exactly, so check out the pulses on a scope if you've got one. Otherwise, that's all there is to it.
1818

0 commit comments

Comments
 (0)