Created Sun, 31 Jul 2011 21:05:54 +0000 by avenue33
Sun, 31 Jul 2011 21:05:54 +0000
Hi!
I've read the topic: how to use newsoftserial with max32.
On the UNO32, there're two hardware serial ports. I need a third one:
On Arduino, the solution is NewSoftSerial.
On my UNO32, the following code doesn't work
#include "WProgram.h"
#include "NewSoftSerial.h"
NewSoftSerial mySerial(2, 3);
void setup() {
mySerial.begin(19200);
mySerial.print("\n\n\n***\n");
}
void loop() {
}
raises the error
/Users/~/Documents/Arduino/_Projets/libraries/NewSoftSerial/NewSoftSerial.cpp:37:27: fatal error: avr/interrupt.h: No such file or directory
compilation terminated.
How to proceed :?: Any alternative :?:
Thanks.
Tue, 02 Aug 2011 01:48:40 +0000
As the error indicates, you're trying to use low level AVR code on a PIC32 ... it will never work :) You could try porting the AVR code to the PIC32.
Tue, 02 Aug 2011 04:12:51 +0000
I'm afraid this is out of my reach :(
I'm not looking for a technical solution, but for a functional feature.
One solution could be an official port of avr low-level libraries, in order to provide a bigger compatibility with Arduino (as claimed).
Another solution could be a written from scarch new library for the UNO32.
Tue, 02 Aug 2011 12:07:52 +0000
NewSoftSerial would be very difficult to port as it uses lots of AVR assembly and clockspeed-specific timing tables. But try the SoftwareSerial library, that at least compiles, although I haven't tried it on UNO32.
Tue, 02 Aug 2011 12:19:22 +0000
Thanks davec :)
I did, but SoftwareSerial doesn't provide the flush and avaliable instructions I need.
Please note I'm not looking for a port of NewSoftSerial into chipKIT, but rather for a library that provides same functionalities.
Unfortunately, developing such a library on chipKIT is out of my reach :(
Best regards,
Tue, 02 Aug 2011 22:14:30 +0000
What value do you place on your time, avenue33?
The fastest/cheapest/easiest option might just be to put your Uno32 on the shelf for a while, and buy a Max32. It has four serial ports.
Ron.