Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] INTERFACING MCP4162 with PIC16F886

Status
Not open for further replies.

vijaya_narayana

Full Member level 3
Joined
Jun 12, 2007
Messages
178
Helped
11
Reputation
22
Reaction score
1
Trophy points
1,298
Location
India
Activity points
2,182
Dear All

I am facing problems in Interfacing the PIC 16F886 with the Digital POT MCP4162

Here is the code for the same if i am sending 0x00 and 0x00 my pot output should be 0 ohms but it is showing 96 Ohms and if i send any other value the pot is not changing pls help me with this

Code:
spiWrite(0x00);
 delay(1);
spiWrite(0x00);
 delay(1);
 

The SPI logical specs may vary from a device to another, so giving a piece of code is not enough to assess anything.
 

The SPI Logical Specs are CKE=1,CKE=0 The Clock Frequecy is Fclock/16

As per the data sheet of MCP4162 it says we need to send 0x00 as command byte and then the value
 

Hi,

Wiper resustance is 75 Ohms. Don't expect to get 0 Ohms.

Why you get 96 Ohms, I don't know.

Klaus
 

Hi,

You give not much useful informations.

What does this mean: "CKE=1,CKE=0"
What does this mean: "Clock Frequecy is Fclock/16"
What does this mean: "delay(1);" one second, one millisecond, one microsecond?

* Show the complete code.
* show your schematic, with supply and supply voltages.
* show a scope picture of CS, SCK, MOSI

Klaus
 

here is the image of the SCOPE i have sent 4C inorder to read the tcon register

My CS is tried to GND permanently



- - - Updated - - -

the delay is 1mS
 

Hi,

My CS is tried to GND permanently
Read datasheet: Especially about Error conditions and CS function. Section 7.3.

Klaus
 

hi Mate thanks i missed that in the data sheet now it is working properly

i need one more help i am trying to take a variable resistance of 10 ohms to 200 ohms using this MCP is it possible to add a parallel resistance between the two terminals
 

Hi,

Why don´t you do a little math on your own?

Simple idea:
* when your wiper is in "high position" you want 200 Ohms
* when your wiper is in "low position" you want 10 Ohms

First calculate what parallel resistor you need to get 10 Ohms when wiper is in low position.
Now use this resistor and calculate the resulting resistance when wiper is in high position.

Klaus
 

i already tried to connect 10 ohms across when the wiper is 0x00(90 Ohms) the rest can be done in coding when the wiper is 0xFF it is still showing 10 ohms only that is the problem i am facing any idea i did the math already
 

Hi,

The change in value is not what you expect?
--> This shows, that it is impossible. Trust your mathematics.

Klaus
 

Perhaps if you explained the intended application/system in detail, there maybe a alternative path to a viable solution.

You also should be aware that the typical wiper resistance is 75Ω, however it can be as high as 300Ω for the MCP4162.

Reference the table below:

4162.JPG
 

hi i went through the document and i am trying it with a parallel resistance is there any other IC which can give me a 10 Ohms minimum out put
 

i think it is impossible to get a 10 Ohms output even with a parallel resistor i may switch towards to a motor + pot solution thanks for your support and help regarding my project
 

Hi,

If you show/describe why (or what for) you need 10...200 Ohms, then we may find a suitable solution for you...without motor.

Klaus
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top