EmbeddedRelated.com
Forums
Memfault Beyond the Launch

Interfacing a PIC with Digital Potentiometer?

Started by smitty505000 October 9, 2005
Hey all,

I am working on another R/C project and need to be able to adjust a
5K 3 wire pot via Pic. I have been looking at digital pots and see
that they have 2 types I2C and SPI. What does this mean? I just need
to be able to adjust the pot via a Pic from 0-5K with no fancy extras.
Can someone help me?

Thanks!
Neil Smith



--- In piclist@picl..., "smitty505000" <smitty505000@y...>
wrote:
>
> Hey all,
>
> I am working on another R/C project and need to be able to adjust
a
> 5K 3 wire pot via Pic. I have been looking at digital pots and see
> that they have 2 types I2C and SPI. What does this mean? I just need
> to be able to adjust the pot via a Pic from 0-5K with no fancy
extras.
> Can someone help me?
>
> Thanks!
> Neil Smith
>

If you want to talk to the potentiometer, you have to speak the
language. You didn't say which PIC and it matters because some have
hardware implementations of I2C and/or SPI. However, if you aren't
adjusting it very often, it is probably easier to bit-bang SPI than
I2C.

Unless you have a compelling reason to go with I2C, you will find SPI
easier to use. Even without the hardware help, you only have to
wiggle two outputs (data and clock) to control the device. Look at
the timing diagram for assistance.

Richard


I can use just about any pic I need to use. I will also be
programing in Pic Basic Pro. I am going to be using a couple of R/C
heading hold gyros that will be read by the Serin command then take
that data and apply it linearly to the 5K digital pot. I can already
read the data from the gyro and get a number from 100-215. I just
need to figure out what digital pot to get and how to send it the
data. The pot will need to be updated in real time or as close to
real time as possible. If you are wondering, I am making a head
tracking device for live airbourn video in an R/C plane.

Thanks!
Neil Smith

--- In piclist@picl..., "rtstofer" <rstofer@p...> wrote:
>
> --- In piclist@picl..., "smitty505000" <smitty505000@y...>
> wrote:
> >
> > Hey all,
> >
> > I am working on another R/C project and need to be able to
adjust
> a
> > 5K 3 wire pot via Pic. I have been looking at digital pots and
see
> > that they have 2 types I2C and SPI. What does this mean? I just
need
> > to be able to adjust the pot via a Pic from 0-5K with no fancy
> extras.
> > Can someone help me?
> >
> > Thanks!
> > Neil Smith
> >
>
> If you want to talk to the potentiometer, you have to speak the
> language. You didn't say which PIC and it matters because some
have
> hardware implementations of I2C and/or SPI. However, if you
aren't
> adjusting it very often, it is probably easier to bit-bang SPI
than
> I2C.
>
> Unless you have a compelling reason to go with I2C, you will find
SPI
> easier to use. Even without the hardware help, you only have to
> wiggle two outputs (data and clock) to control the device. Look
at
> the timing diagram for assistance.
>
> Richard
>




Example code in Proton Plus
very similar to PicBasicPro.

Digipots are limited milliamps. May be used with opamps however for more
amps.

' PROTON PLUS DIGITAL POT 10-9-05
Symbol sCS1 = PORTB.1
Symbol sSCK1 = PORTB.2
Symbol sDATA1 = PORTB.3

Symbol sCS2 = PORTB.4
Symbol sSCK2 = PORTB.5
Symbol sDATA2 = PORTB.6

'********************************

' digipot MC41xxx MICROCHIP 5v max 1ma max
' SerOut sSEROUT_PIN,sBAUD,[Rep $00\8,"vRAW1 = ",Dec vRAW1,13]
vPOTSET1.LowByte = vRAW1
' SerOut sSEROUT_PIN,sBAUD,[Rep $00\8,"vPOTSET1 = ",BIN16 vPOTSET1,13]
vPOTSET1.HighByte = %00010001
' SerOut sSEROUT_PIN,sBAUD,[Rep $00\8,"vPOTSET1 = ",BIN16 vPOTSET1,13]

Low sCS1
SHOut sDATA1,sSCK1,msbfirst_l,[vPOTSET1\16] ' Shift out the 16-bit word
High sCS1

'********************************
' digipot AD7376 ANALOG DEVICES 30v max 5ma to 20ma max

Low sCS2
SHOut sDATA2,sSCK2,msbfirst_l,[vPOTSET2\8] ' Shift out the 8-bit byte
High sCS2

'********************************

Norm
----- Original Message -----
From: "smitty505000" <smitty505000@smit...>
To: <piclist@picl...>
Sent: Sunday, October 09, 2005 7:08 PM
Subject: [piclist] Re: Interfacing a PIC with Digital Potentiometer? > I can use just about any pic I need to use. I will also be
> programing in Pic Basic Pro. I am going to be using a couple of R/C
> heading hold gyros that will be read by the Serin command then take
> that data and apply it linearly to the 5K digital pot. I can already
> read the data from the gyro and get a number from 100-215. I just
> need to figure out what digital pot to get and how to send it the
> data. The pot will need to be updated in real time or as close to
> real time as possible. If you are wondering, I am making a head
> tracking device for live airbourn video in an R/C plane.
>
> Thanks!
> Neil Smith
>
> --- In piclist@picl..., "rtstofer" <rstofer@p...> wrote:
> >
> > --- In piclist@picl..., "smitty505000" <smitty505000@y...>
> > wrote:
> > >
> > > Hey all,
> > >
> > > I am working on another R/C project and need to be able to
> adjust
> > a
> > > 5K 3 wire pot via Pic. I have been looking at digital pots and
> see
> > > that they have 2 types I2C and SPI. What does this mean? I just
> need
> > > to be able to adjust the pot via a Pic from 0-5K with no fancy
> > extras.
> > > Can someone help me?
> > >
> > > Thanks!
> > > Neil Smith
> > >
> >
> > If you want to talk to the potentiometer, you have to speak the
> > language. You didn't say which PIC and it matters because some
> have
> > hardware implementations of I2C and/or SPI. However, if you
> aren't
> > adjusting it very often, it is probably easier to bit-bang SPI
> than
> > I2C.
> >
> > Unless you have a compelling reason to go with I2C, you will find
> SPI
> > easier to use. Even without the hardware help, you only have to
> > wiggle two outputs (data and clock) to control the device. Look
> at
> > the timing diagram for assistance.
> >
> > Richard



Thanks Norm! That gives me some direction. I am having a hard time
finding a digi pot with 5K and in a thru hole dip package. Are the
higher values adjustable? In other words can I get a 50K Digi pot
with 256 steps and program it for 5K with 256 steps? Or am I down to
like 25.6 steps at 5K?

Thanks in advance guys!!

Neil Smith

--- In piclist@picl..., "Norm Carlberg" <normnet@h...> wrote:
>
> Example code in Proton Plus
> very similar to PicBasicPro.
>
> Digipots are limited milliamps. May be used with opamps however
for more
> amps.
>
> ' PROTON PLUS DIGITAL POT 10-9-05
> Symbol sCS1 = PORTB.1
> Symbol sSCK1 = PORTB.2
> Symbol sDATA1 = PORTB.3
>
> Symbol sCS2 = PORTB.4
> Symbol sSCK2 = PORTB.5
> Symbol sDATA2 = PORTB.6
>
> '********************************
>
> ' digipot MC41xxx MICROCHIP 5v max 1ma max
> ' SerOut sSEROUT_PIN,sBAUD,[Rep $00\8,"vRAW1 = ",Dec vRAW1,13]
> vPOTSET1.LowByte = vRAW1
> ' SerOut sSEROUT_PIN,sBAUD,[Rep $00\8,"vPOTSET1 = ",BIN16
vPOTSET1,13]
> vPOTSET1.HighByte = %00010001
> ' SerOut sSEROUT_PIN,sBAUD,[Rep $00\8,"vPOTSET1 = ",BIN16
vPOTSET1,13]
>
> Low sCS1
> SHOut sDATA1,sSCK1,msbfirst_l,[vPOTSET1\16] ' Shift out the 16-bit
word
> High sCS1
>
> '********************************
> ' digipot AD7376 ANALOG DEVICES 30v max 5ma to 20ma max
>
> Low sCS2
> SHOut sDATA2,sSCK2,msbfirst_l,[vPOTSET2\8] ' Shift out the 8-bit
byte
> High sCS2
>
> '********************************
>
> Norm >
> ----- Original Message -----
> From: "smitty505000" <smitty505000@y...>
> To: <piclist@picl...>
> Sent: Sunday, October 09, 2005 7:08 PM
> Subject: [piclist] Re: Interfacing a PIC with Digital
Potentiometer?
>
>
> > I can use just about any pic I need to use. I will also be
> > programing in Pic Basic Pro. I am going to be using a couple of
R/C
> > heading hold gyros that will be read by the Serin command then
take
> > that data and apply it linearly to the 5K digital pot. I can
already
> > read the data from the gyro and get a number from 100-215. I just
> > need to figure out what digital pot to get and how to send it the
> > data. The pot will need to be updated in real time or as close to
> > real time as possible. If you are wondering, I am making a head
> > tracking device for live airbourn video in an R/C plane.
> >
> > Thanks!
> > Neil Smith
> >
> > --- In piclist@picl..., "rtstofer" <rstofer@p...>
wrote:
> > >
> > > --- In piclist@picl..., "smitty505000"
<smitty505000@y...>
> > > wrote:
> > > >
> > > > Hey all,
> > > >
> > > > I am working on another R/C project and need to be able to
> > adjust
> > > a
> > > > 5K 3 wire pot via Pic. I have been looking at digital pots
and
> > see
> > > > that they have 2 types I2C and SPI. What does this mean? I
just
> > need
> > > > to be able to adjust the pot via a Pic from 0-5K with no
fancy
> > > extras.
> > > > Can someone help me?
> > > >
> > > > Thanks!
> > > > Neil Smith
> > > >
> > >
> > > If you want to talk to the potentiometer, you have to speak the
> > > language. You didn't say which PIC and it matters because some
> > have
> > > hardware implementations of I2C and/or SPI. However, if you
> > aren't
> > > adjusting it very often, it is probably easier to bit-bang SPI
> > than
> > > I2C.
> > >
> > > Unless you have a compelling reason to go with I2C, you will
find
> > SPI
> > > easier to use. Even without the hardware help, you only have
to
> > > wiggle two outputs (data and clock) to control the device.
Look
> > at
> > > the timing diagram for assistance.
> > >
> > > Richard
>




I haven't seen any programmable for total resistance with same number of
steps.
Take a look at Digikey MCP42010-I/P-ND Dual 10k dip 256 steps.
In parallel = 5k.

Norm ----- Original Message -----
From: "smitty505000" <smitty505000@smit...>
To: <piclist@picl...>
Sent: Sunday, October 09, 2005 8:59 PM
Subject: [piclist] Re: Interfacing a PIC with Digital Potentiometer? > Thanks Norm! That gives me some direction. I am having a hard time
> finding a digi pot with 5K and in a thru hole dip package. Are the
> higher values adjustable? In other words can I get a 50K Digi pot
> with 256 steps and program it for 5K with 256 steps? Or am I down to
> like 25.6 steps at 5K?
>
> Thanks in advance guys!!
>
> Neil Smith
>
> --- In piclist@picl..., "Norm Carlberg" <normnet@h...> wrote:
> >
> > Example code in Proton Plus
> > very similar to PicBasicPro.
> >
> > Digipots are limited milliamps. May be used with opamps however
> for more
> > amps.
> >
> > ' PROTON PLUS DIGITAL POT 10-9-05
> > Symbol sCS1 = PORTB.1
> > Symbol sSCK1 = PORTB.2
> > Symbol sDATA1 = PORTB.3
> >
> > Symbol sCS2 = PORTB.4
> > Symbol sSCK2 = PORTB.5
> > Symbol sDATA2 = PORTB.6
> >
> > '********************************
> >
> > ' digipot MC41xxx MICROCHIP 5v max 1ma max
> > ' SerOut sSEROUT_PIN,sBAUD,[Rep $00\8,"vRAW1 = ",Dec vRAW1,13]
> > vPOTSET1.LowByte = vRAW1
> > ' SerOut sSEROUT_PIN,sBAUD,[Rep $00\8,"vPOTSET1 = ",BIN16
> vPOTSET1,13]
> > vPOTSET1.HighByte = %00010001
> > ' SerOut sSEROUT_PIN,sBAUD,[Rep $00\8,"vPOTSET1 = ",BIN16
> vPOTSET1,13]
> >
> > Low sCS1
> > SHOut sDATA1,sSCK1,msbfirst_l,[vPOTSET1\16] ' Shift out the 16-bit
> word
> > High sCS1
> >
> > '********************************
> > ' digipot AD7376 ANALOG DEVICES 30v max 5ma to 20ma max
> >
> > Low sCS2
> > SHOut sDATA2,sSCK2,msbfirst_l,[vPOTSET2\8] ' Shift out the 8-bit
> byte
> > High sCS2
> >
> > '********************************
> >
> > Norm
> >
> >
> >
> > ----- Original Message -----
> > From: "smitty505000" <smitty505000@y...>
> > To: <piclist@picl...>
> > Sent: Sunday, October 09, 2005 7:08 PM
> > Subject: [piclist] Re: Interfacing a PIC with Digital
> Potentiometer?
> >
> >
> > > I can use just about any pic I need to use. I will also be
> > > programing in Pic Basic Pro. I am going to be using a couple of
> R/C
> > > heading hold gyros that will be read by the Serin command then
> take
> > > that data and apply it linearly to the 5K digital pot. I can
> already
> > > read the data from the gyro and get a number from 100-215. I just
> > > need to figure out what digital pot to get and how to send it the
> > > data. The pot will need to be updated in real time or as close to
> > > real time as possible. If you are wondering, I am making a head
> > > tracking device for live airbourn video in an R/C plane.
> > >
> > > Thanks!
> > > Neil Smith
> > >
> > > --- In piclist@picl..., "rtstofer" <rstofer@p...>
> wrote:
> > > >
> > > > --- In piclist@picl..., "smitty505000"
> <smitty505000@y...>
> > > > wrote:
> > > > >
> > > > > Hey all,
> > > > >
> > > > > I am working on another R/C project and need to be able to
> > > adjust
> > > > a
> > > > > 5K 3 wire pot via Pic. I have been looking at digital pots
> and
> > > see
> > > > > that they have 2 types I2C and SPI. What does this mean? I
> just
> > > need
> > > > > to be able to adjust the pot via a Pic from 0-5K with no
> fancy
> > > > extras.
> > > > > Can someone help me?
> > > > >
> > > > > Thanks!
> > > > > Neil Smith
> > > > >
> > > >
> > > > If you want to talk to the potentiometer, you have to speak the
> > > > language. You didn't say which PIC and it matters because some
> > > have
> > > > hardware implementations of I2C and/or SPI. However, if you
> > > aren't
> > > > adjusting it very often, it is probably easier to bit-bang SPI
> > > than
> > > > I2C.
> > > >
> > > > Unless you have a compelling reason to go with I2C, you will
> find
> > > SPI
> > > > easier to use. Even without the hardware help, you only have
> to
> > > > wiggle two outputs (data and clock) to control the device.
> Look
> > > at
> > > > the timing diagram for assistance.
> > > >
> > > > Richard



Norm,
Funny you should suggest the MCP42010, I just ordered a couple and
from Jameco nevertheless! Never even thought of putting them in
parallel though, Thanks! Now I just have to find out how to hook
them up to the pic and if I need any other components. I will be
removing qty 2, 5K 3 wire pots from my RC transmitter and replace
them with this circuit. On my Head Mounted Display will be two
heading lock gyro's that will read up/down and left/right. They will
send data to the pic that will convert those and then send out to
the digi pots. These two pots output to my radio and will then
control camera pan and tilt on my plane. What do you think? Crazy
huh?

Neil Smith --- In piclist@picl..., "Norm Carlberg" <normnet@h...> wrote:
>
> I haven't seen any programmable for total resistance with same
number of
> steps.
> Take a look at Digikey MCP42010-I/P-ND Dual 10k dip 256 steps.
> In parallel = 5k.
>
> Norm > ----- Original Message -----
> From: "smitty505000" <smitty505000@y...>
> To: <piclist@picl...>
> Sent: Sunday, October 09, 2005 8:59 PM
> Subject: [piclist] Re: Interfacing a PIC with Digital
Potentiometer?
>
>
> > Thanks Norm! That gives me some direction. I am having a hard
time
> > finding a digi pot with 5K and in a thru hole dip package. Are
the
> > higher values adjustable? In other words can I get a 50K Digi pot
> > with 256 steps and program it for 5K with 256 steps? Or am I
down to
> > like 25.6 steps at 5K?
> >
> > Thanks in advance guys!!
> >
> > Neil Smith
> >
> > --- In piclist@picl..., "Norm Carlberg" <normnet@h...>
wrote:
> > >
> > > Example code in Proton Plus
> > > very similar to PicBasicPro.
> > >
> > > Digipots are limited milliamps. May be used with opamps
however
> > for more
> > > amps.
> > >
> > > ' PROTON PLUS DIGITAL POT 10-9-05
> > > Symbol sCS1 = PORTB.1
> > > Symbol sSCK1 = PORTB.2
> > > Symbol sDATA1 = PORTB.3
> > >
> > > Symbol sCS2 = PORTB.4
> > > Symbol sSCK2 = PORTB.5
> > > Symbol sDATA2 = PORTB.6
> > >
> > > '********************************
> > >
> > > ' digipot MC41xxx MICROCHIP 5v max 1ma max
> > > ' SerOut sSEROUT_PIN,sBAUD,[Rep $00\8,"vRAW1 = ",Dec vRAW1,13]
> > > vPOTSET1.LowByte = vRAW1
> > > ' SerOut sSEROUT_PIN,sBAUD,[Rep $00\8,"vPOTSET1 = ",BIN16
> > vPOTSET1,13]
> > > vPOTSET1.HighByte = %00010001
> > > ' SerOut sSEROUT_PIN,sBAUD,[Rep $00\8,"vPOTSET1 = ",BIN16
> > vPOTSET1,13]
> > >
> > > Low sCS1
> > > SHOut sDATA1,sSCK1,msbfirst_l,[vPOTSET1\16] ' Shift out the 16-
bit
> > word
> > > High sCS1
> > >
> > > '********************************
> > > ' digipot AD7376 ANALOG DEVICES 30v max 5ma to 20ma max
> > >
> > > Low sCS2
> > > SHOut sDATA2,sSCK2,msbfirst_l,[vPOTSET2\8] ' Shift out the 8-
bit
> > byte
> > > High sCS2
> > >
> > > '********************************
> > >
> > > Norm
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: "smitty505000" <smitty505000@y...>
> > > To: <piclist@picl...>
> > > Sent: Sunday, October 09, 2005 7:08 PM
> > > Subject: [piclist] Re: Interfacing a PIC with Digital
> > Potentiometer?
> > >
> > >
> > > > I can use just about any pic I need to use. I will also be
> > > > programing in Pic Basic Pro. I am going to be using a couple
of
> > R/C
> > > > heading hold gyros that will be read by the Serin command
then
> > take
> > > > that data and apply it linearly to the 5K digital pot. I can
> > already
> > > > read the data from the gyro and get a number from 100-215. I
just
> > > > need to figure out what digital pot to get and how to send
it the
> > > > data. The pot will need to be updated in real time or as
close to
> > > > real time as possible. If you are wondering, I am making a
head
> > > > tracking device for live airbourn video in an R/C plane.
> > > >
> > > > Thanks!
> > > > Neil Smith
> > > >
> > > > --- In piclist@picl..., "rtstofer" <rstofer@p...>
> > wrote:
> > > > >
> > > > > --- In piclist@picl..., "smitty505000"
> > <smitty505000@y...>
> > > > > wrote:
> > > > > >
> > > > > > Hey all,
> > > > > >
> > > > > > I am working on another R/C project and need to be
able to
> > > > adjust
> > > > > a
> > > > > > 5K 3 wire pot via Pic. I have been looking at digital
pots
> > and
> > > > see
> > > > > > that they have 2 types I2C and SPI. What does this mean?
I
> > just
> > > > need
> > > > > > to be able to adjust the pot via a Pic from 0-5K with no
> > fancy
> > > > > extras.
> > > > > > Can someone help me?
> > > > > >
> > > > > > Thanks!
> > > > > > Neil Smith
> > > > > >
> > > > >
> > > > > If you want to talk to the potentiometer, you have to
speak the
> > > > > language. You didn't say which PIC and it matters because
some
> > > > have
> > > > > hardware implementations of I2C and/or SPI. However, if
you
> > > > aren't
> > > > > adjusting it very often, it is probably easier to bit-bang
SPI
> > > > than
> > > > > I2C.
> > > > >
> > > > > Unless you have a compelling reason to go with I2C, you
will
> > find
> > > > SPI
> > > > > easier to use. Even without the hardware help, you only
have
> > to
> > > > > wiggle two outputs (data and clock) to control the device.
> > Look
> > > > at
> > > > > the timing diagram for assistance.
> > > > >
> > > > > Richard
>




hi,
sory i didnt mention it earlyer but Dallas/Maxim make digital pots and you can order free samples online
 
http://www.maxim-ic.com/products.cfm
 
i think microchip do a digital pot also and you can get free samples from them too
 
Pete
----- Original Message -----
From: smitty505000
To: p...@yahoogroups.com
Sent: Monday, October 10, 2005 4:42 AM
Subject: [piclist] Re: Interfacing a PIC with Digital Potentiometer?

Norm,
Funny you should suggest the MCP42010, I just ordered a couple and
from Jameco nevertheless!  Never even thought of putting them in
parallel though, Thanks! Now I just have to find out how to hook
them up to the pic and if I need any other components. I will be
removing qty 2, 5K 3 wire pots from my RC transmitter and replace
them with this circuit. On my Head Mounted Display will be two
heading lock gyro's that will read up/down and left/right. They will
send data to the pic that will convert those and then send out to
the digi pots. These two pots output to my radio and will then
control camera pan and tilt on my plane. What do you think? Crazy
huh?

Neil Smith--- In p...@yahoogroups.com, "Norm Carlberg" <normnet@h...> wrote:
>
> I haven't seen any programmable for total resistance with same
number of
> steps.
> Take a look at Digikey MCP42010-I/P-ND  Dual 10k dip 256 steps.
> In parallel = 5k.
>
> Norm> ----- Original Message -----
> From: "smitty505000" <smitty505000@y...>
> To: <p...@yahoogroups.com>
> Sent: Sunday, October 09, 2005 8:59 PM
> Subject: [piclist] Re: Interfacing a PIC with Digital
Potentiometer?> > Thanks Norm! That gives me some direction. I am having a hard
time
> > finding a digi pot with 5K and in a thru hole dip package. Are
the
> > higher values adjustable? In other words can I get a 50K Digi pot
> > with 256 steps and program it for 5K with 256 steps? Or am I
down to
> > like 25.6 steps at 5K?
> >
> > Thanks in advance guys!!
> >
> > Neil Smith
> >
> > --- In p...@yahoogroups.com, "Norm Carlberg" <normnet@h...>
wrote:
> > >
> > > Example code in Proton Plus
> > > very similar to PicBasicPro.
> > >
> > > Digipots are limited milliamps.  May be used with opamps
however
> > for more
> > > amps.
> > >
> > > ' PROTON PLUS DIGITAL POT 10-9-05
> > > Symbol sCS1 = PORTB.1
> > > Symbol sSCK1 = PORTB.2
> > > Symbol sDATA1 = PORTB.3
> > >
> > > Symbol sCS2 = PORTB.4
> > > Symbol sSCK2 = PORTB.5
> > > Symbol sDATA2 = PORTB.6
> > >
> > > '********************************
> > >
> > > ' digipot MC41xxx MICROCHIP 5v max        1ma max
> > > ' SerOut sSEROUT_PIN,sBAUD,[Rep $00\8,"vRAW1 = ",Dec vRAW1,13]
> > > vPOTSET1.LowByte = vRAW1
> > > ' SerOut sSEROUT_PIN,sBAUD,[Rep $00\8,"vPOTSET1 = ",BIN16
> > vPOTSET1,13]
> > > vPOTSET1.HighByte = %00010001
> > > ' SerOut sSEROUT_PIN,sBAUD,[Rep $00\8,"vPOTSET1 = ",BIN16
> > vPOTSET1,13]
> > >
> > > Low sCS1
> > > SHOut sDATA1,sSCK1,msbfirst_l,[vPOTSET1\16] ' Shift out the 16-
bit
> > word
> > > High sCS1
> > >
> > > '********************************
> > > ' digipot AD7376 ANALOG DEVICES 30v max      5ma to 20ma max
> > >
> > > Low sCS2
> > > SHOut sDATA2,sSCK2,msbfirst_l,[vPOTSET2\8] ' Shift out the 8-
bit
> > byte
> > > High sCS2
> > >
> > > '********************************
> > >
> > > Norm
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: "smitty505000" <smitty505000@y...>
> > > To: <p...@yahoogroups.com>
> > > Sent: Sunday, October 09, 2005 7:08 PM
> > > Subject: [piclist] Re: Interfacing a PIC with Digital
> > Potentiometer?
> > >
> > >
> > > > I can use just about any pic I need to use. I will also be
> > > > programing in Pic Basic Pro. I am going to be using a couple
of
> > R/C
> > > > heading hold gyros that will be read by the Serin command
then
> > take
> > > > that data and apply it linearly to the 5K digital pot. I can
> > already
> > > > read the data from the gyro and get a number from 100-215. I
just
> > > > need to figure out what digital pot to get and how to send
it the
> > > > data. The pot will need to be updated in real time or as
close to
> > > > real time as possible. If you are wondering, I am making a
head
> > > > tracking device for live airbourn video in an R/C plane.
> > > >
> > > > Thanks!
> > > > Neil Smith
> > > >
> > > >   --- In p...@yahoogroups.com, "rtstofer" <rstofer@p...>
> > wrote:
> > > > >
> > > > > --- In p...@yahoogroups.com, "smitty505000"
> > <smitty505000@y...>
> > > > > wrote:
> > > > > >
> > > > > > Hey all,
> > > > > >
> > > > > >    I am working on another R/C project and need to be
able to
> > > > adjust
> > > > > a
> > > > > > 5K 3 wire pot via Pic. I have been looking at digital
pots
> > and
> > > > see
> > > > > > that they have 2 types I2C and SPI. What does this mean?
I
> > just
> > > > need
> > > > > > to be able to adjust the pot via a Pic from 0-5K with no
> > fancy
> > > > > extras.
> > > > > > Can someone help me?
> > > > > >
> > > > > > Thanks!
> > > > > > Neil Smith
> > > > > >
> > > > >
> > > > > If you want to talk to the potentiometer, you have to
speak the
> > > > > language.  You didn't say which PIC and it matters because
some
> > > > have
> > > > > hardware implementations of I2C and/or SPI.  However, if
you
> > > > aren't
> > > > > adjusting it very often, it is probably easier to bit-bang
SPI
> > > > than
> > > > > I2C.
> > > > >
> > > > > Unless you have a compelling reason to go with I2C, you
will
> > find
> > > > SPI
> > > > > easier to use.  Even without the hardware help, you only
have
> > to
> > > > > wiggle two outputs (data and clock) to control the device.
> > Look
> > > > at
> > > > > the timing diagram for assistance.
> > > > >
> > > > > Richard


Hi
me again just curious are you using the digi pot to replace the servo pot to maintain a straight line?
how about use a pic like 16F877A that has 2 CCP ports use one to intercept the pwm out from the reciver and use the other to send the adjusted pwm signal to the servo that would be do'able in real time, you dont have to mod any expencive hardware
 
Pete
----- Original Message -----
From: smitty505000
To: p...@yahoogroups.com
Sent: Monday, October 10, 2005 1:08 AM
Subject: [piclist] Re: Interfacing a PIC with Digital Potentiometer?

I can use just about any pic I need to use. I will also be
programing in Pic Basic Pro. I am going to be using a couple of R/C
heading hold gyros that will be read by the Serin command then take
that data and apply it linearly to the 5K digital pot. I can already
read the data from the gyro and get a number from 100-215. I just
need to figure out what digital pot to get and how to send it the
data. The pot will need to be updated in real time or as close to
real time as possible. If you are wondering, I am making a head
tracking device for live airbourn video in an R/C plane.

Thanks!
Neil Smith

  --- In p...@yahoogroups.com, "rtstofer" <rstofer@p...> wrote:
>
> --- In p...@yahoogroups.com, "smitty505000" <smitty505000@y...>
> wrote:
> >
> > Hey all,
> >
> >    I am working on another R/C project and need to be able to
adjust
> a
> > 5K 3 wire pot via Pic. I have been looking at digital pots and
see
> > that they have 2 types I2C and SPI. What does this mean? I just
need
> > to be able to adjust the pot via a Pic from 0-5K with no fancy
> extras.
> > Can someone help me?
> >
> > Thanks!
> > Neil Smith
> >
>
> If you want to talk to the potentiometer, you have to speak the
> language.  You didn't say which PIC and it matters because some
have
> hardware implementations of I2C and/or SPI.  However, if you
aren't
> adjusting it very often, it is probably easier to bit-bang SPI
than
> I2C.
>
> Unless you have a compelling reason to go with I2C, you will find
SPI
> easier to use.  Even without the hardware help, you only have to
> wiggle two outputs (data and clock) to control the device.  Look
at
> the timing diagram for assistance.
>
> Richard


--- In piclist@picl..., "smitty505000" <smitty505000@y...>
wrote:
>
> Norm,
On my Head Mounted Display will be two
> heading lock gyro's that will read up/down and left/right. They will
> send data to the pic that will convert those and then send out to
> the digi pots. These two pots output to my radio and will then
> control camera pan and tilt on my plane. What do you think? Crazy
> huh?
>
> Neil Smith

Sounds great, you might even be able to save using the pots at all if
you can find out the method of signal modulation following the a/d
conversion from the existing pot, and how it's fed to the rf modulator
side of things. You're using a pic already so it might be fun to try
and elliminate the need for digital pots completely !




Memfault Beyond the Launch