/* Main.ino file generated by New Project wizard
*
* Created: 수 5 31 2023
* Processor: Arduino Uno
* Compiler: Arduino AVR
*/
#include "my_arduino_lib_v2_0.h"
#include "my_arduino_uart_lib.h"
#define key_irq 2
#define vr A5
int cnt_16 = 1234;
void serialEvent()
//interrupt[USART0_RXC] void usart0_rx_int(void)
//ISR(USART0_RX_vect)
{
// tx_send(UDR0);
Serial.println(Serial.read());
Serial.println("Test OK");
}
void setup()
{ // put your setup code here, to run once:
pinMode(key_irq, INPUT_PULLUP);
DDRB = 0x38;
pinMode(1, OUTPUT);
Serial.begin(9600);
uart_init();
DDRD = 0xf2;
PORTD = 0xf2;
SREG = 0x80;
sei();
}
void loop()
{ // put your main code here, to run repeatedly:
/*
PORTD = 0x10;
Serial.println("NO-1");
PORTD = 0x20;
Serial.println("NO-2");
PORTD = 0x40;
Serial.println("NO-3");
delay(200);
*/
/*
for(int k = 1; k<=3; k++)
{
PORTD = (k<<= 4);
Serial.println("song 과자 완판");
tx_send('W');
tx_str(" Song 1234 @$$%^");
tx("\n\r Counter = ", 13);
tx_send(cnt_16/1000 + 0x30);
tx_send(cnt_16%1000/100 + '0');
tx_send(cnt_16%100/10 + 0x30);
tx_send(cnt_16%10 + '0');
tx_send('\n');
tx_send('\r');
cnt_16++;
delay(500);
}
*/
}