What is the rise time of an output pin of atmega328 changing its state?

I've already searched a lot and didn't found the answer. Also, I don't have an o'scope. Anyone can help me?

• Should be in the `ns` range. Also depends on the load, obviously. Mar 19, 2015 at 19:32
• Do you have the load impedance and capacitance, and the input thresholds? Mar 21, 2015 at 1:14

I just measured on my Uno with a pocket scope and a cheap 1× probe. I got something around 40 ns, but it was at the bandwidth limit of this basic scope, and I believe this probe has quite high capacitive load. A faster scope and a better probe would probably give a shorter rise time.

Update: I tried again with a better scope (an Hameg HM-305) and a decent 10× probe, the observed rise time was somewhere in the 10 ns range, which is about the rise time of the internal amplifier of the scope. Then the higher boundary would be about 10 ns.

Last time I measured on a circuit (it was an i2c network master and with a 2560), it was about 0.3us, so that gives you a high value for that. Also, I believe it cannot be faster than one/half of a CPU cycle which takes: 1/(16E6)=62.5ns/2 = 31.25ns, so here's the lower boundary.

And there you got a possible range.

Then the rise time will definitely depend on the configuration of the circuit. It might be less or more depending on pull ups, capacitance attached at the pin out exit. It might also depend on the configuration of the pin (PWM? Internal Pull-up?…)

Finally, I believe there should some nominal values given in the datasheet.

Edit: Useful knowledge from the datasheet, but there's no definitive answer for any pin:

P311: 29.4.3 External Clock Drive

``````| Symbol | Parameter | Min | Max   | Min | Max   | Min | Max   |
| ------ | --------- | --- | ----- | --- | ---   | --- | ----- |
| tCLCH  | Rise Time |     | 2.0µs |     | 1.6µs |     | 0.5µs |
``````

P313: 29.6 SPI Timing Characteristics

``````| Description    | Mode      | Min | Typ   | Max    |
| -------------- | --------- | --- | ----- | ------ |
| Rise/Fall time | Master    |     | 3.6ns |        |
| Rise/Fall time | Slave     |     |       | 1600ns |
``````

P315: 29.7 Two-wire Serial Interface Characteristics

``````| Symbol | Parameter                      | Condition | Min        | Max   |
| ------ | ------------------------------ | --------- | ---------- | ----- |
| tr     | Rise Time for both SDA and SCL |           | 20 + 0.1Cb | 300ns |
``````

HTH

• The cycle time is 62.5&nbsp;ns, and of course the rise time can be shorter than that. Mar 21, 2015 at 17:58
• The rise time of a GPIO on all embedded systems is not connected to the CPU speed. Mar 30, 2015 at 23:45

I got 8 ns on both the rising and falling edges. If using the PORT instruction to set and clear bits instead of the much slower digitalWrite() instruction, the highest frequency I got by toggling a pin high and low was 2.666 Mhz. This is slowed down by the excessive time the arduino takes to pass execution back to the top of the Loop() marker. The duty cycle of the pulse output at 2.666 Mhz was somewhere in the region of 15%.