Cart Contact NSDSP Home

Pin control

Pin control is available in SPI sessions only.

You can control the following pins - MCLR, PGC, PGDO, PGM/RTS/AMCLR.

MCLR pin

MCLR pin is special, it can output high voltage. In NSDSP-2, you can configure it to output high voltage using the HVP setting. The following table shows how the MCLR and HVP settings determine the state of the MCLR pin:

MCLR HVPMCLR Voltage
000
01High voltage
10VDD
11VDD

For NSDSP-1, you can achieve a similar effect if you combine it with NSHVX, except that NSHVX-1 uses external PGM/RTS/AMCLR pin instead of the internal HVP setting.

NSDSP-2 supports two high voltage levels - 9 and 12 volts. The level must be set using the NSDSP Object before you open the SPI session.

PGC and PGDO pin

These pins are used as SPI pins. Therefore, if you want to manipulate these pins SPI must be disabled. Both pins are controlled by a single command which either sets the state of both pins at the same time or returns the pins to SPI. There are no commands to control these pins individually.

LED

In NSDSP-2 you can also control states of red and green LED.

Timing

All commands are executed by NSDSP at regular intervals. The time between consecutive commands depends on the SPI rate. The table below shows the list of available SPI rates along with the corresponding time intervals between commands:

Frequency Interval
50 kHz161.3 μs
100 kHz80.7 μs
250 kHz32.7 μs
500 kHz16.7 μs
1 MHz8.7 μs
1.5 MHz6 μs
2 MHz4.7 μs
2.4 MHz4 μs
3 MHz3.3 μs
4 MHz2.7 μs
6 MHz2 μs

If you want to delay commands, you can insert delays. The shortest delays simply skip one command. Longer delays may be specified in milliseconds or microseconds. The delay produced by the delay functions is guaranteed to last for at least the specified time, but may last longer. Maximum delay is 3 seconds.

When you specify longer delays, it is a good idea to increase timeouts, so that the operation wouldn't time out in the process.

Northern Software Home NSDSP Contact Us Purchase/View Cart

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