#include #include //1バイト転送完了 void byteReceived() { UBYTE getData; SC_REG &= 0x7f; //受信停止 getData = SB_REG; printf("%c", getData); SC_REG = 0x80; //受信開始 } void main() { set_interrupts(SIO_IFLAG); add_SIO(byteReceived); puts("receiving..."); SC_REG = 0x80; //受信開始(外部クロック) while(1) { delay(1000UL); } }