07-31-2019 06:50 PM - edited 07-31-2019 06:56 PM
Hi all,
I've done a bit with serial comms. before with NI VISA, but have a more basic question about what codes to send to my digital potentiometer. My pot is a MCP4161 with 256 settings for the wiper. The documentation shows the picture below.
It looks like code "100h" accesses the last resistor (N=257) and code "00h" accesses the first resistor (N=0).
Can anyone point me in the right direction to figure out everything in between? haha .... help a noob out here .....
Or, perhaps there is some LabVIEW SPI module that is designed to work with such a device? In the past I used NI VISA to talk to a RS-485 device.
Thanks for your help!
PS. link to data sheet, see Section 5 for the wiper stuff https://www.mouser.com/datasheet/2/268/22059a-51937.pdf
08-01-2019 05:03 AM
Hi
You best can use a USB to SPI converter, avalable from e.g. ftdi. Make sure you get the correct voltage
but as seen in the chip it can range from 2.7 to 5.5 Volt so no problem (3.3 is nice).
And then install the ftdi drivers and make sure you only supply 0..FF as values meaning 0..255 decimal.
08-01-2019 04:18 PM - edited 08-01-2019 05:01 PM
Great thanks! This points me in the right direction.
Always happy when I don't have to get fancy hardware, and the FTDI SPI-USB converter looks convenient.
Only thing is, I'm not sure exactly which commands I'm sending. I found a basic driver on the FTDI website to do read/write commands, but the datasheet for my digital potentiometer is a little difficult to understand! Here's their write page:
08-01-2019 04:21 PM
I just realized this is shifting back to a software question, now that I know I can use a SPI-USB converter 🙂
Hopefully that's OK... haha