Viewing SPDR values on monitor using Serial.println

I am working on a project and I want to view the SPDR values on my computer monitor using Serial.print() . I am unable to do so directly, the sketch seems to hang. may I have some guidance pl! sorry if the query seems to be too elementary.!!

What sketch?

How to use this forum

The sketch is attached, it consists of two files. It is basically to fire solenoids in a xylophone to get a tune, It uses a shift register to fire the solenoids. The code uses ISR routines. Thanks and Regards

songs.ino (10.8 KB)

Xylophone2.ino (1.13 KB)

void clear_time() {
  // clear the count
  TCNT1 = 0;
  // clear interrupt flags
  TIFR1 |= (1<<OCF1B);
  TIFR1 |= (1<<OCF1A);
  // clear shift register


inline void shiftregister_push(uint8_t data) {
  SPDR = data;


  // this is the end of the mallet strike

Don’t do serial prints when interrupts are off.

Also why not use the SPI library? All this fiddling with registers isn’t really necessary.