Show Posts
Pages: [1]
1  Using Arduino / Programming Questions / Re: ATMega644p with serial digital pot on: October 04, 2011, 12:03:37 pm
Interesting, I thought that my problem would be in the pin defenitions for the 644 since it was capping the ports to the same number of outputs that the 328 have (i.e. no B7, B6 or B5)
I checked my pins_arduino.h file in the cores folder for my sanguino and it doesn't show any of that. I checked the .c  file too. I opened the file directly from the Sanguino-0018r2_1_4 zip file too just to make sure I didn't overwrite the file by mistake.
Maybe I'm missing the right download. I got it directly from the sanguino website and I'm using arduino 22 so it auto updates the folder and file location from what I can tell (no longer needing to put files in a library folder).
I think the 644 defenitions might have been lost somewhere, I never messed with the folders or files though except adding the sanguino stuff. I see the definitions in the io.h file in the avr directory.
Just checking and the pins file has the #include for the avr/io.h which points to the 644 definitions...
I dunno I am getting confused. I'll try arduino-18 from scratch and see if I can get that to work on fresh install.
I am attaching my schematic too.
I have no experience w/ bitbang so I can't give any info on that.
2  Using Arduino / Programming Questions / Re: ATMega644p with serial digital pot on: October 03, 2011, 09:57:27 am
I am using this code:
// inslude the SPI library:
#include <SPI.h>

// set pin 10 as the slave select for the digital pot:
const int slaveSelectPin = 10;  //tried digital 12 also

void setup() {
  // set the slaveSelectPin as an output:
  pinMode (slaveSelectPin, OUTPUT);
  // initialize SPI:

void loop() {
  // go through the six channels of the digital pot:
  for (int channel = 0; channel < 2; channel++) {
    // change the resistance on this channel from min to max:
    for (int level = 0; level < 255; level++) {
      digitalPotWrite(channel, level);
    // wait a second at the top:
    // change the resistance on this channel from max to min:
    for (int level = 0; level < 255; level++) {
      digitalPotWrite(channel, 255 - level);


int digitalPotWrite(int address, int value) {
  // take the SS pin low to select the chip:
  //  send in the address and value via SPI:
  // take the SS pin high to de-select the chip:
The B00010010 is the address info for the MCP4251 that I know works since I can get it to work with the atmega328p (bare bones board).

I am not actually getting any error messages, The LEDs I have hooked up to the digital pot just stay at the mid point.
I started programming with the pic first. I liked being able to just do something like portB.6 HIGH, but that doesn't work with arduino.
and you're right it is pin 5 on the dip I am using, but that means it's digital pin 12. MOSI is digital 13 so far both of those lign up with the pcint numbers on the datasheet, but digital 14 and 15 are actually being used as #22 (PC0) and #23 (PC1) and I that's leading me to believe that the hardware is not setup right in my folders.
here is the hardware:
Here's my board attached
Assume all the usb and power requirements are done on the 644p fritzing didn't have a sanguino option or arduino with a 40 pin chip.
3  Using Arduino / Programming Questions / ATMega644p with serial digital pot on: September 30, 2011, 07:53:39 pm
I am using the mcp4251 digital potentiometer and have it working perfectly with the atmega328p on the bare bones board, I try to port it over to the atmega644p and have no luck getting it to work.
I am using the code from to get it to work on the 328. I did have to change the channel info to get it to work with both wipers since it requires a different bit set. That can't be the issue since the chip is expecting them to be those bits.
I tried using #10, #9, and even the actual SS pin which I assume is 12. Set all the pins to output, hooked up the sck and the mosi pins and nothing seems to work.
any ideas? could my spi.h file be messed up.
it does have it commented in the file "// PB4(MISO), PB3(MOSI), PB5(SCK), PB2(/SS) " which is not right on the 644.
4  Using Arduino / General Electronics / Re: ad5206 on: July 06, 2011, 07:42:30 pm
I hadn't thought about a faulty chip. I do have a few more 328s laying around I could try.
I don't have a scope, but I can at least do a test using my voltmeter to see if the pin on the board is getting a good connection to the arduino and power.
I am using a solderless breadboard for testing with awg28 jumpers.
Yeah, I do some troubleshooting on the tech side of things and I still have to ask my friends who are tech savvy if they have whatever it is plugged in properly, lol. Hey, I still do actually make that mistake every so often myself anyway, but I thought I checked all the obvious stuff.

5  Using Arduino / General Electronics / Re: ad5206 on: July 06, 2011, 11:54:56 am
I would hope I'm not that much of a noob, lol.
I have all the pins connected to something.
6 is connected to +5V
AD5206 has pin 9 & 4 as ground. I think you might have been looking at the AD5204.
I double checked the printing on the chip to make sure I have the right one, and the 5206 should have 9 & 4 to GND (as they are currently hooked up to)

I am using the bare bones board rev 02 with ATMEGA328. the software seems to see it as duemilanove with 328 since it doesn't give me any errors uploading as well as getting it to work with blink and other code I have already verified, so I don't think that's the problem.
6  Using Arduino / General Electronics / Re: ad5206 on: July 06, 2011, 10:39:35 am
I am using Arduino 22 examples->SPI->DigitalPotControl

"This example controls an Analog Devices AD5206 digital potentiometer."
" created 10 Aug 2010
 by Tom Igoe"

just to clarify. So it should be the exact same setup as the sample.
7  Using Arduino / General Electronics / ad5206 on: July 06, 2011, 10:25:41 am
I am using the ad5206 sample from arduino 22.
I have the board wired and powered, connected to all the right pins and can't get it to work.
All my A are at 4.8v, all my B are on ground.
VDD is 4.8v
VSS is ground.

ground to ground
cs, sdi, clk to respective pins noted in the sample.
All wipers have a resistor to LED to ground.

All the wipers seem to have a constant 1.7v

Anyone have any idea why it won't actually work?
Is my VSS an issue? Do I need a seperate power supply for my A and B vs the actual chip power?
please help.
8  Using Arduino / Project Guidance / Re: Need RFID several foot range on: February 03, 2011, 01:18:49 am
From what I can tell a 2 meter read range isn't out of the realm of possibilities at a reasonable price. The standard 125kHz systems might be a bit underpowered for that, but I should be able to do it with a 13mHz system and a fairly decent antenna or a 900mHz system for larger read distance if I get the chip and make the board myself. Atmel has a chip in that range. ATA5590, it's not listed on their site though for some reason.
The locations I need to use  can have a nice 2 foot diamater circular antenna without issue, but how would I add extra power to them without messing up the signal to the reciever?
I'd prefer to use the 125kHz if possible, but I don't want to invest too much if it's not going to work and have to do the better system anyway.
9  Using Arduino / Project Guidance / Re: Need RFID several foot range on: February 02, 2011, 09:41:43 pm
yeah, parralx. silly pink finger missed the key.

I have heard of them, just not in the easy to get form like sparkfun or parralax.
If I had to go active, I could just use custom RF transmitter. cheap and easy through sparkfun. I was hoping for passive, but I guess that might not be a choice. Hopfully I will be able to find something though.
10  Using Arduino / Project Guidance / Need RFID several foot range on: February 02, 2011, 08:36:42 pm
I am trying to setup a system for RFID.
I am looking for an affordable system with a range of 3-6 feet. As an example, if I have a tag in my wallet in my pocket all I will need to do is walk up to a door to be recognized as opposed to having to remove the card, swipe it, etc. I see no reason in using rfid over a magnetic card system if I have to manually remove it and use it within milimeters or centimeters of the reader. Yes, the security is still better, but that's not what I need it for.
I was looking at the Parralaz ones, but they don't have any in that range

Please let me know if you have any suggestions that would work for what I need.
Pages: [1]