Interfacing a digital potentiometer to a PIC18F452

elec1

New Member
I want to interface a digital potentiometer to a PIC18F452 for a project. The digital potentiometer can be controlled by serial protocols such as I²C or SPI. What is the better and easier protocol to use ?
 
Hi,

If the only serial device in your circuit is the digital pot then SPI might be way to go. If you plan on having multiple serial devices then perhaps I2C would be the better choice because you only require two connections (data and clock regardless of how many devices - in theory up to 127). SPI requires three connections for a single device; clock, data in, data out. For multiple devices, each additional device will require a CS (chip select) connection.

https://electronics.stackexchange.com/questions/29037/tradeoffs-when-considering-spi-or-i2c
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…