Pages: 1 2 3 [4]   Go Down
Author Topic: Need some advice on a Digital Potentiometer  (Read 5839 times)
0 Members and 1 Guest are viewing this topic.
B0100111001000011, USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1503
I'm confused.  Wait, maybe not..
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Haha I took a look at page 47, and it is complete gibberish to me.  I don't get why there are numbers and letters all in that chart!

Maybe if I randomly put high voltage into it the magic smoke will solve my problems ;D.
Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ok I think I understand it ok, but I have no idea if this simplification works

replace the commandByte with

00000000 to write to pot 2
00010000 to write to pot 1

the first 4 bits are a register address 0 pot 0 and 1 pot 1,  2 & 3 are reserved, 4 is the terminal connector register, where you can connect and disconnect individual pins of each pot and control its behaviour on a shutdown signal (page 36), 5 is the status register to read if something is in a shutdown state the rest are reserved

bits 5 & 6 are the command bits (page 47)

Quote
11 Read Data 16-Bits
00 Write Data 16-Bits
01 Increment 8-Bits
10 Decrement 8-Bits

and 7 & 8 are data bits, and this is where I get confused

if you want to send a 8 bit command you can use the inc / dec functions above to (I presume) jump a few steps at a time

if you send it a 2 byte command, you now have 10 data bits, BUT the msb (bit 7 of byte 1) is not used for input, the next bit (bit 8 of byte 1) I think sets it into "normal" or "full scale" modes followed by the real data (byte 2)


 :-?

edit :: also look at the table on page 48, only look at function, command, and SDI pin
« Last Edit: April 21, 2010, 09:32:31 pm by Osgeld » Logged


B0100111001000011, USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1503
I'm confused.  Wait, maybe not..
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Wow I'm even more confused now haha.  I'll get some sleep and start experimenting tomorrow once I'm more rested smiley.
Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

fair enough

but
Logged


B0100111001000011, USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1503
I'm confused.  Wait, maybe not..
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, I don't know how you did it, but those commands magically work!  Thanks a ton!

Any chance of a command to write to both pots?  I've noticed that when you write to one, the other seems to reset (to 127).

[edit]Actually, it turns out I can send them both commands to write a value, but I have to do it seperately, and Pot1 doesn't seem to be quite right (seems to skip about half of the commands).[/edit]

[edit]Nevermind, all is good now!  Almost done with the library![/edit]
« Last Edit: April 22, 2010, 03:30:04 pm by Tchnclfl » Logged

Pages: 1 2 3 [4]   Go Up
Jump to: