Jump to content
  • 0

PMOD CLS SPI with LabVIEW & myRIO


Airmanblu

Question

Good evening, 

I have been struggling with a lab for school. The lab is using the SPI vi in LabVIEW to connect to the myRIO to the PMOD CLS LCD in order to display stings. This device has worked well for the I2C, TWI, and UART communication protocols. However, for some reason when using the SPI for write operations, it will not output and no combination of the MO jumper locations will result in an output. Per the reference manual, the only jumper needed is on MO0 as the board is a rev. E. I purchased the first CLS through Studica in the embedded systems kit, when that one failed I went though Mouser to purchase another. (I currently live in Germany) So far neither device seems to work. 

The interface is via the MOSI and SCLK pins, with 3.3v and ground from the myRIO. 

The LabVIEW version used is LabVIEW myRIO Toolkit 2019. The myRIO is a 1900 and was purchased in 2020. 

This is the vi that is being used. 

image.thumb.png.7f2330f70f8c0ee883ab076e53a1b6ad.png

Any advice would be greatly appreciated. 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hi @Airmanblu,

I don't have a Pmod CLS with me at my home office to test this, but you are correct that MO0 should be the only jumper that needs to be loaded with regards to JP2. You'll also need to set JP1 to the SS side so that any Chip Select signaling gets routed to the correct pin on the embedded microcontroller.

The supplied 3.3 V from the myRIO should be fine.

Thanks,
JColvin

Link to comment
Share on other sites

  • 0
16 hours ago, JColvin said:

Hi @Airmanblu,

I don't have a Pmod CLS with me at my home office to test this, but you are correct that MO0 should be the only jumper that needs to be loaded with regards to JP2. You'll also need to set JP1 to the SS side so that any Chip Select signaling gets routed to the correct pin on the embedded microcontroller.

The supplied 3.3 V from the myRIO should be fine.

Thanks,
JColvin

From the manufacturer the slave select is open which is what the SPI interface tutorial from NI shows. In essence there should be no jumper attached to JP1. There is no slave device, its a singular PMOD CLS. Attached is the connection from the myRIO to the PMOD. The only lines connected are J1 pins 2, 4, 5, and 6.  

20231113_233810.jpg

Link to comment
Share on other sites

  • 0

Hi @Airmanblu,

The SPI protocol, even though there is only a singular device on this bus, dictates that the chip select line is pulled low during every transaction because there is not an addressing scheme like I2C (https://www.ni.com/en/shop/labview/understanding-the-spi-bus-with-ni-labview.html). Because there is no pulldown resistor on the SS line of the Pmod CLS (you can verify this for yourself on the schematic, https://digilent.com/reference/_media/reference/pmod/pmodcls/pmodcls_sch.pdf) you'll need the jumper on JP1 set to short the middle pin to the SS side, as well as needing to connect a wire from the NI myRIO to pin 1 header J1.

Let me know if you have any questions.

Thanks,
JColvin

Link to comment
Share on other sites

  • 0

Apologies for the lateness, but for some reason I'm not getting updates. Either way, since the original post I spoke with Digilent tech services and was sent 3 more devices after going through the troubleshooting process twice and sending a video of the operations. However, it ended with the same result. I've previously jumpered JP1 with no change, I do not believe on the new units I tried this. I will try to get to it this weekend. I am not optimistic that the JP1 jumper which is meant for multiple devices being "tethered" together and is normally left without a jumper attached on most other posts I've seen during the span of attempting to get the myRIO to complete its' communication with the PMOD CLS. 

Edited by Airmanblu
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...