Arduino Antics

A blog about Arduino, and my antics to master it!

RSS
  • Home
  • Posts RSS
  • Comments RSS
  • For Sale/Wanted

Planning my first library!

Tuesday, April 20, 2010 by SJ | 4 comments


Well, I've been in the Arduino business for a little while now, and I think it's time to stop using code people have already written and try my hand at writing a library myself.  I know it's a bit of a complicated procedure, but hopefully with some practice (and a little luck), I'll be able to get a good one done.

My plan is to write a library for the MCP42X1 digital potentiometer family (but more specifically, the MCP4251 which is a 2-channel 10K potentiometer).  The MCP4251 in question can be found at digikey here, and the datasheet for the MCP42X1 family can be found here.

I'll need help!  Osgeld has been kindly helping me out on the Arduino forums (see here) in examining the datasheet and writing some code to work for the MCP42X1.  Although a library already exists for SPI digital potentiometers, the library is ill-adapted to work with the chips I'm looking at.

I've already placed an order with Digikey for the MCP4251s (along with some other miscellaneous things I found myself running low on), and expect it to arrive today or tomorrow.  I'll be sure to post something about the order when it gets here, and then follow up with progress on the library.

Wish me luck!

-Stephen


4 comments:

Anonymous said...

Nice choise for a project. I like projects that have both a hardware and software challenge them. This would appear to be a very useful device for interfacing to the analog world. Have you found any Microchip application notes covering this device?

Good luck
Retrolefty

April 20, 2010 at 5:00 PM
SJ said...

I'm not quite sure what you mean. I have the datasheet, and Osgeld has a similar chip that he's been using to try a similar thing. I'm not quite sure what "Application notes" are :P.

April 20, 2010 at 5:01 PM
osgeld said...

Good luck

and to the first poster look in the arduino fourm thread, there is a application note, but looking the parts up on microchip gives you a handful more

-- osgeld

April 20, 2010 at 6:55 PM
digital potentiometer said...

Adjusting the temperature, lighting and other settings in your home is now not only possible, but affordable, and can be done all from a computer.

June 21, 2011 at 9:14 PM

Post a Comment

Subscribe to: Post Comments (Atom)

Donate

Money is tight for hobbies like this. If you want to, please donate a little to help me out :). Every little bit helps!

Followers

Blog Archive

  • ►  2011 (1)
    • ►  May (1)
  • ▼  2010 (7)
    • ►  June (1)
    • ►  May (1)
    • ▼  April (5)
      • More progress
      • Progress
      • A box on the doorstep!
      • Planning my first library!
      • Welcome to my Blog!
Copyright © 2010 Arduino Antics Wordpress Theme Blogger Template Credits For