As i am not able to upload code in ATMEGA328PBU i am trying to upload the same code using arduino uno to ATMEGA328PBU. I am not getting below error in my laptop but while using the same to pc this error comes.
avrdude: Expected signature for ATmega328P is 1E 95 0F
Double-check chip, or use -F to override this check.
Wrong microcontroller found. Did you select the right board from the Tools > Board menu?
a 328PB is not the same as a 328P (though code compiled for a 328p will run unmodified on a 328pb, avrdude will notice that the signature isn't right and keep you from uploading this if you tell the IDE it's a 328p and try to have the IDE upload it for you, which is what you're trying to do)
Use MiniCore to add support for the 328PB if you're using a PB. The PB is a much better part - has a few more I/O pins, second UART, I2C and SPI controller, and more 16-bit timers like timer1 on the '328p