MCP41xxx/42xxx digital pot meter object
Mightor
Posts: 338
Hey peeps,
I needed an object to control an MCP41010 digital pot meter, controllable via SPI for my robot project. It's done now and tested with a 41010, however, it should work pretty much for that whole range. The extra PINs for the 42xxx have not been implemented, but you're more than welcome to have a go at it!
I included a little demo program for it so you can see what it does. I also attached a picture of a crappy drawing on a post-it of what my test circuit roughly looks like. Sorry it's a bit big but I don't have any photo editing software [noparse]:)[/noparse]
R1 = 1K
D1, D2 == red LEDs
Oh and it looks like I forgot the pull up resistor for CS on the post-it. This is very important but left as an exercise for the reader [noparse]:)[/noparse]
Enjoy,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| To know recursion, you must first know recursion.
I needed an object to control an MCP41010 digital pot meter, controllable via SPI for my robot project. It's done now and tested with a 41010, however, it should work pretty much for that whole range. The extra PINs for the 42xxx have not been implemented, but you're more than welcome to have a go at it!
I included a little demo program for it so you can see what it does. I also attached a picture of a crappy drawing on a post-it of what my test circuit roughly looks like. Sorry it's a bit big but I don't have any photo editing software [noparse]:)[/noparse]
R1 = 1K
D1, D2 == red LEDs
Oh and it looks like I forgot the pull up resistor for CS on the post-it. This is very important but left as an exercise for the reader [noparse]:)[/noparse]
Enjoy,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| To know recursion, you must first know recursion.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| To know recursion, you must first know recursion.
In WinXP, to resize images quickly and easily try the free Microsoft Power Toy "Image Resizer". After installation you right click a picture file (or batch of picture files) and then select Resize Pictures, the resizer tool pops up and gives you some options for size etc.
You can find the image resizer application here: www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx
deSilva's Irfanview suggestion is a nice free application too. But I heard it had some user access rights issues with Windows Vista - but that was some time ago, probably sorted out by now. Don't know, I bounced-off Vista - don't run it any more.
Regards, David