Microchip
直播中

王莉

7年用户 302经验值
私信 关注
[问答]

MCP4351怎么用作电位计

我使用MCP4351锅,并且需要以这样的方式配置,它应该给予一定的增益值。我在数据选择和序列混乱,通过SPI传输。请给出选择TCON寄存器值和擦拭器选择方法的一些建议,请提一些我理解的例子。

以上来自于百度翻译


      以下为原文

    I am using MCP4351 POT, and need to configure in such a way that it should give certain gain value. I am confused in the data selection and sequence to transmit through SPI. Please give some suggestions to select TCON register values and wiper selection methodology.
Please mention certain example for my understanding.  

回帖(7)

张萍

2018-12-12 15:21:00
XMC系列和我用C编码

以上来自于百度翻译


      以下为原文

    xmc series and I am using C for coding
举报

张萍

2018-12-12 15:29:19
大家好,我想操作MCP4351作为电位器。我需要操作4个刮水器与最大放大,请建议TCON寄存器值同时增益设置值。我只需要通过SPI接口发送数据,请你给我一些例子来处理这个潜力。

以上来自于百度翻译


      以下为原文

    Hi all,
 
I want to operate MCP4351 as a potentiometer. I need to operate 4 wipers with maximum amplification, please suggest TCON registers values at the same time gain setting values. I need to send the data only via SPI interface, can u please give me some examples to handle this potentiometer.
 
 
Thanks 
Best regards
 
Chandrasekhar
举报

陈发赫

2018-12-12 15:45:41
最大放大和增益设置是什么意思?//DATAGET PG51设备命令//AAAACDD(地址:命令:顶部两个数据位)/命令00=写;10=读取POTUR3 0B01110000 / /雨刮器3在地址7 / /数据表页40中定义PoTy2 0B0110000/WiPER 2在地址6α定义POTHE1 0B000 010000 / /雨刮器1在地址1α定义POTYO0B00000000 / /雨刮器0位于地址0。γ定义TCON00B01000//地址0x04μl,定义TCON1 0B101000//地址0x0A//写入0B11111111到TCON0将连接电阻器端和第一个两个POTS / /写入0B11111111到TCON1的擦拭器将连接下一个两个POTS /SPI协议的电阻器端和刮水器。设备需要16位写入。首先是8位的POT地址,然后是7位数据//WiReTyPix16BIT(POT0,数据)/示例/ /设置电位16位(TCON0,0B11111111);WrimePix16BIT(TCON1,0B11111111);/ /写入数据以移动WiSerWrices PI1616位(POTIO0,数据);/数据0 - 127或0 - 255,如果8位设备。

以上来自于百度翻译


      以下为原文

    What do you mean by maximum amplification and gain settings?
 
//datasheet pg51 Device commands
//AAAACCDD (address:Command:top two Data bits)// command 00 = write; 10 = read
#define POT_3 0b01110000   //wiper 3 is at address 7// datasheet page 40
#define POT_2 0b01100000   //wiper 2 is at address 6
#define POT_1 0b00010000   // wiper 1 is at address 1
#define POT_0 0b00000000   //wiper 0 is at address 0.
#define TCON0 0b01000000  //address 0x04 
#define TCON1 0b10100000 //address 0x0A 
 
//write 0b11111111 to TCON0 will connect resistor ends and wiper of first two pots
//write 0b11111111 to TCON1 will connect resistor ends and wiper of next two pots
 
//SPI protocol for this device requires 16 bit write. First the 8-bit pot address and then the 7 bits of data.
//wirteSPI_16bit(POT0, data)
 
//Example
//Set up potentiometer
WriteSPI_16bit(TCON0, 0b11111111);
WriteSPI_16bit(TCON1, 0b11111111);
 
//write data to move wiper
WriteSPI_16bit(POT_0, data); //data 0 - 127 or 0 - 255 if 8-bit device
举报

张萍

2018-12-12 15:55:59
感谢您的答复,我写下面的值电位器通过SPI,但信号电压变化没有得到控制。以下是我的雨刮器和TCON寄存器值,定义TCON0(UTI1616T)0x41EE定义定义TCON1(UTI1616T)0xA1EE,定义WiPro 0(UTI1616T)0x000 FF定义WIPEr1(UTI1616T)0x10FFα定义WiPr2(UTI1616T)0x60FF定义WiPr3(UTI1616T)0x70FFI AM,以相同的模式写入所有寄存器值,但电压电平未得到控制。在写入电位器时,在寄存器值设置或任何顺序失配中是否有任何错误?我已经通过不同的其他数字电位器功能在线,但在我的情况下,它没有发生。请提出一些方法来解决这个问题。

以上来自于百度翻译


      以下为原文

    Thanks for your reply,
I am writing the below values to the potentiometer through SPI but the signal voltage variations are not getting controlled.
The following are my wiper and TCON register values
 
#define TCON0 (uint16_t)0x41EE
#define TCON1 (uint16_t)0xA1EE
#define wiper0 (uint16_t)0x00FF
#define wiper1 (uint16_t)0x10FF
#define wiper2 (uint16_t)0x60FF
#define wiper3 (uint16_t)0x70FF
 
I am writing all the register values in the same pattern but the voltage level is not getting controlled.
Is there any fault in my register value settings or Any ordering mismatch while writing into potentiometer?
I have gone through different other digital potentiometers functionality online but in my case it is not happening.
Please suggest some method to resolve this problem. 
 
Best regards
Chandraekhar
举报

更多回帖

发帖
×
20
完善资料,
赚取积分