Atmega 온도센서 및 세그먼트 표시
#include #include #include #include #include #include float ntc_val;float temperature;float sensor_adc = 0;unsigned int trans_temp = 0; int SG_data[10]={0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f};int SGD_data[10]={0xBf, 0x86, 0xDb, 0xCf, 0xE6, 0xEd, 0xFd, 0x87, 0xff, 0xEf};int SG_PORTC[5]={0, 0x21, 0x22, 0x24, 0x28};0){ PORTC=~SG_PORTC[1]; PORTA=SG_data[digit[3]]; delay_ms(1); P..
2017. 10. 19.
Atemga 세그먼트 출력
#include #include #include #include int D_time=1;int SS_data[10]={0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f};int SS_PORTC[5]={0, 0x01, 0x02, 0x04, 0x08};int what=3232;int where[4]={0,0,0,0};void init_port(void){ PORTA = 0x00; DDRA = 0xff; PORTB = 0x00; DDRB = 0xff; PORTC = 0x00; DDRC = 0xff; PORTD = 0x00; DDRD = 0xff; PORTE = 0x00; DDRE = 0xff; PORTF = 0x00; DDRF = 0xff; PORTG =..
2017. 10. 19.