Show Posts
|
|
Pages: 1 [2] 3 4 ... 66
|
|
16
|
Forum 2005-2010 (read only) / Troubleshooting / Re: Bug using NewSoftSerial & Servo.h together
|
on: January 14, 2010, 12:16:44 pm
|
No, I haven't, mem. But you're right that there would almost certainly be a conflict. I added an end() method in NewSoftSerial 10 (now in beta) that allows for you to turn off a NewSoftSerial interrupt stream. (Previously, interrupts were enabled forever.) Could someone test this with Servo and Tone, i.e. start a NewSoftSerial stream, turn it off with end(), run a Servo, play a Tone, then turn NSS back on with begin(...)? http://arduiniana.orgMikal
|
|
|
|
|
17
|
Forum 2005-2010 (read only) / Troubleshooting / Re: Bug using NewSoftSerial & Servo.h together
|
on: December 29, 2009, 06:59:48 pm
|
|
Hi all--
I can officially confirm that NewSoftSerial (and really any software serial library) is incompatible with the new Servo library that ships with Arduino 0017. The problem is that the new Servo library, which is really quite cool, depends on reliable interrupts, where software serial solutions require interrupts to be disabled -- at least for short periods of time. I discovered this issue when I was trying to upgrade my Reverse Geocache box to 0017, and the only workaround I could come up with was to downgrade the Servo library back to 0016.
I wonder if it would be possible to retain both libraries in 0018?
Mikal
|
|
|
|
|
20
|
Forum 2005-2010 (read only) / Troubleshooting / Re: i2c Pressure Sensor
|
on: October 12, 2008, 09:42:54 pm
|
|
Mem, I *haven't* tried this code, but these are exactly the types of errors (stdlib.h:80) that people get when compiling old libraries with 0012. My guess is that it works for you because you disabled or undefined those pesky "function-style" cast macros in wiring.h"? If so, perhaps you'd care to share your method?
Mikal
|
|
|
|
|
21
|
Forum 2005-2010 (read only) / Troubleshooting / Re: Clock with Arduino
|
on: September 08, 2008, 10:52:18 am
|
|
Joker,
The express you propose,
elapsed_time = (max_counts + this_tick - last_tick) % max_counts;
is indeed more succinct and readable than the equivalent
if (this_tick < last_tick) elapsed_time = max_counts + this_tick - last_tick; else elapsed_time = this_tick - last_tick;
However, I think you'll find that many programmers opt for the latter for the simple reason that in most computer architectures the modulus operation is much more costly in terms of CPU consumption.
Cheers,
Mikal
|
|
|
|
|
25
|
Forum 2005-2010 (read only) / Troubleshooting / Re: NewSoftSerial not working under Arduino 016
|
on: June 06, 2009, 05:37:19 pm
|
|
Yes, Ron, the .o files are the compiled versions of the source. Unfortunately, I think the only time the libraries are recompiled is when you delete the .o files, or possibly if you select a different species of Arduino board. In any case, I learned soon enough that an 0015 binary will not work in 0016.
I'm relieved that your problem is solved. Thanks for sharing.
Mikal
|
|
|
|
|
27
|
Forum 2005-2010 (read only) / Troubleshooting / Re: NewSoftSerial not working under Arduino 016
|
on: June 06, 2009, 01:36:57 am
|
|
Ron,
I am unable to reproduce the trouble you are seeing with 0016 and NewSoftSerial. Actually, I had a lot of trouble when I first tried 0016, but then I realized that I hadn't deleted my library .o files when I copied them over from 0015. Did you delete all the library binaries?
Could you try a simple test of, say, printing "Hello" to the LCD? Does "regular" SoftSerial work? That should be an easy test.
Is anyone else experiencing any unexplained behavior with NewSoftSerial?
Mikal
|
|
|
|
|
28
|
Forum 2005-2010 (read only) / Troubleshooting / Re: Serial error rate (Hardware)
|
on: June 02, 2009, 11:38:33 pm
|
|
A common misconception is that an N baud connection implies that you are transmitting N bits per second. No, the baud rate only refers to the width of the bits within each byte. At 3Mbaud, each bit is 1/3,000,000 of a second in length. Once a byte has been transmitted, there is no guarantee that the next byte will immediately follow on its heels. You could send 1 byte every 10 seconds at a nominal 3Mbaud bitrate, but really only be getting an effective rate of 10 bit per second.
What I'm getting around to is that your problem is not due to "pushing the limits of the Atmel328". The slowest processor in the world can transmit at 3Mbaud as long as it is connected to a UART that can transmit a byte at that bit rate. You won't get 3 million bits per second, but you will get 3Mbaud.
Mikal
|
|
|
|
|