For a personal project, I've built my own PCB with Atmega2560 in it. The thing is I had to use pin number 68 and 69 as software serial port, mostly because the SoftwareSerial page says :
"Note: Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69"
Normal ArduinoMega2560 doesn't use those pins (see ArduinoPInMapping : http://www.arduino.cc/en/Hacking/PinMapping2560 ) so I created my own target following this tutorial (atmega - Arduino use all Ports ATMega2560 - Stack Overflow). I basically just added the pin Arduino doesn't use into the pins_arduino.h header file. It works great if I just wanted to use this pin with DigitalWrite. But I want to use it as a SoftwareSerial and this is not working. I checked into the pins_arduino.h: header file and for me these pins seems to have been declared as PCINT...
For a personal project, I've built my own PCB with Atmega2560 in it. The thing is I had to use pin number 68 and 69 as software serial port, mostly because the SoftwareSerial page says :
"Note: Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69"
Normal ArduinoMega2560 doesn't use those pins (see ArduinoPInMapping : http://www.arduino.cc/en/Hacking/PinMapping2560 ) so I created my own target following this tutorial (atmega - Arduino use all Ports ATMega2560 - Stack Overflow). I basically just added the pin Arduino doesn't use into the pins_arduino.h header file. It works great if I just wanted to use this pin with DigitalWrite. But I want to use it as a SoftwareSerial and this is not working. I checked into the pins_arduino.h: header file and for me these pins seems to have been declared as PCINT...
Can someone help on this ?
Thanks a lot.
ludovic_pendaries,
You need to upload your pins_arduino.h file. That is where the problem is. You need to update the:
Thanks for your reply !
I had some feelings about this update but I have to confess that I am a bit lost in the declaration of the PCIR. As far as I can see the declaration seems correct to me. Here is the relevant part of my pins_arduino.h :
How many USART ports do you need? The Mega2560 has 4 of them so unless you use them all or specifically need there pins I would stick to the hardware USART and use the extra pins for simple I/O instead.