Show Posts
Pages: 1 [2] 3
16  Forum 2005-2010 (read only) / Bugs & Suggestions / how to avoid reset when starting serial monitor? on: January 21, 2008, 08:38:28 pm
Is there a way to avoid having my sketch reset when I start the serial monitor?  I'm using a Diecimila with arduino-0010 under MacOS X 10.5.  I can see why the reset might be useful for some people, but I want to have a long-running sketch going on the board that I can check in on from time to time.
17  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Broken datasheet link on website on: January 12, 2008, 09:03:29 pm
It looks like this has been fixed now (for those of you keeping score at home...)
18  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Missing reference pages in arduino-0010 on: January 12, 2008, 08:27:42 pm
So you know (in case it gets spam-filtered), I've sent the script to  Enjoy!
19  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Missing reference pages in arduino-0010 on: January 12, 2008, 07:48:20 pm
It's because the reference download script (build/ - one of the nastiest pieces of code I've written - doesn't check the extended reference page for links.  I'm hoping to rewrite the script soon (so it no longer hurts my eyes to look at it)

I've taken the liberty of creating a perl script that replaces the guts of current script. It downloads the files from the web site and rewrites them for local use.  I'm not sure if this is what you had in mind or not, but I think it's reasonably well commented and should be more maintainable the existing script.  I went ahead and made it handle the extended reference page's links.  Also, while testing it I noticed that the links to the FAQ weren't getting rewritten, so I fixed that too.

If you're interested, what would be the best way of getting this to you?

20  Forum 2005-2010 (read only) / Bugs & Suggestions / Missing reference pages in arduino-0010 on: January 12, 2008, 08:42:57 am
It appears that a number of html pages linked from the extended reference are missing from the arduino-0010 distribution.  The ones I noticed were
I took a peek at the SVN repository to see how the reference pages were generated, but it looks like they're all checked in together as a single '' archive.  The current version of the archive still seems to be missing the files listed above.

I know this probably isn't a big deal for a lot of people, since the reference is always available online but I work offline relatively frequently, and appreciate having the reference on my laptop.
21  Forum 2005-2010 (read only) / Interfacing / Re: Arduino and 1-wire on: July 20, 2008, 09:29:17 pm
I just thought I'd try Jim's OneWire library and got the following errors when the Arduino environment (11) starts up:
I don't think Jim's original library is usable in anything but Arduino-007.  It had to be updated to work with changes in the header files in later Arduino releases, as you can see from your compile errors.  I didn't start working with it until Arduino-010, myself, and have only tried using the most recently updated versions. At this point, the most recent update that I'm aware of is mine, which is referenced on the OneWire page in the playground; I would recommend you use that.
22  Forum 2005-2010 (read only) / Interfacing / Re: Arduino and 1-wire not working with +16 DS18B2 on: June 20, 2008, 10:05:34 am
It is not a power issue since I have looked at the signal over the oscilloscope. It is neither a problem of the pull up resistor. [...] I am pretty much sure is a software problem( the 1-wire library).

I'm not sure how you can conclude that it's not a hardware issue.  You can't just continue to add devices to a 1-wire network and expect them all to perform as if they were the only devices on the bus.  Maxim publishes an application note (AN148 - ""Guidelines for Reliable 1-Wire Networks") that discusses the issues people encounter when trying to build medium-sized and large 1-wire networks.  It's readable and seems to contain a lot of good advice.  Two things, in particular, that would probably be helpful would be to power the devices directly and to split your network up into two or more separate, smaller 1-Wire busses.

Personally, I don't think there's bug in the OneWire library that could be responsible for your problems.  On the other hand, it may be possible to improve the reliability of your existing circuit by using the library differently.  For example, you can either tell all the devices to start a temperature conversion at once, or you can address them individually and ask them to do their conversions one at a time.  Having them do all their conversions at once is going to draw much more power from the bus, and so I'd avoid doing that.  I guess a similar issue arises with the command to have devices report their addresses, but I'm not sure whether there's an alternative there.  All that said, my feeling is that you will probably need to (at a minimum) split up your network into smaller, separately powered networks if you want to support that many devices.  
23  Forum 2005-2010 (read only) / Interfacing / Re: Arduino and 1-wire on: June 19, 2008, 08:34:41 pm
[...] and do you have the pullup resistor in your circuit?
Without the pull-up resistor, even one device wouldn't work.  
24  Forum 2005-2010 (read only) / Interfacing / Re: Arduino and 1-wire on: May 20, 2008, 12:02:45 pm
I'm using the 0011 version and put the files in arduino-0011\hardware\libraries\OneWire but I get an error about
OneWire::OneWire(unsigned char)'o: In function `loop':
I'm still going through the messages but if anyone has the fix I would appreciate it.

The OneWire library, itself, doesn't have any problems with arduino-0011 that I'm aware of.  If you're still having this problem, I'd be happy to look at it if you post your code here.
25  Forum 2005-2010 (read only) / Interfacing / Re: Arduino and 1-wire on: April 21, 2008, 03:50:48 pm
Anybody use DS1920 (thermocron)?
Not me, but the datasheet makes it look like code for the DS1820 or DS18S20 would also work to read temperatures froma DS1920.  It has the same family code (0x10) and returns a 9 bit temperature, like the DS1820.
26  Forum 2005-2010 (read only) / Interfacing / Re: Arduino and 1-wire on: April 18, 2008, 03:50:05 pm
For 18S20:
 Tc=(LowByte*10)/2;               // 18S20 Temp= LSB/2
  Whole=Tc / 10;                  //calcul de l'entier
  Fract=Tc % 10;                  //calcul fraction ".5"
I only have 18S20 so I know it works and I did spend a couple of hours reading through the datasheet.

Of course, that code only works for temperatures above freezing.   I'm sure that's fine for your purposes, but anyone who might want to use reuse your code should be aware of this.
27  Forum 2005-2010 (read only) / Interfacing / Re: Arduino and 1-wire on: April 18, 2008, 08:55:28 am
venalicio:  (Sorry for not responding sooner, but your edit didn't trigger a notification.)  The code to read the temperature needs to be slightly different for the DS18B20 (and DS1822), because it returns a 12-bit temperature value (0.0625 deg precision), while the DS18S20 and DS1820 return 9-bit values (0.5 deg precision).  Assuming you've gotten the msb and lsb for the temperature, here's how converting to a floating-point temperature value is pretty easy.  You should just need the following code:


int hext = (msb << smiley-cool + lsb;
double tempc = (double)hext * 0.5;


int hext = (msb << smiley-cool + lsb;
double tempc = (double)hext * 0.0625;

These snippets ought to work, but I don't have my Arduino wired up to the temperature sensors at the moment, and so I can't verify it right now.  
28  Forum 2005-2010 (read only) / Interfacing / Re: Arduino and 1-wire on: March 24, 2008, 10:51:16 pm
Yes I ran into that too, as I reported elsewhere - the family code for the 18B20 is different from that for the 18S20.   (There's a note one the Arduino OneWire page that mentions this.) Just replace the family code in the test (0x28) with the one for the 18B20 (0x10).  For the record, the DS1822 thermometer has yet another family code (0x22).
29  Forum 2005-2010 (read only) / Interfacing / Re: Arduino and 1-wire on: January 24, 2008, 06:24:29 am
[...] it really eats up SRAM. The CRC tables use about 256 bytes of RAM (from the 1 kbytes the atmega168 has).
On my system I have temporarily commented out that section, but I think a good solution would be to use PROGMEM for the CRC tables.
A better solution, I think, would be to do the CRC calculation in code, without using the lookup table at all.  I spent a couple of hours on that yesterday and worked it out.  Just replace the current code for the OneWire::crc8() function with the following,
uint8_t OneWire::crc8 ( uint8_t *addr, uint8_t len )
   uint8_t i, j;
   uint8_t crc = 0;

   for (i = 0; i < len; i++) {
       uint8_t inbyte = addr[i];
       for (j = 0; j < 8; j++) {
           uint8_t mix = (crc ^ inbyte) & 0x01;
           crc >>= 1;
           if (mix) crc ^= 0x8C;
           inbyte >>= 1;
   return crc;
30  Forum 2005-2010 (read only) / Interfacing / Re: Monochrome LCD and Arduino on: January 29, 2008, 09:15:34 am
Would there be any way to interface this monochrome LCD with the Arduino and only use about 4 pins? I only need to use the 3 segments in the middle.
According to the datasheet, it looks like the best you'd be able to do (without extra circuitry) would be 10 pins to control those three digits in the middle.  There are two pins for each digit (8, 9, 10, 11, 14, 15) and four common pins (17, 18, 19, 20) that you need to drive.  If you added a chip (like a 4-bit shift register) that you could clock to drive each of the common pins in turn, you could get that down to 7 Arduino pins.  Either way, this looks like a fairly specialized LCD, and the standard LCD drivers aren't going to help you; I imagine you'll have to write your own control code.
Pages: 1 [2] 3