Go Down

Topic: Arduino Due libraries (official and 3rd party) (Read 291296 times) previous topic - next topic

mtorruella

HI nitrof¡¡¡

I don't have any specific code error, I was working with arduino MEGA 2560 + SIM900 Shield, I did'nt have any problems with this platform, i was using GPRS_Shield_Arduino.h and did my life easier interfasing wiht SIM900, I did not have to use AT commands.

I had some issues with MEGA sdram capacity, then I have to move to the Arduino DUE, the GPRS_Shield_Arduino.h is not compatible with DUE, because of that, I am looking for a new library compatible with DUE how can help me interfasing with SIM900 without the need to use AT commands.

Thanks for your help¡¡¡¡

antodom

HI

I am using and arduino due with SIM900 Shield and i am having problem with GPRS_Shield_Arduino.h and SofwareSerial.h library, seem is not compatible with due, there are a solution for use SIM900 shield with due?

Thanks in advance
Hi there @mtorruella,

Using SoftwareSerial with the DUE is not possible, this is a library which is not compatible with Arduino DUE's ATSAM3X8E microcontroller. As an alternative you should use any of the hardware serial ports available in the DUE, or the software serial library for the DUE soft_uart, available at https://github.com/antodom/soft_uart.

I hope it helps.
------------
antodom

mtorruella

Hi antodom

I will try with soft_uart Thanks!!!!!

hasanturgut

Hello there,
I have a program that I run with mega. I can't run this program with DUE. When I load the Nextion screen library it gives an error in compilation. what is the solution to this.

error message;

Arduino:1.8.12 (Windows 10), Kart:"Arduino Due (Programming Port)"
C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp:285:2: error: #error This version of SoftwareSerial supports only 20, 16 and 8MHz processors
#error This version of SoftwareSerial supports only 20, 16 and 8MHz processors
 ^
C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp: In member function 'bool SoftwareSerial::listen()':
C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp:341:23: error: 'SREG' was not declared in this scope
    uint8_t oldSREG = SREG;
                      ^
C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp:342:9: error: 'cli' was not declared in this scope
    cli();
        ^
In file included from C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\cores\arduino/Arduino.h:201:0,
                from C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp:43:

C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp: In member function 'void SoftwareSerial::setTX(uint8_t)':
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\variants\arduino_due_x/variant.h:63:65: error: invalid conversion from 'Pio*' to 'uint8_t {aka unsigned char}' [-fpermissive]
#define digitalPinToPort(P)        ( g_APinDescription[P].pPort )
                                                                ^
C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp:517:18: note: in expansion of macro 'digitalPinToPort'
  uint8_t port = digitalPinToPort(tx);
                 ^
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\variants\arduino_due_x/variant.h:66:44: error: base operand of '->' is not a pointer
#define portOutputRegister(port)   ( &(port->PIO_ODSR) )
                                           ^
C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp:518:27: note: in expansion of macro 'portOutputRegister'
  _transmitPortRegister = portOutputRegister(port);
                          ^
C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp: In member function 'void SoftwareSerial::setRX(uint8_t)':

C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\variants\arduino_due_x/variant.h:63:65: error: invalid conversion from 'Pio*' to 'uint8_t {aka unsigned char}' [-fpermissive]
#define digitalPinToPort(P)        ( g_APinDescription[P].pPort )
                                                                ^
C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp:528:18: note: in expansion of macro 'digitalPinToPort'
  uint8_t port = digitalPinToPort(rx);
                 ^
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\variants\arduino_due_x/variant.h:67:44: error: base operand of '->' is not a pointer
#define portInputRegister(port)    ( &(port->PIO_PDSR) )
                                           ^
C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp:529:26: note: in expansion of macro 'portInputRegister'
  _receivePortRegister = portInputRegister(port);
                         ^
C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp: In member function 'void SoftwareSerial::begin(long int)':

C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp:540:31: error: 'table' was not declared in this scope
  for (unsigned i=0; i<sizeof(table)/sizeof(table[0]); ++i)
                             ^
C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp:556:38: error: 'digitalPinToPCICR' was not declared in this scope
    if (digitalPinToPCICR(_receivePin))
                                     ^
C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp:558:78: error: 'digitalPinToPCICRbit' was not declared in this scope
      *digitalPinToPCICR(_receivePin) |= _BV(digitalPinToPCICRbit(_receivePin));
                                                                             ^
C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp:558:79: error: '_BV' was not declared in this scope
      *digitalPinToPCICR(_receivePin) |= _BV(digitalPinToPCICRbit(_receivePin));
                                                                              ^
C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp:559:37: error: 'digitalPinToPCMSK' was not declared in this scope
      *digitalPinToPCMSK(_receivePin) |= _BV(digitalPinToPCMSKbit(_receivePin));
                                    ^
C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp:559:78: error: 'digitalPinToPCMSKbit' was not declared in this scope
      *digitalPinToPCMSK(_receivePin) |= _BV(digitalPinToPCMSKbit(_receivePin));
                                                                             ^
C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp: In member function 'void SoftwareSerial::end()':
C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp:574:36: error: 'digitalPinToPCMSK' was not declared in this scope
  if (digitalPinToPCMSK(_receivePin))
                                   ^
C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp:575:77: error: 'digitalPinToPCMSKbit' was not declared in this scope
    *digitalPinToPCMSK(_receivePin) &= ~_BV(digitalPinToPCMSKbit(_receivePin));
                                                                            ^
C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp:575:78: error: '_BV' was not declared in this scope
    *digitalPinToPCMSK(_receivePin) &= ~_BV(digitalPinToPCMSKbit(_receivePin));
                                                                             ^
C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp: In member function 'virtual size_t SoftwareSerial::write(uint8_t)':
C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp:610:21: error: 'SREG' was not declared in this scope

  uint8_t oldSREG = SREG;
                    ^
C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp:611:7: error: 'cli' was not declared in this scope
  cli();  // turn off interrupts for a clean txmit
      ^
C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp:615:26: error: 'XMIT_START_ADJUSTMENT' was not declared in this scope
  tunedDelay(_tx_delay + XMIT_START_ADJUSTMENT);
                         ^
C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp: In member function 'virtual void SoftwareSerial::flush()':

C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp:658:21: error: 'SREG' was not declared in this scope

  uint8_t oldSREG = SREG;
                    ^
C:\Users\User\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp:659:7: error: 'cli' was not declared in this scope
  cli();
      ^
exit status 1
Arduino Due (Programming Port) kartı için derleme hatası.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


nitrof

Hi hasanturgut.

First, you should have start a new tread for your question.
second, put any code or error text into code brace ( look up the </> )
Third, you should also post any code you have.

By now, I can tell that softwareSerial do not support DUE.


Whit DUE, you can use build in serial port without using softwareSerial. just use Serial1 to 3.


But again, without code, can't tell more.

Regards.

Nitrof

Go Up