Pages: 1 2 [3] 4 5 ... 11   Go Down
Author Topic: NewSoftSerial Library: An AFSoftSerial update  (Read 15353 times)
0 Members and 1 Guest are viewing this topic.
Austin, TX USA
Offline Offline
God Member
*****
Karma: 4
Posts: 997
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As long as the clock is 16MHz, I think it's a fair bet that it will work, although I haven't tested anything but the Diecimila.
Logged

0
Offline Offline
God Member
*****
Karma: 0
Posts: 731
skcor oniudrA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've got a few unassembled RBBBs laying around with 16mhz crystals so il put in a 328, when they arrive, and give it a spin.
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 11
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Wow, you guys are amazing.  Nice inline assembly fix.  I'm going to upgrade the Mac AVR tools to the latest version from AVR Mac Pack (which includes avr-gcc 4.3.2).  
Logged

Connecticut, US
Offline Offline
Edison Member
*
Karma: 2
Posts: 1036
Whatduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

mellis, where will you be posting them?  An update to 0013 zip?  Or just instructions on what to grab from another site to do surgery ourselves?

The inline assembly is cool but only works on a case-by-case basis, and there are other folks (including me) who have been bitten by the broken interrupt handlers on OSX.
Logged

Austin, TX USA
Offline Offline
God Member
*****
Karma: 4
Posts: 997
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@mellis, back when I was investigating the problem with the broken Ubuntu random() function, the guys on the avr-libc forum advised steering clear of the 4.3.0 avr-gcc compiler, which they characterized as "broken".  I thought it was funny that that's the version we use with Windows Arduino.  Perhaps it would be good to upgrade *all* the Arduino distros to 4.3.2?

Mikal
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 11
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Good point.  The latest version of WinAVR has gcc 4.3.2, too.  I hope to upgrade both OSes for Arduino 0014.
Logged

Austin, TX USA
Offline Offline
God Member
*****
Karma: 4
Posts: 997
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm happy to say that I have incorporated etracer's mods to NewSoftSerial and after running the Windows-compiled object through my baud rate test suite, I find that the slightly longer RX interrupt handlers do not significantly affect the error rate.

Code:
ERROR RATES
   | 300  | 1200 | 2400 | 4800 | 9600  | 14.4K | 19.2K  |  28.8K | 31.25K  | 38.4K  | 57.6K  | 115.2K
TX |  0%  |  0%  |  0%  |  0%  |  0%   |   0%  |   0%   |   0%   |   0%    |   0%   |    0%  |    0%
RX |  0%  |  0%  |  0%  |  0%  |  0%   |   0%  |   0%   |   0%   |   0%    | 0.1%   | 0.35%  |   N/A

@mellis: I would love to be able to make etracer's fix conditional on whether it is needed.  This seems an excellent example of a use case that would benefit from the

Code:
#define ARDUINO_VERSION 14

proposal I made.

OSX users: Please test.  And would someone please compile NSS 5 on OSX for Diecimila/Duemilanove and send me the binary?  I would like to run it through my test bench.

Mikal

http://sundial.org/arduino/index.php/newsoftserial/



« Last Edit: February 15, 2009, 11:01:54 pm by mikalhart » Logged

Indiana
Offline Offline
Full Member
***
Karma: 1
Posts: 234
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm getting a "Page not found" error when trying to download the latest version.
Logged

Austin, TX USA
Offline Offline
God Member
*****
Karma: 4
Posts: 997
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ouch.  Sorry.  I thought I had tested all the links.  Try again.

http://sundial.org/arduino/NewSoftSerial/NewSoftSerial5.zip

Mikal
Logged

Indiana
Offline Offline
Full Member
***
Karma: 1
Posts: 234
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
And would someone please compile NSS 5 on OSX for Diecimila/Duemilanove and send me the binary?  I would like to run it through my test bench.

Check your private messages.
« Last Edit: February 16, 2009, 05:13:37 pm by etracer » Logged

Austin, TX USA
Offline Offline
God Member
*****
Karma: 4
Posts: 997
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Tonight I thoroughly tested etracer's OSX build of NewSoftSerial v5 and it performs admirably at all supported baud rates, perhaps even slightly better than the Windows build.

Thanks again, etracer, for your work.

Mikal
« Last Edit: February 17, 2009, 01:29:22 am by mikalhart » Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 239
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i fixed a small bug in the interrupt names that was giving 328's a 'compiles but freaks' problem
also made the examples folder a little neater
otherwise, works very nicely with 1 GPS module under v13 ide on windows and mac osx tested with 168 and 328p

http://www.ladyada.net/media/gpsshield/NewSoftSerial_18-02-09.zip
Logged

Austin, TX USA
Offline Offline
God Member
*****
Karma: 4
Posts: 997
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you very much, ladyada.

Mikal
Logged

Austin, TX USA
Offline Offline
God Member
*****
Karma: 4
Posts: 997
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I posted NewSoftSerial 6 today, which contains ladyada's contributions.  This new version supports the Atmega328p that she sells.  Go buy a bunch of them.

Thanks,

Mikal
« Last Edit: February 20, 2009, 02:11:02 pm by mikalhart » Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 239
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

well, to be specific, it should work under any 328p
-however- the interrupt bug in v13 is not resolved so there may be freaky experiences.
Logged

Pages: 1 2 [3] 4 5 ... 11   Go Up
Jump to: