I am trying to level shift SPI bus communication from 5V to 3.3V. I am using a circuit similar to the solution shown in Phillips App Note AN97055, except that I am using the BSS138 MOSFET. I am using a 100ohm resistor on the gate of the MOSFET to dampen some of the ringing, which was causing my waveforms to distort. The pullup resistors on both the 5V side of the MOSFET and 3.3V side of the MOSFET are both 10kohm.
The issue I am having is that the waveform with this current setup has a peak voltage of 4.0V and low voltage of approximately 1.0V. Obviously this is not meeting the 3.6V LVTTL logic levels. When I attempt to adjust the gate resistor to get a peak voltage of 3.6V, the low voltage is 1.4V. Adjusting the pullup resistors seems to have little effect.
I could try to run the AVR at 3.3V as it would be in the safe operating range running at 8.0MHz, but I would like not to have to spin the board again and would like to learn how to level translate.
Below is an image of the waveforms. The yellow colored waveform on top is the 5V output from the AVR going to the MOSFET (specifically the SPI CLK signal), and the cyan colored waveform on bottom is the output through the MOSFET.
I would appreciate any help on this.