Buy(Cart) Contact NSDSP Home

Connection with Voltage Level Shifters

To interface NSDSP with a PIC running at different voltage, level translators must be used. Special level translator or level shifter ICs may be used, or the level translators may be built from discrete components.


For the locations of the NSDSP pins, refer to the pinout diagram. Only PIC pins used for connecting NSDSP are shown. For the list of connections necessary to run the PIC, refer to the datasheet for your PIC device.

This schematics does not show any ESD protection devices which may or may not be needed for the application.

When designing level translators between NSDSP and PIC, make sure that none of the translator outputs are driven high when the USB cable is disconnected. Otherwise, these outputs may unintentionally power NSDSP.

When powered, NSDSP will drive some of its pins high - MCLR, TX, and possibly RTS. You need to make sure that these signals do not pass through the level translators when the target PIC device is not powered.

To enable programming and debugging, MCLR, PGC, and PGD pins must be connected. Values of R1, R2, and R3 depend on the sourcing abilities of the level translators they're connected to. Typical values are 1kΩ, but if translators cannot source enough current to drive the resistors, the values of R1, R2, and R3 must be increased. Resistors up to 10kΩ are Ok, but higher resistance may interfere with high speed programming rates. R2 and the corresponding level translator is necessary only if PGC line is bidirectional, which is the case only when debugging dsPIC33E/PIC24E and some of PIC32 devices. The propagation delay on PGC and PGD lines cannot exceed 10ns at the highest programmming speed. Longer propagation delays are Ok if programming speed is decreased. Traces connecting PGC and PGD pins must be kept as short as possible. If longer traces are needed, it is best not to run them parallel to each other. Do not connect any diodes or capacitors to PGC or PGD pins.


PGC and PGD pins

If your PIC has several pairs of PGD/PGC pins, you can use any pair, but you must use it as a pair. Do not combine pins from different pairs.

PGC or PGD pins are busy during programming and debugging. However, you can use them during run time.

Using PGC and PGD as inputs is impossible because the output from the level translators will drive both pins. The pins can be configured to be driven high or low, but putting them into high impedance state will not work because of the level translators.

To use PGC and PGD as outputs, connect them directly or through protective resistors. Combined impendance must be at least 10kΩ (more if values of R1/R2 were increased above 1kΩ). Configure NSDSP to drive PGC and PGD pins to the same state as the idle state of your outputs. When NSDSP pins are in a state which is different from the state of PIC's pins, power will dissipate through R1 or R2. Make sure that devices connected to these pins can tolerate high frequency signaling during programming or debugging.

To use PGC and PGD to detect USB state, configure NSDSP to alter the state of the pins depending on USB state. Once configured, you can read the state of these pins to detect when USB power is connected, when USB connection is established, and when NSDSP enters UART mode. However, when NSDSP is not powered the state of PGC and PGDO pins is undefined. Level translators for these pins must be designed to have predictable output state when USB power is disconnected. There may be glitches on PGC and PGDO pins when NSDSP is powering up and down. To prevent the glitches, 100kΩ pull-down or pull-up resistors may be connected to NSDSP's PGC and PGDO pins.

If not using PGC and PGD configure them as inputs.


MCLR pin

Some PIC devices require an MCLR circuit which includes capacitor to the ground and pull-up resistor (see datasheet for your PIC). If such circuit is used, isolate the circuit from the PIC's MCLR pin with 470Ω (or more) resistor, and make sure that the output of the level translator connects directly to the PIC's MCLR pin without any resistors in-between.

If your PIC device allows using MCLR as a GP input, you must enable MCLRE and LVP. Level translator for MCLR requires special care. It must be designed in such a way that it doesn't drive MCLR pin low when USB cable is disconnected. Otherwise, your PIC will reset.


UART pins

To communicate with the host computer through USB, your PIC can use UART. RX and TX pins must be connected as shown. Level translators for these pins may have longer propagation delays, but must support the intended baud rate. When not in use, NSDSP drives its TX pin high at all times. However, when NSDSP is not powered, the state of TX pin is undefined. Your UART module may interprete this as a beginning of transmission. To prevent this, you must design the level translator for the TX pin so that it stays high when USB power is disconnected. There may be glitches on TX line when NSDSP is powering up and down. To prevent the glitches, a 100kΩ pull-up resistor may be connected to NSDSP's TX pin.

If UART is not needed, do not install level translators for TX/RX, leave TX pin unconnected, and connect RX to VDD.

If UART flow control is required, RTS and CTS pins must be connected too. While NSDSP is not in the UART mode with flow control, the state of RTS is undefined. If flow control is not needed, do not install level translators for RTS/CTS, leave RTS unconnected and connect CTS to ground.

For more details on UART communicatons, click here


There may be special considerations for your specific PIC device. Please visit the Supported Devices section, find your device and read the documentation.

Northern Software Home NSDSP Contact Us Purchase/Vew Cart

© 2007-2018 Northern Software Inc. All Rights Reserved.