Arduino Uno Vs Pro micro interupts

I am building a project using a Pro micro an AD9850 DDS, lcd display and encoder the code given for the project uses interrupts see part of code below

void setup() {
pinMode(A0,INPUT); // Connect to a button that goes to GND on push
pinMode(A5,INPUT); // IF sense **********************************************
digitalWrite(A0,HIGH);
digitalWrite(A5,HIGH);
lcd.begin(16, 2);
PCICR |= (1 << PCIE2);
PCMSK2 |= (1 << PCINT18) | (1 << PCINT19);
sei();

when I compile the code declaring the board as a UNO the code compiles with out error. When compiling for the micro I get the following errors

Arduino: 1.8.12 (Windows 10), Board: “Arduino Micro”

C:\Users\gary hardman\Desktop\sketch_jun22a\sketch_jun22a.ino: In function ‘void setup()’:

sketch_jun22a:45:18: error: ‘PCIE2’ was not declared in this scope

PCICR |= (1 << PCIE2);

^~~~~

C:\Users\gary hardman\Desktop\sketch_jun22a\sketch_jun22a.ino:45:18: note: suggested alternative: ‘PCIE0’

PCICR |= (1 << PCIE2);

^~~~~

PCIE0

sketch_jun22a:46:3: error: ‘PCMSK2’ was not declared in this scope

PCMSK2 |= (1 << PCINT18) | (1 << PCINT19);

^~~~~~

C:\Users\gary hardman\Desktop\sketch_jun22a\sketch_jun22a.ino:46:3: note: suggested alternative: ‘PCMSK0’

PCMSK2 |= (1 << PCINT18) | (1 << PCINT19);

^~~~~~

PCMSK0

sketch_jun22a:46:19: error: ‘PCINT18’ was not declared in this scope

PCMSK2 |= (1 << PCINT18) | (1 << PCINT19);

^~~~~~~

C:\Users\gary hardman\Desktop\sketch_jun22a\sketch_jun22a.ino:46:19: note: suggested alternative: ‘PCINT1’

PCMSK2 |= (1 << PCINT18) | (1 << PCINT19);

^~~~~~~

PCINT1

sketch_jun22a:46:36: error: ‘PCINT19’ was not declared in this scope

PCMSK2 |= (1 << PCINT18) | (1 << PCINT19);

^~~~~~~

C:\Users\gary hardman\Desktop\sketch_jun22a\sketch_jun22a.ino:46:36: note: suggested alternative: ‘PCINT1’

PCMSK2 |= (1 << PCINT18) | (1 << PCINT19);

^~~~~~~

PCINT1

exit status 1
‘PCIE2’ was not declared in this scope

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

Any ideas?

Uno has atmega328p and has these register names that you used. but pro micro has atmega32u4 and may have difference in register names, so checkout the datasheet of atmega32u4 for the correct register names. I am not sure if this is the exact problem or not , please try it out