Datasheets that switch units mid-table

Timing tables for chips, LED drivers and buses often list one parameter in microseconds and the next in nanoseconds. A line reading 1.25 µs sits above one reading 400 ns. Comparing them means converting one, and the factor of 1,000 is easy to apply wrongly when you are reading a table under time pressure. This page makes the step explicit. Enter the microsecond value and get nanoseconds, or reverse the units for the other direction. It suits makers working with microcontrollers, technicians reading an oscilloscope screen and students in digital electronics courses who have to line up timing diagrams that use different scales.

One thousand nanoseconds

Micro is 10^-6 and nano is 10^-9, so one microsecond equals 1,000 nanoseconds. The page applies ns = µs × 1000. With the default 10 µs the answer is 10,000 ns, and the engine may show 9999.999999999998 because of floating-point arithmetic, which is the same value. The conversion moves the decimal point three places to the right, and the number gets larger because the nanosecond is the smaller unit. The factor is exact by definition of the prefixes in the SI Brochure. As a check, ask whether the result is larger than the input. If it is not, the dropdowns are probably reversed.

Addressable LED timings

The WS2812B family of LEDs reads a data stream at 800 kHz, so one bit lasts 1.25 µs, which is 1,250 ns. A zero bit holds the line high for about 0.4 µs, or 400 ns, and a one bit for about 0.8 µs, or 800 ns, with tolerances of around 150 ns in many datasheets. Library authors express these in nanoseconds because the delays are shorter than a microsecond. If your microcontroller can only wait in whole microseconds, you need to know that 400 ns is less than one tick. Converting the datasheet values shows whether a software loop can reach them or whether a hardware peripheral is needed. Check the exact figures against the datasheet of your own LED.

Clock periods and instruction times

A clock of 16 MHz has a period of 62.5 ns, which equals 0.0625 µs. One microsecond contains 16 such cycles, so an instruction that takes two cycles lasts 125 ns. At 8 MHz the period is 125 ns, and at 72 MHz it is about 13.89 ns. When you plan a bit-banged protocol, divide the required time in nanoseconds by the clock period to get the number of cycles. Entering 0.0625 as microseconds returns 62.5 ns. These conversions are routine in firmware work, and the page removes the chance of a slip when the value in a datasheet is written with a different prefix from the one in your code.

Bus timings in I2C and SPI

The I2C specification lists the hold time for a start condition as 4.0 µs in standard mode and 0.6 µs in fast mode, which are 4,000 ns and 600 ns. A 400 kHz clock has a period of 2.5 µs, or 2,500 ns. SPI devices list setup and hold times in nanoseconds, and a clock of 8 MHz has a period of 125 ns. When you debug a bus with a logic analyzer, the cursor readout may show microseconds, while the datasheet shows nanoseconds. Converting one into the other lets you test whether the measured interval meets the stated minimum. Give yourself some margin, since real signals vary with temperature and supply voltage.

Logic analyzer sampling intervals

A logic analyzer sampling at 24 MHz records one sample every 41.667 ns, or 0.041667 µs. That resolution is not enough to measure the 400 ns pulse of an LED stream with high accuracy, because a pulse of 400 ns spans about 10 samples. Doubling the sample rate halves the interval. When you pick a sampling rate, convert the shortest interval you need to resolve into nanoseconds and divide by the sample period. This page handles the unit step, and the same quick conversion shows why a cheap analyzer is fine for a 100 kHz serial line yet marginal for fast signals.

From nanoseconds back to microseconds

Choose nanoseconds as the source and microseconds as the target to divide by 1,000. A value of 400 ns becomes 0.4 µs, 1,250 ns becomes 1.25 µs, and 62.5 ns becomes 0.0625 µs. The reverse direction is useful when a datasheet gives nanoseconds and your delay function takes microseconds. In that case values below 1,000 ns cannot be expressed as a whole number of microseconds, so you round up or use a finer timer. A good habit is to keep a table of the timings you use in both units, with the source datasheet noted next to each row.

Oscilloscope readouts

An oscilloscope screen shows time per division, and the setting decides which unit the knob displays. A timebase of 500 ns per division across ten divisions spans 5 µs, which is 5,000 ns. A rise time of 20 ns is 0.02 µs, and a pulse width of 1.6 µs is 1,600 ns. When you measure an edge with cursors, the readout may switch from ns to µs as the value passes 1,000, so two measurements of similar size can appear in different units on screen. Writing both in nanoseconds before you compare them avoids the mistake of reading 1.2 µs as smaller than 900 ns. The page performs that conversion directly, and the result is exact because it only shifts the decimal point.

Datasheet timing and your own measurements

The page converts a time value. It does not check whether a circuit meets a timing requirement, simulate a signal or account for propagation delay, rise time or jitter. The minimum setup or hold time for a chip comes from its own data sheet and a scope measurement. Datasheet values come with conditions of supply voltage, temperature and load, and the figures cited here are typical ones for illustration. Always read the specification of your own part, and measure the real signal with suitable equipment. A converted number helps you compare values in one unit, nothing more. When you copy a timing into code, keep the datasheet figure and the unit in a comment next to the constant, and round up when a value falls between two timer ticks, because a delay that is slightly too long is usually safe where one that is slightly too short breaks the protocol.