USB-to-UART
Configuration Speed Tests ICSP Cable Software for NSDSP Interface Library Source Code SDK Supported DevicesNSDSP UART-to-USB Interface
In UART mode, NSDSP streams full duplex data between PC and UART devices connected to its RX/TX pins.
UART connection
NSDSP's RX pin must be connected to PIC's TX pin and NSDSP's TX pin must be connected to PIC's RX pin. If you use flow control, RTS/CTS pins must be connected too. For more details, see connections.
If you use NSDSP-1 or NSDSP-2, PIC can also use PGC/PGD pins. They may be configured to change state when a USB connection is established or lost and when NSDSP enters UART mode.
NSDSP-3, when in UART mode, puts all pins except MCLR and UART pins into high-impedance state.
USB Transmission
The USB connection is full-duplex. Data transfers from the PIC to the host computer occur simultaneously and independently from data transfers from the host computer to the PIC.
PIC to Host
NSDSP-3 uses variable-sized packets and can handle much more data than underlying UART may ever transmit. Therefore, the maximum achievable transfer rate is limited by UART at 8 MBytes per second.
NSDSP-1 and NSDSP-2 are HID devices. Packets transmitted to the host computer are always 64 byte long. Only 62 bytes are usable. Packets are sent every millisecond. Therefore, the maximum achievable transfer rate is 60.5 KBytes per second.
Communication software on the host computer continuously receives packets from NSDSP and buffers them. There is no mechanism to pause the transmission from the host side. Therefore, a large buffer is used by the software - 256k for NSDSP-1 and NSDSP-2, 1M for NSDSP-3. To prevent buffer overflow, the data must be read frequently enough. Based on the baud rate, you can calculate the time necessary to fill in the buffer.
Host to PIC
NSDSP-3 uses variable-sized packets and can handle much more data than underlying UART may accept. Therefore, the maximum achievable transfer rate is limited by UART at 8 MBytes per second.
The packets transmitted from the host computer to NSDSP-1 and NSDSP-2 are 1024 byte long. Only 1008 bytes are usable. It takes 16ms to transfer the packet to NSDSP. Therefore, the maximum achievable transfer rate is 61.5 KBytes per second. On some computers with older operating systems or slower processors, there could be an extra 1ms delay between packets. Therefore, the maximum transmission may fall to 58 KBytes per second.
Even if you want to transfer a single byte, the whole packet must be transferred. NSDSP starts processing the data as soon as the transmission of the packet begins, but afterwards the system has to wait for the rest of the packet to be transmitted. Therefore, the next packet may be delayed up to 0.25ms for NSDSP-3 and up to 16ms for NSDSP-1 and NSDSP-2. Typically, this is not a problem because the communication software on the host computer buffers and packetizes the data as dense as possible. However, if your communication protocol involves sending small data pieces back and forth, this may increase the latency and slow down the transmission.
Flow control
A flow control may be necessary in one of the cases:
CTS and RTS pins are used for flow control.
If flow control is used then NSDSP samples its CTS pin before sending a byte to PIC. NSDSP sends a byte to PIC only if CTS is low. To be compatible with hardware flow control implementation on PIC UART modules, NSDSP samples the CTS pin very late - only after the transmission of previous byte has ended. For NSDSP-1 and NSDSP-2, this introduces a two-baud delay between bytes being sent to PIC and reduces transmission rate by 20 percent. This is not a problem for NSDSP-3 which achives the same transmission rate whether flow control is used or not.
When NSDSP is running out of buffer space while receiving data from PIC, it drives its RTS pin high. Once this happens, PIC has to pause sending until RTS pin is set low. NSDSP still has space for a few extra symbols. Therefore, PIC can send a few symbols after RTS pin is driven high. Once paused, PIC is supposed to resume transmission as soon as NSDSP drives RTS low.
Flow control must be requested by host software when entering UART mode. Otherwise, RTS pin is kept low and CTS pin is ignored.
NSDSP does not support software (XON/XOFF) flow control.
Baud rates for NSDSP-3
NSDSP-3 divides master frequency of 240 MHz to generate UART baud rates in the range from 4800 Baud to 80 MBaud.
NSDSP-3 will work if the requested baud rate can be produced with 2.5% accuracy. For example, 80 MBaud may be used (240 divided by 3), and 60 MBaud may be used (240 divided by 4), but 70 MBaud cannot be used because both 60 and 80 MBaud are too far from the 70 MBaud target. If you specify 70 MBaud, NSDSP-3 software will reject the baud rate.
Baud rates for NSDSP-1 and NSDSP-2
NSDSP-1 and NSDSP-2 can use only a number of fixed baud rates listed below. The baud rate is specified by host software when entering UART mode.
| Baud Rate | Max Transfer Rate Bytes/sec | |||
|---|---|---|---|---|
| No Flow Control | Flow Control | |||
| Host to PIC | PIC to Host | Host to PIC | PIC to Host | |
| 1200 | 120 | 120 | 100 | 120 |
| 2400 | 240 | 240 | 200 | 240 |
| 4800 | 480 | 480 | 400 | 480 |
| 9600 | 960 | 960 | 800 | 960 |
| 19200 | 1920 | 1920 | 1600 | 1920 |
| 38400 | 3840 | 3840 | 3200 | 3840 |
| 57600 | 5760 | 5760 | 4800 | 5760 |
| 115200 | 11K | 11K | 9600 | 11K |
| 230400 | 23K | 23K | 19K | 23K |
| 460800 | 45K | 45K | 38K | 45K |
| 921600 | 62K | N/A | 62K | 57K |
| 250000 (250k) | 24K | 24K | 20K | 24K |
| 500000 (500k) | 49K | 49K | 41K | 49K |
| 1000000 (1M) | 62K | N/A | 62K | 57K |
| 2000000 (2M) | 62K | N/A | 62K | 57K |
At low baud rates, the maximum transmission speed is determined by the communication speed between PIC and NSDSP. At higher baud rates, the speed is limited by USB communications between NSDSP and the host computer.
Software
There are two software options.
You can use nsuart command line utility, which you can download as a part of NSDSP Software Suite.
You can write your own software. Use either open source SDK or closed source interface library.
© 2007-2026 Northern Software Inc. All Rights Reserved.