SoftwareSerial and pin change interrupts overlapping in arduino leonardo

Hello sir,

I am using pin change interrupts in arduino leonardo.i got output perfectly…but i need to use software serial library simultaneously in that above code…
just i included library,even i didnt started software serial usage…just compiled code…got below error\

"C:\Program Files\Arduino\hardware\tools\avr/bin/avr-gcc" -w -Os -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega32u4  -o "C:\Users\Admin\AppData\Local\Temp\arduino_build_479320/pci_softserial_interrupt_overlapping.ino.elf" "C:\Users\Admin\AppData\Local\Temp\arduino_build_479320\sketch\pci_softserial_interrupt_overlapping.ino.cpp.o" "C:\Users\Admin\AppData\Local\Temp\arduino_build_479320\libraries\SoftwareSerial\SoftwareSerial.cpp.o" "C:\Users\Admin\AppData\Local\Temp\arduino_build_479320/core\core.a" "-LC:\Users\Admin\AppData\Local\Temp\arduino_build_479320" -lm
C:\Users\Admin\AppData\Local\Temp\arduino_build_479320\libraries\SoftwareSerial\SoftwareSerial.cpp.o (symbol from plugin): In function `SoftwareSerial::read()':

(.text+0x0): multiple definition of `__vector_9'

C:\Users\Admin\AppData\Local\Temp\arduino_build_479320\sketch\pci_softserial_interrupt_overlapping.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

collect2.exe: error: ld returned 1 exit status

im attaching my code below…

#include <SoftwareSerial.h>
#include <avr/interrupt.h>

volatile int value = 0;

void setup()
{
cli();
PCICR |= 0b00000011; // Enables Ports B and C Pin Change Interrupts
PCMSK0 |= 0b00000001; // PCINT0
sei();

Serial.begin(9600);
}

void loop()
{
Serial.println(value);
}

ISR(PCINT0_vect)
{
value++;
}

please help me or suggest me solution for this problem :frowning: :frowning: :frowning: :frowning:

Use different pins for SoftwareSerial :smiley:

But your code does not give a reason to use software serial. The leonardo has RX1 and TX1 so you can use Serial1 instead of a SoftwareSerial object.