BASIC4MCU | 질문게시판 | atmega128 질문있습니다!
페이지 정보
작성자 wnelwldh 작성일2018-12-13 19:46 조회7,091회 댓글1건
https://www.basic4mcu.com/bbs/board.php?bo_table=gac&wr_id=6846
첨부파일
본문
atmega128로 다른분이 올려두신 코드를 뜯어보면서 공부중입니다! 제가 찾은 코드가 모스부호 코드인데 동작시켜보면서 할려고하니까... 컴파일이 잘못됬는지 동작을 아예안하더라구요...핀설정을 바꿔도 똑같습니다..ㅠㅠ..제가 핀코드를 잘못설정한것인지...ㅠㅠ혹시 핀 코드변경을 도와주실수 있으실까요???
버튼을 누르면 누른시간만큼을 측정해서 모스부호화 시켜 입력받으며 출력으로 모스부호를 복호화해서 LCD로 나오게 하는 코드입니다ㅠㅠ
저는 atmega128 스타터키트를 사용하구요! 보드회로랑 소스코드 남깁니다...ㅠㅠ
#include <avr/io.h>#include <avr/interrupt.h>#define LCD_SEG_DATABUS (*(volatile unsigned char *)0x1100) // LCD/FND data#define LCD_FND_CONTROL (*(volatile unsigned char *)0x1200) // LCD/FND control signal 상위 4bit:FND, 하위 4bit:LCDvoid MCU_initialize(void); // initialize ATmege128 MCUvoid Delay_us(unsigned char time_us); // time delay for usvoid Delay_ms(unsigned int time_ms); // time delay for msvoid Beep(void);void TIMER_initialize(void);void LCD_command(char command); // write a command(instruction) to text LCDvoid LCD_initialize(void); // initialize text LCD modulevoid LcdPutchar(char ch);void LCD_string(char command, char *string); // display a string on LCDvoid LcdStringXY(char x, char y,char *string); // display a string on LCDvoid LcdClearDisplay(void);void LcdReturnHome(void);void LcdEntryModeSet(char right,char shift);void LcdDisplayOnOff(char on, char cursor, char blink);void LcdScreenDisplayShift(char screen, char right);void LcdFunctionSet(char bits, char lines, char dots);void SetCGRamAddress(char address);void SetDDRamAddress(char address);void LcdScreenShiftLeft(void);void LcdScreenShiftRight(void);void LcdCursorShiftLeft(void);void LcdCursorShiftRight(void);void LcdCursorXY(char x, char y); // 커서의 위치를 x,y로 이동void LcdPutStringXY(char x, char y, char *string);void LcdGotoXY(char x,char y,char ch);unsigned char EEPROM_read(unsigned int address);void EEPROM_write(unsigned int address, unsigned char byte);void ReadFromEPR(void); //종료문자 입력 시 EEPROM에 저장된 모든 문자를 LCD에 표시void DecodeMOS(void); //모스코드를 문자로 변환unsigned int Starting_edge=0, Ending_edge;unsigned char Ovf_count= 0;unsigned long Clocks=0;unsigned int Edge_flag = 0; //상승엣지/하강엣지 여부 저장 플래그unsigned char mos = '.'; //모스부호 임시 저장 변수unsigned char mos_string[5]={'0','0','0','0','0'}; //모스부호 표시 배열unsigned char CH = 0; //LCD 표시 문자 저장 변수unsigned int mos_count = 0; //모스부호 임시 표시 후 커서 이동용 카운터 변수unsigned int timeover_flag = 0; //상승엣지 후 일정 시간이 지남을 감지unsigned int timeover_flag_2 = 0; //상승엣지 후 일정 시간이 지남을 감지(버퍼)unsigned int cursor_x = 0; //문자 표시 후 커서 이동을 위한 변수 선언unsigned int i = 0; //배열 초기화 컨트롤 변수unsigned int EPR_c = 0; //EEPROM 주소 저장을 위한 컨트롤 변수ISR(SIG_INTERRUPT1) // SW6 INT : 문자입력 취소기능{//LCD에서 마지막에 입력된 문자 지움LcdGotoXY(cursor_x, 1, ' ');//EEPROM에서도 지움EEPROM_write(101+cursor_x,' ');//커서 위치 한 칸 앞으로cursor_x--;//EPR 컨트롤 변수 -1EPR_c--;}// T1 Overflow IntISR(TIMER1_OVF_vect) // 65536 * 64u Overflow INT{++Ovf_count; //오버플로우 발생 횟수//스위치를 땐 시점부터 시간을 잰다.if(timeover_flag == 1){timeover_flag_2++;}//스위치를 땐 상태이고 일정 시간이 지나면 모스부호가 문자로 치환if(((timeover_flag == 1)&&((Edge_flag) % 2)==1)){DecodeMOS(); //모스코드를 문자로 변환//문자 하나 if문에서 저장 후 하나의 문자만 출력LcdGotoXY(cursor_x, 1, CH);EEPROM_write(101+EPR_c,CH);//문자를 EEPROM에 저장//종료문자나오기 전까지 추가하기//EPR 컨트롤 변수 +1EPR_c++;mos_count=0; //모스부호 표시 다시 앞에서 부터 시작//나머지 지우기&변수 초기화for(i=cursor_x+1; i<16; i++)LcdGotoXY(i, 1, ' ');mos_string[0]='0';mos_string[1]='0';mos_string[2]='0';mos_string[3]='0';mos_string[4]='0';//커서 x 오른쪽으로 한 칸 이동cursor_x++;//스위치 땐 시점부터 시간 재는 변수 초기화timeover_flag_2 = 0;timeover_flag=0;}}// T1 Capture IntISR(TIMER1_CAPT_vect){Ending_edge= ICR1; // 캡쳐레지스터 Reading//홀수번째 falling 짝수번째 rising toggleif(((++Edge_flag) % 2)==1)TCCR1B &= ~(1<<ICES1); //Falling Edge detectingelse{TCCR1B |= (1<<ICES1); //Rising Edge detecting, 다른 설정 날라가지 않게 |(OR)timeover_flag = 1; //스위치 때는 순간 시간 감지 시작(문자변환을 위해)}//스위치 눌렀을 때 땠을 때 시간차를 측정(오버플로우 고려)Clocks= (unsigned long)Ending_edge + ((unsigned long)Ovf_count*0x10000) //0x10000 = 65536(16bit)- (unsigned long)Starting_edge; // 펄스 주기 측정, unsigned long : 32bitOvf_count= 0; // 초기화Starting_edge= Ending_edge; // 초기화 매 주기마다 캡쳐Clocks = (unsigned long)(Clocks * 64); // 시간 환산//인터럽트간 시간 LCD 표시LcdGotoXY(14, 0, (Clocks/1000000)+0x30);LcdGotoXY(15, 0, '.');LcdGotoXY(15, 0, ((Clocks%1000000)/100000)+0x30);if(((Edge_flag%2) == 1) && (Clocks >= 300000)){ //스위치 땠을 때 & 스위치 누른시간이 어느 정도 지났을 때 LCD에 DOT/DASH 표시if(Clocks <= 1000000)mos='.'; //0.5~1초 -> dotelse if(Clocks > 1000000)mos='-'; //1초 이상 -> dashmos_string[mos_count] = mos; //스위치 누른 시간에 따라 DOT/DASH를 배열에 저장LcdGotoXY(mos_count+cursor_x, 1, mos_string[mos_count]);mos_count++; //모스부호 표시 카운트 1 증가 (커서 오른쪽으로 한 칸 이동)//두 번째 줄 16칸이 넘어가면 LCD 클리어if((cursor_x+mos_count)==17){for(i=0; i<16; i++){//아랫줄 클리어LcdGotoXY(i, 1, ' ');}//MOS부호 정보, 위치 초기화mos_string[0]='0';mos_string[1]='0';mos_string[2]='0';mos_string[3]='0';mos_string[4]='0';mos_count=0;cursor_x=0;}}}int main(void){MCU_initialize(); // Initialize MCU//Beep();LCD_initialize(); // LCD module initializeLCD_string(0x80," Morse Code "); // display titleLCD_string(0xC0," ");TIMER_initialize(); // Timer initialize//INT1(SW6) Register 설정EIFR = 0x00; // External IRQ Flag ClearEIMSK = 0x02; // External IRQ 1 EnableEICRA = 0x08; // External IRQ 1 Detect (Falling)sei(); // Global interrupt enablewhile(1){Delay_ms(10);}}void MCU_initialize(void) /* initialize ATmege128 MCU */{MCUCR = 0x80; // Enable the external memory and I/OXMCRA = 0x00; // 0x1100-0xFFFF = 0 waitXMCRB = 0x86; // Enable the bus keeper, use PC2-PC7 is Port, PC0-PC1 is address//PORTA is BusDDRB = 0xFF; // PORTB = Output (LED1-8)PORTB = 0xFF; // PORTB is High (LED ALL OFF)DDRC = 0xFC; // PORTC : 0~1 is Address bus, 2~7 is I/OPORTC = 0x00; // PORTC is LowDDRD = 0x80; // PORTD PIN7 is Buzzer, PIN0~6 is S/W, UART, CounterPORTD = 0x80; // PORTD PIN7 is High : Buzzer OffDDRE = 0xFC; // PORTE PIN2~7 is Output, PIN0~1 is UARTPORTE = 0x00; // PORTE is LowDDRF = 0xFC; // PORTF : 0,1 is ADC InputPORTF = 0x00; // PORTF is LowLCD_FND_CONTROL = 0xF0; // FND & LCD Disable}void TIMER_initialize(){TCCR1A= 0x0000; // Normal(Capture) modeTCCR1B= (0<<ICES1) | (1<<CS12) | (0<<CS11) |(1<<CS10); // 1024 분주, Falling Edge detectingTCNT1= 0x0000;TIMSK = (1<<TOIE1) | (1<<TICIE1); // Enable Overflow Irq & Input Capture IrqTIFR = 0x00; // flag clear}void Beep(void) /* beep for 30 ms */{PORTD &= (~0x80); // = 0xF7; Buzzer on(Selection Pin LOW)Delay_ms(30); // Delay 50 msPORTD |= 0x80; // Buzzer off(Selection Pin HIGH)}void Delay_us(unsigned char time_us) /* time delay for us */{register unsigned char i;for(i = 0; i < time_us; i++){ // 4 cycle +asm volatile(" PUSH R0 "); // 2 cycle +asm volatile(" POP R0 "); // 2 cycle +asm volatile(" PUSH R0 "); // 2 cycle +asm volatile(" POP R0 "); // 2 cycle +asm volatile(" PUSH R0 "); // 2 cycle +asm volatile(" POP R0 "); // 2 cycle = 16 cycle = 1 us for 16MHz}}void Delay_ms(unsigned int time_ms) /* time delay for ms */{register unsigned int i;for(i = 0; i < time_ms; i++){Delay_us(250); Delay_us(250);Delay_us(250); Delay_us(250);}}//LCD 컨트롤 함수void LCD_initialize(void) /* initialize text LCD module */{LCD_FND_CONTROL = 0xF3; // E = 1, Rs = 1 (dummy write)LCD_FND_CONTROL = 0xF2; // E = 0, Rs = 1Delay_ms(5);LCD_command(0x38);//0011 1000 // function set(8 bit, 2 line, 5x7 dot)LCD_command(0x0C);//0000 1100 // display control(display ON, cursor OFF)LCD_command(0x06);//0000 0110 // entry mode set(increment, not shift)LCD_command(0x01);//0000 0001 // clear displayDelay_ms(5);}void LCD_command(char command) /* write a command(instruction) to text LCD */{LCD_FND_CONTROL = 0xF0; // E = 0, Rs = 0LCD_FND_CONTROL = 0xF1; // E = 1LCD_SEG_DATABUS = command; // output commandasm volatile(" PUSH R0 "); // delay for about 250 nsasm volatile(" POP R0 ");LCD_FND_CONTROL = 0xF0; // E = 0Delay_us(50);}void LcdPutchar(char ch) // 현재 위치(커서)에 문자 한개 쓰기{LCD_FND_CONTROL = 0xF2; // E = 0, Rs = 1LCD_FND_CONTROL = 0xF3; // E = 1LCD_SEG_DATABUS = ch; // output dataasm volatile(" PUSH R0 "); // delay for about 250 nsasm volatile(" POP R0 ");LCD_FND_CONTROL = 0xF2; // E = 0Delay_us(50);}void LCD_string(char command, char *string) /* display a string on LCD */{LCD_command(command); // start position of stringwhile(*string != '\0') // display string{LcdPutchar(*string);string++;}}void LcdStringXY(char x, char y,char *string) /* display a string on LCD */{char command = 0;switch(y){case 0: command = 0x80 + x;break;case 1: command = 0x80 + 0x40+x;break;default:break;}LCD_string(command, string); // start position of string}void LcdClearDisplay(void){LCD_command(0x01);}void LcdReturnHome(void){LCD_command(0x02);}void LcdEntryModeSet(char right,char shift){char command=0x04;command += right*2 + shift;LCD_command(command);}void LcdDisplayOnOff(char on, char cursor, char blink){char command=0x08;command += 0x04*on + 0x02*cursor + blink;LCD_command(command);}void LcdScreenDisplayShift(char screen, char right){char command= 0x10;command += 0x08*screen + 0x04*right;LCD_command(command);}void LcdFunctionSet(char bits, char lines, char dots){char command= 0x20;command += 0x10*bits + 0x08*lines +0x04*dots;LCD_command(command);}void SetCGRamAddress(char address){ char command= 0x40;command += address;LCD_command(command);}void SetDDRamAddress(char address){ char command= 0x80;command += address;LCD_command(command);}void LcdScreenShiftLeft(void) //LCD Left Shift{ LcdScreenDisplayShift(1,0); // command = 0x18;}void LcdScreenShiftRight(void){ LcdScreenDisplayShift(1,1); // command = 0x1C;}void LcdCursorShiftLeft(void) //LCD Left Shift{ LcdScreenDisplayShift(0,0); // command = 0x14;}void LcdCursorShiftRight(void){ LcdScreenDisplayShift(0,1); // command = 0x10;}void LcdCursorXY(char x, char y) // 커서의 위치를 x,y로 이동{ SetDDRamAddress( 0x40*y + x );}void LcdPutStringXY(char x, char y, char *string){ LcdCursorXY(x,y);while(*string) LcdPutchar(*string++);}void LcdGotoXY(char x,char y,char ch){char command;switch(y){case 0: command=0x80 + x;LCD_command(command);LcdPutchar(ch);break;case 1: command=0x80 + y*0x40 + x ;LCD_command(command);LcdPutchar(ch);break;default:break;}}unsigned char EEPROM_read(unsigned int address) // read from EEPROM{ while(EECR & (1<<EEWE)); // if EEWE = 1, waitEEAR = address; // if EEWE = 0, readEECR |= (1<<EERE); // EERE = 1return EEDR; // return data}void EEPROM_write(unsigned int address, unsigned char byte) // write to EEPROM{ while(EECR & (1<<EEWE)); // if EEWE = 1, waitEEAR = address; // if EEWE = 0, writeEEDR = byte;cli();EECR |= (1<<EEMWE); // EEMWE = 1EECR |= (1<<EEWE); // EEWE = 1sei();}void ReadFromEPR(void){//종료문자 입력 시 EEPROM에 저장된 모든 문자를 LCD에 출력unsigned int j = 0;for(j = 0; j < EPR_c; j++){unsigned int print_x = 0; //LCD 출력용 좌표 지정 변수//딜레이를 주면서 LCD에 EEPROM에 저장되어 있던 문자들을 출력한다.LcdGotoXY(print_x, 1, EEPROM_read(101+j));//끝에가면 지우고 나머지를 출력함..if((j % 15) ==0) print_x=0;print_x++;}}//모스코드를 문자로 변환 -> LCD출력void DecodeMOS(void){//3가지 신호 필요한 모스부호if((mos_string[0]=='.')&&(mos_string[1]=='-')&&(mos_string[2]=='0')&&(mos_string[3]=='0')&&(mos_string[4]=='0')){//LcdGotoXY(cursor_x, 1, 'A');CH='A';}else if((mos_string[0]=='-')&&(mos_string[1]=='.')&&(mos_string[2]=='.')&&(mos_string[3]=='0')&&(mos_string[4]=='0')){//LcdGotoXY(cursor_x, 1, 'D');CH='D';}else if((mos_string[0]=='.')&&(mos_string[1]=='0')&&(mos_string[2]=='0')&&(mos_string[3]=='0')&&(mos_string[4]=='0')){//LcdGotoXY(cursor_x, 1, 'E');CH='E';}else if((mos_string[0]=='-')&&(mos_string[1]=='-')&&(mos_string[2]=='.')&&(mos_string[3]=='0')&&(mos_string[4]=='0')){//LcdGotoXY(cursor_x, 1, 'G');CH='G';}else if((mos_string[0]=='.')&&(mos_string[1]=='.')&&(mos_string[2]=='0')&&(mos_string[3]=='0')&&(mos_string[4]=='0')){//LcdGotoXY(cursor_x, 1, 'I');CH='I';}else if((mos_string[0]=='-')&&(mos_string[1]=='.')&&(mos_string[2]=='-')&&(mos_string[3]=='0')&&(mos_string[4]=='0')){//LcdGotoXY(cursor_x, 1, 'K');CH='K';}else if((mos_string[0]=='-')&&(mos_string[1]=='-')&&(mos_string[2]=='0')&&(mos_string[3]=='0')&&(mos_string[4]=='0')){//LcdGotoXY(cursor_x, 1, 'M');CH='M';}else if((mos_string[0]=='-')&&(mos_string[1]=='.')&&(mos_string[2]=='0')&&(mos_string[3]=='0')&&(mos_string[4]=='0')){//LcdGotoXY(cursor_x, 1, 'N');CH='N';}else if((mos_string[0]=='-')&&(mos_string[1]=='-')&&(mos_string[2]=='-')&&(mos_string[3]=='0')&&(mos_string[4]=='0')){//LcdGotoXY(cursor_x, 1, 'O');CH='O';}else if((mos_string[0]=='.')&&(mos_string[1]=='-')&&(mos_string[2]=='.')&&(mos_string[3]=='0')&&(mos_string[4]=='0')){//LcdGotoXY(cursor_x, 1, 'R');CH='R';}else if((mos_string[0]=='.')&&(mos_string[1]=='.')&&(mos_string[2]=='.')&&(mos_string[3]=='0')&&(mos_string[4]=='0')){//LcdGotoXY(cursor_x, 1, 'S');CH='S';}else if((mos_string[0]=='-')&&(mos_string[1]=='0')&&(mos_string[2]=='0')&&(mos_string[3]=='0')&&(mos_string[4]=='0')){//LcdGotoXY(cursor_x, 1, 'T');CH='T';}else if((mos_string[0]=='.')&&(mos_string[1]=='.')&&(mos_string[2]=='-')&&(mos_string[3]=='0')&&(mos_string[4]=='0')){//LcdGotoXY(cursor_x, 1, 'U');CH='U';}else if((mos_string[0]=='.')&&(mos_string[1]=='-')&&(mos_string[2]=='-')&&(mos_string[3]=='0')&&(mos_string[4]=='0')){//LcdGotoXY(cursor_x, 1, 'W');CH='W';}//4가지 신호 필요한 모스부호 12개else if((mos_string[0]=='-')&&(mos_string[1]=='.')&&(mos_string[2]=='.')&&(mos_string[3]=='.')&&(mos_string[4]=='0')){//LcdGotoXY(cursor_x, 1, 'B');CH='B';}else if((mos_string[0]=='-')&&(mos_string[1]=='.')&&(mos_string[2]=='-')&&(mos_string[3]=='.')&&(mos_string[4]=='0')){//LcdGotoXY(cursor_x, 1, 'C');CH='C';}else if((mos_string[0]=='.')&&(mos_string[1]=='.')&&(mos_string[2]=='-')&&(mos_string[3]=='.')&&(mos_string[4]=='0')){//LcdGotoXY(cursor_x, 1, 'F');CH='F';}else if((mos_string[0]=='.')&&(mos_string[1]=='.')&&(mos_string[2]=='.')&&(mos_string[3]=='.')&&(mos_string[4]=='0')){//LcdGotoXY(cursor_x, 1, 'H');CH='H';}else if((mos_string[0]=='.')&&(mos_string[1]=='-')&&(mos_string[2]=='-')&&(mos_string[3]=='-')&&(mos_string[4]=='0')){//LcdGotoXY(cursor_x, 1, 'J');CH='J';}else if((mos_string[0]=='.')&&(mos_string[1]=='-')&&(mos_string[2]=='.')&&(mos_string[3]=='.')&&(mos_string[4]=='0')){//LcdGotoXY(cursor_x, 1, 'L');CH='L';}else if((mos_string[0]=='.')&&(mos_string[1]=='-')&&(mos_string[2]=='-')&&(mos_string[3]=='.')&&(mos_string[4]=='0')){//LcdGotoXY(cursor_x, 1, 'P');CH='P';}else if((mos_string[0]=='-')&&(mos_string[1]=='-')&&(mos_string[2]=='.')&&(mos_string[3]=='-')&&(mos_string[4]=='0')){//LcdGotoXY(cursor_x, 1, 'Q');CH='Q';}else if((mos_string[0]=='.')&&(mos_string[1]=='.')&&(mos_string[2]=='.')&&(mos_string[3]=='-')&&(mos_string[4]=='0')){//LcdGotoXY(cursor_x, 1, 'V');CH='V';}else if((mos_string[0]=='-')&&(mos_string[1]=='.')&&(mos_string[2]=='.')&&(mos_string[3]=='-')&&(mos_string[4]=='0')){//LcdGotoXY(cursor_x, 1, 'X');CH='X';}else if((mos_string[0]=='-')&&(mos_string[1]=='.')&&(mos_string[2]=='-')&&(mos_string[3]=='-')&&(mos_string[4]=='0')){//LcdGotoXY(cursor_x, 1, 'Y');CH='Y';}else if((mos_string[0]=='-')&&(mos_string[1]=='-')&&(mos_string[2]=='.')&&(mos_string[3]=='.')&&(mos_string[4]=='0')){//LcdGotoXY(cursor_x, 1, 'Z');CH='Z';}//5가지 신호 필요한 모스부호 10개else if((mos_string[0]=='.')&&(mos_string[1]=='-')&&(mos_string[2]=='-')&&(mos_string[3]=='-')&&(mos_string[4]=='-')){//LcdGotoXY(cursor_x, 1, '1');CH='1';}else if((mos_string[0]=='.')&&(mos_string[1]=='.')&&(mos_string[2]=='-')&&(mos_string[3]=='-')&&(mos_string[4]=='-')){//LcdGotoXY(cursor_x, 1, '2');CH='2';}else if((mos_string[0]=='.')&&(mos_string[1]=='.')&&(mos_string[2]=='.')&&(mos_string[3]=='-')&&(mos_string[4]=='-')){//LcdGotoXY(cursor_x, 1, '3');CH='3';}else if((mos_string[0]=='.')&&(mos_string[1]=='.')&&(mos_string[2]=='.')&&(mos_string[3]=='.')&&(mos_string[4]=='-')){//LcdGotoXY(cursor_x, 1, '4');CH='4';}else if((mos_string[0]=='.')&&(mos_string[1]=='.')&&(mos_string[2]=='.')&&(mos_string[3]=='.')&&(mos_string[4]=='.')){//LcdGotoXY(cursor_x, 1, '5');CH='5';}else if((mos_string[0]=='-')&&(mos_string[1]=='.')&&(mos_string[2]=='.')&&(mos_string[3]=='.')&&(mos_string[4]=='.')){//LcdGotoXY(cursor_x, 1, '6');CH='6';}else if((mos_string[0]=='-')&&(mos_string[1]=='-')&&(mos_string[2]=='.')&&(mos_string[3]=='.')&&(mos_string[4]=='.')){//LcdGotoXY(cursor_x, 1, '7');CH='7';}else if((mos_string[0]=='-')&&(mos_string[1]=='-')&&(mos_string[2]=='-')&&(mos_string[3]=='.')&&(mos_string[4]=='.')){//LcdGotoXY(cursor_x, 1, '8');CH='8';}else if((mos_string[0]=='-')&&(mos_string[1]=='-')&&(mos_string[2]=='-')&&(mos_string[3]=='-')&&(mos_string[4]=='.')){//LcdGotoXY(cursor_x, 1, '9');CH='9';}else if((mos_string[0]=='-')&&(mos_string[1]=='-')&&(mos_string[2]=='-')&&(mos_string[3]=='-')&&(mos_string[4]=='-')){//LcdGotoXY(cursor_x, 1, '0');CH='0';}//공백과 끝 문자 지정else if((mos_string[0]=='-')&&(mos_string[1]=='.')&&(mos_string[2]=='-')&&(mos_string[3]=='.')&&(mos_string[4]=='-')){LcdGotoXY(cursor_x, 1, ' ');}//Space 문자else if((mos_string[0]=='.')&&(mos_string[1]=='-')&&(mos_string[2]=='.')&&(mos_string[3]=='-')&&(mos_string[4]=='.')){ReadFromEPR();Delay_ms(500);Beep();Delay_ms(500);Beep();//EPR 컨트롤 변수 초기화EPR_c = 0;}//End 문자else{//인식불가 모스부호인 경우 '?' 표시LcdGotoXY(cursor_x, 1, '?');}}
댓글 1
조회수 7,091master님의 댓글
master 작성일원본 출처 링크를 적어보세요