| Arduino Forum ::  Members :: DMerriman
 Show Posts Pages: [1] 2 3 ... 5
 1 Using Arduino / General Electronics / Re: VERY basic math resistor question. on: February 18, 2011, 03:43:57 pm Simple LED resistor calculation:(Vsupply - Vled) / Iled = RSo for a normal red/yellow/green LED, the forward voltage drop of 1.8V results in:(6V - 1.8V) / .02 = 210 ohms. Nearest "stock" 5% resistor would be 220 ohms.For a White or Blue LED with a higher drop, limiting the current more, and using a higher voltage, you would get:(9V - 3V) / .015 = 400 ohms. You could go with a 390 ohm 5% resistor.At 5V, 220 ohms will let 20mA through a monochrome LED; 470 limits it to roughly 10mA, and 1K gets it down to approximately 5 mA. Limiting the current saves battery power, but makes the LED proportionally dimmer. If you can remember those 3 resistor/current values, then adjusting upwards for higher voltages is pretty easy.
 2 Using Arduino / General Electronics / New voltage divider calculator available on: February 18, 2011, 03:31:17 pm Most of the voltage divider calculators on the Internet make the assumption that the user needs to find out what the output is from a specified input and known pair of resistors; I've written a Java application that basically works backwards from that: the user enters the input, the desired output, and the application cycles through and figures out what combinations of fixed resistors will produce it. The application allows for 5%, 1%, and .1/.25/.5% resistors, can copy the values to the system clipboard or print them out. Included in the file is FULL source code (with libraries and everything else), and well as the Java .jar file (neatly stored in the dist subdirectory). It's available as a zip at:https://sites.google.com/site/adifferentlemming/Home/projects/arduino#TOC-Voltage-Divider-Calculator---New-anIt's released as Open Source, so feel free to molest and mangle it to your hearts content!  DM
 3 Using Arduino / Installation & Troubleshooting / Can't find stdlib.h, string.h, etc in Linux IDE 22 on: February 13, 2011, 02:02:28 pm Just installed the ide (using zypper, following the openSuSE instructions), and just as a test, tried to verify the blink example - and MUCH to my surprise, it promptly threw up... giving me this:Code:In file included from Blink.cpp:8:/usr/share/arduino-0022/hardware/arduino/cores/arduino/WProgram.h:4:20: error: stdlib.h: No such file or directory/usr/share/arduino-0022/hardware/arduino/cores/arduino/WProgram.h:5:20: error: string.h: No such file or directory/usr/share/arduino-0022/hardware/arduino/cores/arduino/WProgram.h:6:18: error: math.h: No such file or directory/usr/share/arduino-0022/hardware/arduino/cores/arduino/WProgram.h:8:27: error: avr/interrupt.h: No such file or directoryI edited my path to include /usr/include, where stdlib et al reside, but I'm still getting this.Whiskey Tango Foxtrot, over?
 4 Forum 2005-2010 (read only) / Syntax & Programs / Re: I2C -- EEPROM testing on: March 21, 2009, 07:34:10 pm I understand that page size is hardwired -- in the case of my chip, it's 32 bytes. What I'm unclear on is whether or not those 32-byte pages have to correspond to the logical binary boundaries -- that is, could I conceivably write a "page" of 32 bytes that started at 0x11 and ran to 0x31, for example? Or would trying to do so cause some kind of error within the chip (i.e. hit address 0x1F, and wrap around to 0x00)?
 5 Forum 2005-2010 (read only) / Syntax & Programs / Re: I2C -- EEPROM testing on: March 21, 2009, 11:25:11 am THANK YOU!1) I wasn't too worried about writing the same 32 bytes over and over; I was more after just being able to read/write - but I still appreciate it.2) The EEPROM spec says that 32 bytes is the page size; the comments on the eeprom buffer routine suggest that the Wire buffer might be the problem there. I'll back off to 16 bytes, and see how that goes.3) I'll set it to 10mS delay, and work with that, then.Perhaps you know something that isn't real clear in the datasheets: they specify a page size, but what I'm not sure of is whether or not page boundaries are logical or hardwired -- that is, can a 32-byte page run from, say, memory location 0x17 - 0x37, or would it have to be at 0x00/0x20/0x40 etc ?Again, thank you for taking the time to double-check me on this.
 6 Forum 2005-2010 (read only) / Syntax & Programs / Re: I2C -- EEPROM testing on: March 18, 2009, 11:26:32 am Thanks -- I'll give it a go.
 7 Forum 2005-2010 (read only) / Syntax & Programs / Re: I2C -- EEPROM testing on: March 18, 2009, 10:54:20 am Actually, I have.At first, I thought I might be running into the 30-32 byte Wire buffer (which, incidentally, I suspect should probably be increased to a *definite* 64, since some of the EEPROM sheets I've looked at are that big), and dropped to 24, 16, and even 8 -- all without success.
 8 Forum 2005-2010 (read only) / Syntax & Programs / Re: I2C -- EEPROM testing on: March 18, 2009, 10:29:05 am KG4 - have you got a link to a page? Just went to the general address (www.wulfden.org), and couldn't figure out where I should go from there...BroHogan - from the data sheet, the time to actually write a page is the same as for actually writing a single byte, so loading the EEPROM with a page of data before writing would appear to be a _little_ bit of a time saver when dealing with more than page-size chunks of data.
 9 Forum 2005-2010 (read only) / Syntax & Programs / Re: I2C -- EEPROM testing on: March 17, 2009, 10:04:51 pm That's the way I've got it wired -- I've check several times, and that I'm getting data in/out of the first page of the EEPROM makes me believe it isn't my hookup. I've only got the one chip at present; it's stuck in a breadboard, and I've verified that I don't have any bent pins on it.I'm starting to wonder if I shouldn't call this in as an X-file   :o
 10 Forum 2005-2010 (read only) / Syntax & Programs / Re: I2C -- EEPROM testing on: March 17, 2009, 09:49:32 pm Since this isn't a matter of national security or anything, I'm not going to fuss if you need/want a couple days to help me  I've tried both write_byte and write_page, neither has worked (yet); all I've gotten out of this exercise has been a headache
 11 Forum 2005-2010 (read only) / Syntax & Programs / Re: I2C -- EEPROM testing on: March 16, 2009, 07:54:36 pm I moved my delay to the end of the EEPROM write routine, as you have it, without effect.  :-[The datasheet for my EEPROM shows the addressing byte as:  1 0 1 0 A2 A1 A0 R/W; ignoring the r/w bit (which Wire is supposed to take care of), that leaves me with 101 0000, or 0x50. I've gone out and checked a few other Googled references, and found that 1010xxx seems to be fairly common for EEPROMs:QuoteAs an example, the Microchip 24LC01B Serial EEPROM has A0, A1, and A2 inputs, but the high order address bits are hardwired to 1010 – this allows slave addresses of the form 1010xxx, but no more than 8 of these devices on any I2C bus due to address conflicthttp://www.google.com/url?sa=t&source=web&ct=res&cd=5&url=http%3A%2F%2Fcoen.boisestate.edu%2FSsmith%2FBusInt%2Foverheads%2FI2C.doc&ei=ePK-SefhMoikNdL7rKsN&usg=AFQjCNF9FY8mTVWFIqzCwpTZwFRIcJVTOQ&sig2=K2dkY3nsYN2xUlgg1tW6Kw(*shrugs*) Beats me.  Would it be within the realm of possibility that you could try my code using (one of) your chip(s)? Just to eliminate biological errors?
 12 Forum 2005-2010 (read only) / Syntax & Programs / Re: I2C -- EEPROM testing on: March 16, 2009, 05:24:47 pm Florinc, your comment makes me believe that the wire library is probably good (I figured it was, but...).I've looked at the datasheet (the problem seems to be at Catalyst' end; it wouldn't download for me, either), and it specs a MAX of 10mS for writes to complete before it'll respond to another request -- which doesn't quite explain why the varying values of delay I put in at the end of the writes didn't work (I started with a delay of 10, then 20, then 50, and finally 100).Curiouser and curiouser...  :-?