Show Posts
Pages: [1] 2
1  Forum 2005-2010 (read only) / Troubleshooting / Re: Wire and OneWire conflicts? on: March 28, 2007, 11:48:47 pm
Glad to hear it is working for you now as well.  I had some problems with both Wire.h and OneWire.h for a while, but I trimmed out my code and removed some Serial.print and Serial.println I had interspersed and it cleared it up and the problem went away.  Makes me think there may be a third component of the problem involving Serial and possibly timing or interrupts.  Since mine has started working fine now, I cant find the problem.  Good luck on your work, and let us know if the 1631 works fine as well.

-- Josh
2  Forum 2005-2010 (read only) / Troubleshooting / Re: Wire and OneWire conflicts? on: March 28, 2007, 07:30:07 pm
Ok, an update.  Just get the address correct and I'm betting it will work.  See the last page of this thread:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1170973485/30

I have not re-tried my DS1631 yet, but I bet I can get it to work now if needed.

-- Josh
3  Forum 2005-2010 (read only) / Troubleshooting / Re: Wire and OneWire conflicts? on: March 26, 2007, 05:50:44 pm
All, any status on these issues?  I have the exact same problems.  I have the DS1337 working great as my clock, a PCF8457 as an IO expander - all on I2C working fine.  I also tried the DS1631 temp sensor and the 24LC256 which both dont work as you describe (always just returns whatever is in the buffer).  I have looked through the TwoWire code and TWI from wiring and I cant find anything wrong yet.  I'll let you all know if I find anything, but was wondering if you all had found anything yet.
4  Forum 2005-2010 (read only) / Troubleshooting / Re: Won't run sketch on: April 03, 2007, 10:51:28 pm
I seem to be having the same problem.  I cant get it to run a sketch.  It seems to load any sketch I send it just fine - 13 pulses when the bootloader starts, tx/rx blink away and then nothing.  I have tried grounding RX, powering from either USB or external, disconnected everything from it except the led on pin13 - nothing helps.

I'm confused as to how burning a bootloader again would help.  Is it possible to corrupt the bootloader somehow?  I'm up for trying it, but purchasing a programmer to try and fix something that could be fried is not very exciting.  Any other suggestions would be greatly appreciated.

Thanks,
Josh
5  Forum 2005-2010 (read only) / Interfacing / Re: HMC6352 on: April 03, 2007, 03:59:29 pm
I'm up for helping to make software I2C into a library.  Can you email or post your code as it stands?

Thanks,
Josh
6  Forum 2005-2010 (read only) / Interfacing / Re: HMC6352 on: March 28, 2007, 07:28:48 pm
 :-[

Ok, so I'm stupid.  Your right, it is just the address - 0x50.  Wire only wants the 7 bits....  I can't believe I didnt put that together.  Sometimes having the right tools is what it is all about.  I'm betting all my other devices will work fine now if I get it right.  At least you have some cool code that others can use to do I2C over other pins - that could be a big help for some.

Thanks All!!

-- Josh
7  Forum 2005-2010 (read only) / Interfacing / Re: HMC6352 on: March 28, 2007, 03:49:11 pm
So if I understand you correctly, you just had the I2C address wrong on the HMC?  Or did introducing a delay, having the "beginTransmission" immediatly followed by the "requestFrom", etc - make any difference.  I'm wondering if you got your 24LC256 working or not as well.  I am fairly certain I have the correct address using the Wire lib, yet I'm not getting it to work.  If you could hook yours up and scope if it does not work - I would really appreciate it.

Congrats on getting your HMC working!

-- Josh
8  Forum 2005-2010 (read only) / Interfacing / Re: HMC6352 on: March 27, 2007, 06:00:29 pm
That is very interesting.  I'll be integrating the code you emailed me later tonight and checking it out as well.  I may have had similar issues with other devices in regards to the "ACK" - as some are documented to work this way I believe.  I know when I tried a DS1631 it had cases for no "ACK", and specifically I'm referring to the EEPROM I'm working with right now (the 24LC256) - which in the datasheet (http://www.sparkfun.com/datasheets/IC/24LC256.pdf) says things like this:

Note: The 24XX256 does not generate any Acknowledge bits if an internal programming cycle is in progress.

Also in this same datasheet it says that the final data read would have no ACK, just a stop (bottom of page 11).  So it would seem there are valid conditions for no ACK to be normal.  Not sure if that is your case here or not - just thought I would share some thoughts.

Congratulations on the new Scope!!! I wish I had money for something like that......  smiley-sad

I'm excited about your findings and it sounds like your getting very close.

-- Josh
9  Forum 2005-2010 (read only) / Interfacing / Re: HMC6352 on: March 26, 2007, 06:17:39 pm
I'm having similar issues and willing to help test and refine if someone can send me the code, or point me to where I can download it.

Thanks,
Josh
10  Forum 2005-2010 (read only) / Interfacing / Re: PCF8574 - Driving an LED w/ I2C - Very Dim LED on: March 04, 2007, 06:28:45 pm
And yet so simple when you can read.... Thanks so much for pointing this out to me.  I can now say I understand what that part of the docs say - your a life saver!  Now it is working great!!!

Thanks,
Josh
11  Forum 2005-2010 (read only) / Interfacing / PCF8574 - Driving an LED w/ I2C - Very Dim LED on: March 04, 2007, 05:36:22 pm
First, thanks for your patience as this is very new to me - and probably a very simple question but I did not know where else to turn.  I'm trying to use an I2C I/O expander (PCF8574) to run some relays, but currently just testing w/ LEDs.  I have the I2C working fine, and the chip seems to be working correctly, except that the LED is extremely dim, and not lighting up much at all.  I had an old RadioShack (I know, it's cheap and lame) meter I was using, but it has stopped functioning so I cant immediately test my volts/amps - but I'm assuming something along the lines of an amps problem?  This is confusing me because the documentation clearly says it should be able to drive LEDs directly:

http://www.nxp.com/pip/PCF8574.html

I simply have the chip setup to the I2C on the arduino, and the output pins on the I/O chip directly tied to some LEDs (actually just one right now), and then to ground.  This is how I know the chip seems to be working fine - as I can barely see the LED lighting up when it is supposed to.  I have tried tying multiple I/O lines into the LED - and it does glow a little brighter - but nowhere near full brightness, and nothing compared to my debug LED on arduino pin 13 and ground.

So, what am I missing?  I'm betting it is some basic electrical circuitry knowledge, that I'm hoping someone here can help me fill.

Thanks,
Josh
12  Forum 2005-2010 (read only) / Interfacing / Lantronix MatchPort for WiFi 802.11b/g News on: April 06, 2007, 05:35:05 pm
Anyone else excited about this?:

http://www.lantronix.com/device-networking/embedded-device-servers/matchport.html

Seems like it has relatively low cost potential, and could be quite interesting.  I'm debating about getting one soon and was wondering if anyone else had seen these or is considering yet.  I see it listed for $75 or so, but not stocked everywhere yet (like not stocked at mouser.com yet).  If I do the math of other means to talk to a PC and/or the Internet wirelessly with these kinds of features, I easily end up with a min. of about $60 not including the time I would waste trying to figure it all out.

Thanks,
Josh
13  Forum 2005-2010 (read only) / Interfacing / Re: LCD 4-Bit & attachInterrupt - Causes Hanging? on: March 12, 2007, 12:53:40 pm
Thanks all again for the help.  I love the arduino and the support of this forum is priceless!  I did have the interrupt pin connected to both a button at one point and later another IC that has an interrupt line (PCF8457).  The items that made it all work for me, though in hind-site seem obvious, are:

1.) Never use a delay or any library which introduces a delay while in an interrupt (like the Wire library or LCD libraries).  Serial communication, or any communication requiring a clock will also fail.
2.) Use an external pull-up on the interrupt line.

I was violating both of these rules under the assumption that the interrupt would have an internal pull-pull, and so as the interrupt line was "floating" it was causing it to sometimes trigger during execution, and then get stuck as I was attempting to use variuse communications in the interrupt code like accessing the LCD and/or set a debug LED with a delay, talking I2C/TWI, etc. in my interrupt code.

The fix then was to add the external pull-up to prevent it from firing incorrectly, and then to modify my code so that I only set a flag variable and do all my other processing in the main loop.

Thanks,
Josh
14  Forum 2005-2010 (read only) / Interfacing / Re: LCD 4-Bit & attachInterrupt - Causes Hanging? on: March 10, 2007, 06:51:53 pm
Ok, so it has ended up as a one person conversation.  I have found the problem - as described already in another thread on using the interrupts.  Basically it would appear the documentation on using it is lacking some of the details (perhaps many already know enough that this seems obviuse).  Anyway, the answers are here:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1172808516/1

Could we have a contributor to the wiki update the docs to at least point here?  It could save many others much more time.

Thanks,
Josh
15  Forum 2005-2010 (read only) / Interfacing / Re: LCD 4-Bit & attachInterrupt - Causes Hanging? on: March 10, 2007, 04:09:40 pm
Hopefully this will not turn into a one person "conversation", but what I had originally called "worked" - was not entirely accurate.  Apparently, I can "clear" the LCD while the interrupt is off, but it still flakes out on me if I try to do anything else.

Example time - If I do this - it works fine:
Code:
 detachInterrupt(0);
  delay(500);
  lcd.clear();
  //lcd.printIn("Current State:");
  //print something on the display's second line.
  //lcd.cursorTo(2, 0);  //line=2, x=0.
  //if (state == 0) {
  //  lcd.printIn("OFF");
  //} else {
  //  lcd.printIn("ON");
  //}
  delay(500);
  attachInterrupt(0, buttonPressed, RISING);

If I uncomment anything here, it will lock up - ie:
Code:
 detachInterrupt(0);
  delay(500);
  lcd.clear();
  lcd.printIn("Current State:");
  //print something on the display's second line.
  //lcd.cursorTo(2, 0);  //line=2, x=0.
  //if (state == 0) {
  //  lcd.printIn("OFF");
  //} else {
  //  lcd.printIn("ON");
  //}
  delay(500);
  attachInterrupt(0, buttonPressed, RISING);

Any thoughts?  I'm desperate here as I need to use the 4 bit library because I need two interrupts.  Oh, and I should add one more thing - I modified the LCD4Bit.cpp to move the enable pin from 2 to 6 (pin 2 is an interrupt pin).  Honestly, that is all I modified there - just one line.

Thanks,
Josh
Pages: [1] 2