질문게시판 > Atmega128a 디지털시계

TODAY1,426 TOTAL2,172,625
사이트 이용안내
Login▼/회원가입
최신글보기 질문게시판 기술자료 동영상강좌

아두이노 센서 ATMEGA128 PWM LED 초음파 AVR 블루투스 LCD UART 모터 적외선


BASIC4MCU | 질문게시판 | Atmega128a 디지털시계

페이지 정보

작성자 아트메가잘하고싶다 작성일2019-05-25 23:45 조회6,663회 댓글3건

본문

	

 

#include <avr/io.h>
#include "OK-128LCD.h"
#include "OK-128TFT.h"
#include "OK-128TFT_large.h"

 

void TFT_string_largey(U08 xChar, U08 yChar, U16 colorfore, U16 colorback, char *str);  // write TFT-LCD string
void TFT_string_largeyy(U08 xChar, U08 yChar, U16 colorfore, U16 colorback, char *str); // write TFT-LCD string
void TFT_English_largey(U08 code);
void TFT_English_largeyy(U08 code);
void TFT_hexadecimal_largey(U32 number, U08 digit);
  
void DS1307_initialize(void);                                                           // initialize DS1307 RTC
unsigned char DS1307_read(U08 address);                                                 // read DS1307
void DS1307_write(U08 address, U08 TxD);                                                // write DS1307
void Display_time(void);                                                                // display DS1307 time
unsigned char BCD_increment(U08 number);                                                // BCD increment
unsigned char BCD_decrement(U08 number);                                                // BCD decrement
void Cursor_left(void);                                                                 // go cursor left
void Cursor_right(void);                                                                // go cursor right
void Increment(void);                                                                   // increment time
void Decrement(void);                                                                   // decrement time

 


prog_uchar S_font_large[128][210] = {                                                                                                                   // 30X56 pixel
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
 
{0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00, //0
0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00}

,

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //1
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}
,

{0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00, //2
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xFE,0xFE,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0F,0x0F,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,
0X00,0X00,0X00,0X00,0X00,0X00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0X00,0X00,0X00,0X00,0X00,0X00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0x00,0x00,0x00,0x00,0x00,0x00}
,

{0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00, //3
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00}
,

{0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00, //4
0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x1F,0x1F,0x1F,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00}
,

{0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x00, //5
0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x1F,0x1F,0x1F,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0xFC,0xFC,0xFC,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00}
,

{0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //6
0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0xFC,0xFC,0xFC,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00}
,

{0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00, //7
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00}
,

{0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00, //8
0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00}
,

{0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00, //9
0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x1F,0x1F,0x1F,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00}
,
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}

};


prog_uchar X_font_large[128][168] =                                                                                                                     //24X56 pixel
{
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,                               //세미콜론
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}
,
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}


};

 

 

unsigned char year, month, date, weekday, hour, minute, second;

int main(void)
{
  unsigned char key;

  MCU_initialize();                             // initialize MCU and kit
  Delay_ms(50);                                 // wait for system stabilization
  LCD_initialize();                             // initialize text LCD module
  TFT_initialize();                             // initialize TFT-LCD module
  Beep();
 
 
  LCD_string(0x80," OK-128TFT V1.0 ");          // display title
  LCD_string(0xC0,"   Exp19_2R.c    ");
  TFT_landscape( );

  TFT_cursor(White);                            // display cursor by White color
  Xcursor = 20;
  Ycursor = 25;
 

  TFT_string( 10, 3, Violet, Black," 홍길동의 디지털 시계 ");   // display title
  TFT_string_large( 9,7, Silver,  Black,  "2019/05/22 ");
  TFT_string_large( 7,11, Orange,Black,  "(수요일)");
  TFT_string_large( 16,11, LightGrey, Black,  "오후 ");
  TFT_string_largeyy( 7,18, White, Black,  "      ");
  TFT_string_large( 0,27, Magenta, Black,  "*******(제작:홍길동)*******");
 

  DS1307_initialize();                     // initialize DS1307 RTC

  while(1)
    { key = Key_input();                   // key input

      switch(key)
        { case KEY1 : Cursor_left();       // if KEY1, go cursor left
                      break;
          case KEY2 : Cursor_right();      // if KEY2, go cursor right
                      break;
          case KEY3 : Increment();         // if KEY3, increment time
                      break;
     case KEY4 : Decrement();              // if KEY4, decrement time
                      break;
          default   : Display_time();      // display time
                 break;
        }
    }
}

/* ---------------------------------------------------------------------------- */
/*      디지털 시계 관련 함수                  */
/* ---------------------------------------------------------------------------- */

void DS1307_initialize(void)            /* initialize DS1307 RTC */
{
  TWBR = 18;                            // 100kHz(TWBR=18, TWPS=1)
  TWSR = 0x01;

  second =  DS1307_read(0x00);          // if CH = 1, initialize
  hour =  DS1307_read(0x02);            // if 24 hour system, initialize

  if(((second & 0x80) == 0x80) || ((hour & 0x40) == 0x00))
    { DS1307_write(0x00, 0x00);         // second = 0x00
      DS1307_write(0x01, 0x00);         // minute = 0x00
      DS1307_write(0x02, 0x12 | 0x40);      // hour = 0x12 AM (12 hour system)
      DS1307_write(0x03, 0x01);         // weekday = 0x01(Sunday)
      DS1307_write(0x04, 0x05);         // date = 0x05
      DS1307_write(0x05, 0x12);         // month = 0x12
      DS1307_write(0x06, 0x10);         // year = 0x2010
    }
}

unsigned char DS1307_read(U08 address)  /* read DS1307 */
{
  unsigned char RxD;

  TWCR = 0xA4;               // START condition
  while(((TWCR & 0x80) == 0x00) || ((TWSR & 0xF8) != 0x08)); // START complete ?

  TWDR = 0xD0;               // SLA+W
  TWCR = 0x84;
  while(((TWCR & 0x80) == 0x00) || ((TWSR & 0xF8) != 0x18)); // SLA+W complete ?

  TWDR = address;            // DS1307 address
  TWCR = 0x84;
  while(((TWCR & 0x80) == 0x00) || ((TWSR & 0xF8) != 0x28)); // address complete ?

  TWCR = 0xA4;               // REPEATED START condition
  while(((TWCR & 0x80) == 0x00) || ((TWSR & 0xF8) != 0x10)); // START complete ?

  TWDR = 0xD1;               // SLA+R
  TWCR = 0x84;
  while(((TWCR & 0x80) == 0x00) || ((TWSR & 0xF8) != 0x40)); // SLA+R complete ?

  TWCR = 0x84;               // read time data with no acknowledge
  while(((TWCR & 0x80) == 0x00) || ((TWSR & 0xF8) != 0x58)); // data complete ?
  RxD = TWDR;                // read data

  TWCR = 0x94;               // STOP condition
  Delay_us(10);

  return RxD;
}

void DS1307_write(U08 address, U08 TxD)                   /* write DS1307 */
{
  TWCR = 0xA4;               // START condition
  while(((TWCR & 0x80) == 0x00) || ((TWSR & 0xF8) != 0x08)); // START complete ?

  TWDR = 0xD0;               // SLA+W
  TWCR = 0x84;
  while(((TWCR & 0x80) == 0x00) || ((TWSR & 0xF8) != 0x18)); // SLA+W complete ?

  TWDR = address;            // DS1307 address
  TWCR = 0x84;
  while(((TWCR & 0x80) == 0x00) || ((TWSR & 0xF8) != 0x28)); // address complete ?

  TWDR = TxD;               // write time data
  TWCR = 0x84;
  while(((TWCR & 0x80) == 0x00) || ((TWSR & 0xF8) != 0x28)); // data complete ?

  TWCR = 0x94;               // STOP condition
  Delay_us(10);
}

void Display_time(void)            /* display DS1307 time */
{
  TFT_xy(9,7); TFT_color(Silver,Black);       // display year
  TFT_hexadecimal_large(0x20, 2);
  year = DS1307_read(0x06);
  TFT_hexadecimal_large(year,2);
  TFT_xy(14,7); TFT_color(Silver,Black);      // display month
  month = DS1307_read(0x05);
  TFT_hexadecimal_large(month,2);
  TFT_xy(17,7); TFT_color(Silver,Black);      // display date
  date = DS1307_read(0x04);
  TFT_hexadecimal_large(date,2);
  weekday = DS1307_read(0x03);                // display weekday
  if(weekday == 0x01)      TFT_string_large(8,11, Orange,Black, "일");
  else if(weekday == 0x02) TFT_string_large(8,11, Orange,Black, "월");
  else if(weekday == 0x03) TFT_string_large(8,11, Orange,Black, "화");
  else if(weekday == 0x04) TFT_string_large(8,11, Orange,Black, "수");
  else if(weekday == 0x05) TFT_string_large(8,11, Orange,Black, "목");
  else if(weekday == 0x06) TFT_string_large(8,11, Orange,Black, "금");
  else if(weekday == 0x07) TFT_string_large(8,11, Orange,Black, "토");
  TFT_xy(3,18); TFT_color(White,Black);     // display hour
  hour = DS1307_read(0x02);
  TFT_hexadecimal_largey(hour & 0x1F,2);
  if((hour & 0x20) == 0x00) TFT_string_large(18,11, LightGrey,Black, "전");
  else                      TFT_string_large(18,11, LightGrey,Black, "후");
  TFT_xy(12,18); TFT_color(White,Black);   // display minute
  minute = DS1307_read(0x01);
  TFT_hexadecimal_largey(minute,2);
  TFT_xy(21,18); TFT_color(White,Black);   // display second
  second = DS1307_read(0x00);
  TFT_hexadecimal_largey(second & 0x7F,2);
  TFT_xy(28,18); TFT_color(White,Black);   // display home
  TFT_English_largey(' ');
}

unsigned char BCD_increment(U08 number)      /* BCD increment */
{
  unsigned char i;

  i = (number >> 4)*10 + (number & 0x0F);       // convert BCD to binary
  i++;                                          // incrment
  i = ((i/10) << 4) + (i % 10);                 // convert binary to BCD
  return i;
}

unsigned char BCD_decrement(U08 number)      /* BCD decrement */
{
  unsigned char i;

  i = (number >> 4)*10 + (number & 0x0F);       // convert BCD to binary
  i--;                                          // decrement
  i = ((i/10) << 4) + (i % 10);                 // convert binary to BCD
  return i;
}

void Cursor_left(void)                    /* go cursor left */
{
  if     ((Xcursor == 20) && (Ycursor == 25)) { Xcursor = 10; Ycursor = 25; }
  else if((Xcursor == 10) && (Ycursor == 25)) { Xcursor =  4; Ycursor = 25; }
  else if((Xcursor ==  4) && (Ycursor == 25)) { Xcursor = 18; Ycursor = 11; }
  else if((Xcursor == 18) && (Ycursor == 11)) { Xcursor =  8; Ycursor = 11; }
  else if((Xcursor ==  8) && (Ycursor == 11)) { Xcursor = 18; Ycursor =  7; }
  else if((Xcursor == 18) && (Ycursor ==  7)) { Xcursor = 15; Ycursor =  7; }
  else if((Xcursor == 15) && (Ycursor ==  7)) { Xcursor = 12; Ycursor =  7; }
  else if((Xcursor == 12) && (Ycursor ==  7)) { Xcursor = 20; Ycursor = 25; }
 
}

void Cursor_right(void)                   /* go cursor right */
{
  if     ((Xcursor == 20) && (Ycursor == 25)) { Xcursor = 12; Ycursor =  7; }
  else if((Xcursor == 12) && (Ycursor ==  7)) { Xcursor = 15; Ycursor =  7; }
  else if((Xcursor == 15) && (Ycursor ==  7)) { Xcursor = 18; Ycursor =  7; }
  else if((Xcursor == 18) && (Ycursor ==  7)) { Xcursor =  8; Ycursor = 11; }
  else if((Xcursor ==  8) && (Ycursor == 11)) { Xcursor = 18; Ycursor = 11; }
  else if((Xcursor == 18) && (Ycursor == 11)) { Xcursor =  4; Ycursor = 25; }
  else if((Xcursor ==  4) && (Ycursor == 25)) { Xcursor = 10; Ycursor = 25; }
  else if((Xcursor == 10) && (Ycursor == 25)) { Xcursor = 20; Ycursor = 25; }
 
}

void Increment(void)                       /* increment time */
{
  if((Xcursor ==  12) && (Ycursor == 7))       // in case of year
    { year = DS1307_read(0x06);
      if(year == 0x99)      year = 0x00;
      else                  year = BCD_increment(year);
      DS1307_write(0x06,year);
    }
  else if((Xcursor == 15) && (Ycursor == 7))   // in case of month
    { month = DS1307_read(0x05);
      if(month == 0x12)     month = 0x01;
      else                  month = BCD_increment(month);
      DS1307_write(0x05,month);
    }
  else if((Xcursor == 18) && (Ycursor == 7))   // in case of date
    { date = DS1307_read(0x04);
      if(date == 0x31)      date = 0x01;
      else                  date = BCD_increment(date);
      DS1307_write(0x04,date);
    }
  else if((Xcursor == 8) && (Ycursor == 11))   // in case of weekday
    { weekday = DS1307_read(0x03);
      if(weekday == 0x07)   weekday = 0x01;
      else                  weekday++;
      DS1307_write(0x03,weekday);
    }
  else if((Xcursor == 18) && (Ycursor == 11))  // in case of AM/PM
    { hour = DS1307_read(0x02);
      if((hour & 0x20) == 0x00) hour |= 0x20;
      else                      hour &= 0xDF;
      DS1307_write(0x02,hour);
    }
  else if((Xcursor == 4) && (Ycursor == 25))   // in case of hour
    { hour = DS1307_read(0x02);
      if((hour & 0x1F) == 0x12) hour = (hour & 0xE0) + 0x01;
      else                      hour = BCD_increment(hour);
      DS1307_write(0x02,hour);
    }
  else if((Xcursor == 10) && (Ycursor == 25))  // in case of minute
    { minute = DS1307_read(0x01);
      if(minute == 0x59)    minute = 0x00;
      else                  minute = BCD_increment(minute);
      DS1307_write(0x01,minute);
    }
  else if((Xcursor == 20) && (Ycursor == 25))  // in case of second
    { second = DS1307_read(0x00);
      if(second == 0x59)    second = 0x00;
      else                  second = BCD_increment(second);
      DS1307_write(0x00,second);
    }
}

void Decrement(void)                        /* decrement time */
{
  if((Xcursor ==  12) && (Ycursor == 7))       // in case of year
    { year = DS1307_read(0x06);
      if(year == 0x00)      year = 0x99;
      else                  year = BCD_decrement(year);
      DS1307_write(0x06,year);
    }
  else if((Xcursor == 15) && (Ycursor == 7))   // in case of month
    { month = DS1307_read(0x05);
      if(month == 0x01)     month = 0x12;
      else                  month = BCD_decrement(month);
      DS1307_write(0x05,month);
    }
  else if((Xcursor == 18) && (Ycursor == 7))   // in case of date
    { date = DS1307_read(0x04);
      if(date == 0x01)      date = 0x31;
      else                  date = BCD_decrement(date);
      DS1307_write(0x04,date);
    }
  else if((Xcursor == 8) && (Ycursor == 11))   // in case of weekday
    { weekday = DS1307_read(0x03);
      if(weekday == 0x01)   weekday = 0x07;
      else                  weekday--;
      DS1307_write(0x03,weekday);
    }
  else if((Xcursor == 18) && (Ycursor == 11))  // in case of AM/PM
    { hour = DS1307_read(0x02);
      if((hour & 0x20) == 0x00) hour |= 0x20;
      else                      hour &= 0xDF;
      DS1307_write(0x02,hour);
    }
  else if((Xcursor == 4) && (Ycursor == 25))   // in case of hour
    { hour = DS1307_read(0x02);
      if((hour & 0x1F) == 0x01) hour = (hour & 0xE0) + 0x12;
      else                      hour = BCD_decrement(hour);
      DS1307_write(0x02,hour);
    }
  else if((Xcursor == 10) && (Ycursor == 25))  // in case of minute
    { minute = DS1307_read(0x01);
      if(minute == 0x00)    minute = 0x59;
      else                  minute = BCD_decrement(minute);
      DS1307_write(0x01,minute);
    }
  else if((Xcursor == 20) && (Ycursor == 25))  // in case of second
    { second = DS1307_read(0x00);
      if(second == 0x00)    second = 0x59;
      else                  second = BCD_decrement(second);
      DS1307_write(0x00,second);
    }
}

 

   
void TFT_English_largey(U08 code)      /* write a English ASCII character(30x56 pixel) */
{
  unsigned char data, x, y;
  unsigned int pixel[30][56];
 

  for(x = 0; x < 30; x++)              // read English ASCII font
    { data = pgm_read_byte(&S_font_large[code][x]);
      for(y = 0; y < 8; y++)
        { if(data & 0x01) pixel[x][y] = foreground;
     else            pixel[x][y] = background;
     data = data >> 1;
   }
    }

  for(x = 0; x < 30; x++)
    { data = pgm_read_byte(&S_font_large[code][x+30]);
      for(y = 0; y < 8; y++)
   { if(data & 0x01) pixel[x][y+8] = foreground;
     else            pixel[x][y+8] = background;
     data = data >> 1;
   }
    }

  for(x = 0; x < 30; x++)
    { data = pgm_read_byte(&S_font_large[code][x+60]);
      for(y = 0; y < 8; y++)
   { if(data & 0x01) pixel[x][y+16] = foreground;
     else            pixel[x][y+16] = background;
     data = data >> 1;
   }
    }
    for(x = 0; x < 30; x++)
    { data = pgm_read_byte(&S_font_large[code][x+90]);
      for(y = 0; y < 8; y++)
   { if(data & 0x01) pixel[x][y+24] = foreground;
     else            pixel[x][y+24] = background;
     data = data >> 1;
   }
    }
    for(x = 0; x < 30; x++)
    { data = pgm_read_byte(&S_font_large[code][x+120]);
      for(y = 0; y < 8; y++)
   { if(data & 0x01) pixel[x][y+32] = foreground;
     else            pixel[x][y+32] = background;
     data = data >> 1;
   }
    }
    for(x = 0; x < 30; x++)
    { data = pgm_read_byte(&S_font_large[code][x+150]);
      for(y = 0; y < 8; y++)
   { if(data & 0x01) pixel[x][y+40] = foreground;
     else            pixel[x][y+40] = background;
     data = data >> 1;
   }
    }
    for(x = 0; x < 30; x++)
    { data = pgm_read_byte(&S_font_large[code][x+180]);
      for(y = 0; y < 8; y++)
   { if(data & 0x01) pixel[x][y+48] = foreground;
     else            pixel[x][y+48] = background;
     data = data >> 1;
   }
    }
   
  if(Xcharacter >= XcharacterLimit)           // end of line ?
    { Xcharacter = 0;
      Ycharacter += 3;
      if(Ycharacter >= (YcharacterLimit-2))   // end of screen ?
        Ycharacter = 0;
    }

  else
    { for(y = 0; y < 56; y++)                 // if yes, write a character
        for(x = 0; x < 30; x++)
          TFT_pixel(Xcharacter*10 + x, Ycharacter*8 + y, pixel[x][y]);
    }

  Xcharacter += 3;                            // go to next position

   }
   

       

void TFT_English_largeyy(U08 code)      /* write a English ASCII character(24x56 pixel) */
{
  unsigned char data, x, y;
  unsigned int pixel[24][56];
 
  for(x = 0; x < 24; x++)               // read English ASCII font
    { data = pgm_read_byte(&X_font_large[code][x]);
      for(y = 0; y < 8; y++)
        { if(data & 0x01) pixel[x][y] = foreground;
     else            pixel[x][y] = background;
     data = data >> 1;
   }
    }

  for(x = 0; x < 24; x++)
    { data = pgm_read_byte(&X_font_large[code][x+24]);
      for(y = 0; y < 8; y++)
   { if(data & 0x01) pixel[x][y+8] = foreground;
     else            pixel[x][y+8] = background;
     data = data >> 1;
   }
    }

  for(x = 0; x < 24; x++)
    { data = pgm_read_byte(&X_font_large[code][x+48]);
      for(y = 0; y < 8; y++)
   { if(data & 0x01) pixel[x][y+16] = foreground;
     else            pixel[x][y+16] = background;
     data = data >> 1;
   }
    }
    for(x = 0; x < 24; x++)
    { data = pgm_read_byte(&X_font_large[code][x+72]);
      for(y = 0; y < 8; y++)
   { if(data & 0x01) pixel[x][y+24] = foreground;
     else            pixel[x][y+24] = background;
     data = data >> 1;
   }
    }
    for(x = 0; x < 24; x++)
    { data = pgm_read_byte(&X_font_large[code][x+96]);
      for(y = 0; y < 8; y++)
   { if(data & 0x01) pixel[x][y+32] = foreground;
     else            pixel[x][y+32] = background;
     data = data >> 1;
   }
    }
    for(x = 0; x < 24; x++)
    { data = pgm_read_byte(&X_font_large[code][x+120]);
      for(y = 0; y < 8; y++)
   { if(data & 0x01) pixel[x][y+40] = foreground;
     else            pixel[x][y+40] = background;
     data = data >> 1;
   }
    }
    for(x = 0; x < 24; x++)
    { data = pgm_read_byte(&X_font_large[code][x+144]);
      for(y = 0; y < 8; y++)
   { if(data & 0x01) pixel[x][y+48] = foreground;
     else            pixel[x][y+48] = background;
     data = data >> 1;
   }
    }
if(Xcharacter >= XcharacterLimit)             // end of line ?
    { Xcharacter = 0;
      Ycharacter += 3;
      if(Ycharacter >= (YcharacterLimit-2))   // end of screen ?
        Ycharacter = 0;
    }
else
    { for(y = 0; y < 56; y++)                 // if yes, write a character
        for(x = 0; x < 24; x++)
          TFT_pixel(Xcharacter*12 + x, Ycharacter*8 + y, pixel[x][y]);
    }

  Xcharacter += 2;                            // go to next position

   }
   

 

void TFT_string_largeyy(U08 xChar, U08 yChar, U16 colorfore, U16 colorback, char *str)
 {
  unsigned char ch1;
  unsigned int ch2;

  Xcharacter = xChar;
  Ycharacter = yChar;

  foreground = colorfore;
  background = colorback;

  while(*str)
    { ch1 = *str;
      str++;

      if(ch1 < 0x80)                    // English ASCII character
   TFT_English_largeyy(ch1);
      else                              // Korean
   { ch2 = (ch1 << 8) + (*str);
          str++;
     ch2 = KS_code_conversion(ch2);     // convert KSSM(완성형) to KS(조합형)
     TFT_Korean_large(ch2);
   }
   }

}

 


void TFT_hexadecimal_largey(U32 number, U08 digit)   /* display hexadecimal number */
{
  unsigned char i, character;

  if((digit == 0) || (digit > 8)) return;

  for(i = digit; i > 0; i--)
    { character = (number >> 4*(i-1)) & 0x0F;
      if(character < 10) TFT_English_largey(character + '0');
      else               TFT_English_largey(character - 10 + 'A');
    }
}


void TFT_string_largey(U08 xChar, U08 yChar, U16 colorfore, U16 colorback, char *str)   /* write TFT-LCD string */
{
  unsigned char ch1;
  unsigned int ch2;

  Xcharacter = xChar;
  Ycharacter = yChar;

  foreground = colorfore;
  background = colorback;

  while(*str)
    { ch1 = *str;
      str++;

      if(ch1 < 0x80)                  // English ASCII character
   TFT_English_largey(ch1);
      else                            // Korean
   { ch2 = (ch1 << 8) + (*str);
          str++;
     ch2 = KS_code_conversion(ch2);   // convert KSSM(완성형) to KS(조합형)
     TFT_Korean_large(ch2);
   }
   }

}

 

제가만든 폰트 30X56픽셀로 출력되는 시계 함수를 코딩해보았습니다...여기서 막힌게

1. 24X56크기의 세미콜론 : 이 출력되어야하는데, 그림과같이 번지는 그림이 나옵니다.. 이것을 해결하고싶습니다..

2. 년도,월,일,요일,오전or오후, 시, 분, 초 이렇게 8개의 좌표를 코딩해 key로 숫자를 증감하는 기능을 넣었습니다..

여기서 시,분,초에도 증감하는 기능은 있는데 그 아래에 커서모양 __이 출력이 안됩니다..이것을 해결하고싶습니다
 

  • BASIC4MCU 작성글 SNS에 공유하기
  • 페이스북으로 보내기
  • 트위터로 보내기
  • 구글플러스로 보내기

댓글 3

조회수 6,663

master님의 댓글

master 작성일

':'(0x3A)
콜론의 위치는 '9'(0x39) 다음입니다.
prog_uchar S_font_large[128][210] = {                                                                                                                  // 30X56 pixel
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
이 후에 '0'~'9'까지만 있는데요
삭제한 ':'를 추가해서 돌리세요

아트메가잘하고싶다님의 댓글

아트메가잘하고싶다 댓글의 댓글 작성일

콜론은 24x56으로 하고싶은데, 말씀하신대로하면 30x56로 출력이되는것 아닌가요??
" "사이에 공백(스페이스)값이 쓰레기값으로 나오는것 같아서 아스키코드에서 스페이스 0x20도 선언하였으나...그대로였기에
제가 택한 방법은 TFT_string을 두줄 써서 폰트 뒤로 묻히게 하였습니다..그래서 콜론까지는 어찌됫든 출력이되게하였는데, 그 다음문제는
커서부분입니다.. 년도,월,일,요일,AM/PM까지는 커서의 위치가 출력이되지만, 시,분,초에서는 커서의 위치가 묻혀서 보이지 않습니다..
물론 증감하는 기능은 있지만, 커서의 위치가 보이지않네요.. string으로 좌표를 정확히 찍어서 위의 코드에서 cursor관련된 함수의 숫자를 바꿔줬는데도
여전히 그대로입니다..

master님의 댓글

master 댓글의 댓글 작성일

혼자서도 충분히 할 수 있는 실력을 가지고 있는 것 같은데요
하고나면 별 것 아닙니다.
열공하세요^^

질문게시판HOME > 질문게시판 목록

MCU, AVR, 아두이노 등 전자공학에 관련된 질문을 무료회원가입 후 작성해주시면 전문가가 답변해드립니다.
ATMEGA128PWMLED초음파
아두이노AVR블루투스LCD
UART모터적외선ATMEGA
전체 스위치 센서
질문게시판 목록
제목 작성자 작성일 조회
공지 MCU, AVR, 아두이노 등 전자공학에 관련된 질문은 질문게시판에서만 작성 가능합니다. 스태프 19-01-15 9686
공지 사이트 이용 안내댓글[24] master 17-10-29 29798
질문 atmega128 키패드 입력 오류에 대하여 질문 있습니다. 새글 마프하나 16:07 10
질문 초음파센싱을 통한 리니어벨트 (스텝모터사용) 조건문댓글[1] 새글 아두이노대학 15:01 15
질문 아트메가128/ srf05 초음파센서를 이용한 타이머 인터럽트 질문입니다 새글 아트메가넘어려워 14:10 16
답변 답변글 답변 : 아트메가128/ srf05 초음파센서를 이용한 타이머 인터럽트 질문입니다 새글 master 14:56 13
질문 atmega128에서 스위치1개는LED, 스위치 1개는 세그먼트의 동작하게 하려는데.. 새글 aasdw 06:28 30
답변 답변글 답변 : atmega128에서 스위치1개는LED, 스위치 1개는 세그먼트의 동작하게 하려는데.. 새글 master 14:09 20
질문 Atmega128 블루투스 오류 질문 새글 yhj2644 01:35 25
답변 답변글 답변 : Atmega128 블루투스 오류 질문 새글 master 13:51 18
질문 아두이노 간단한 프로그램 새글 행복지수업 22-05-25 25
답변 답변글 답변 : 아두이노 간단한 프로그램 새글 master 12:06 13
질문 atmega128 타이머 작성시 키패트 입력으로 인터럽트 사용에 대하여 질문이 있습니다.댓글[1] 이미지새글 마프하나 22-05-25 31
질문 로드셀 무게 센서 질문드립니다.댓글[2] 새글 제비고기 22-05-25 30
질문 adc, uart dma댓글[3] 새글첨부파일 hiㅡO3O 22-05-25 26
질문 ADC,uart DMA댓글[1] 이미지새글첨부파일 hiㅡO3O 22-05-25 23
질문 아두이노 스텝모터 리미트 문의드립니다.댓글[3] 이미지새글첨부파일 스트렌져 22-05-24 32
질문 진동센서와 서보모터 연결 코드 질문입니다!댓글[1] 새글 제리 22-05-24 23
질문 atmega128 GPS,블루투스 질문드립니다.댓글[1] 코딩초보1 22-05-24 32
질문 서보모터 제어에 관하여 궁금합니다댓글[3] 이미지첨부파일 오소로롯 22-05-24 51
질문 atmega 128 타이머 작성 중 질문 드립니다.댓글[8] 이미지 마프하나 22-05-23 66
질문 아두이노와 휴대폰을 HC-06으로 연결시켜서 블루투스연결이 끊기면 부저에서 소리가 나게 할려하는데 어떻게 해…댓글[1] 졸작부수다 22-05-23 218
답변 답변글 답변 : 아두이노와 휴대폰을 HC-06으로 연결시켜서 블루투스연결이 끊기면 부저에서 소리가 나게 할려하는데 … 새글 master 22-05-24 28
질문 보드레이트 질문댓글[1] 죠르디 22-05-23 32
질문 atmega 128 블루투스 질문 입니다댓글[1] yhj2644 22-05-23 51
질문 아트메가 공부중에 질문있습니다..댓글[1] suid82 22-05-23 39
질문 Atmega128 UART통신 echo 반복 질문댓글[2] ming2ming 22-05-23 56
질문 아두이노의 지속 시간에 대해 질문합니다. merry 22-05-23 53
답변 답변글 답변 : 아두이노의 지속 시간에 대해 질문합니다. master 22-05-23 38
질문 초음파+스텝모터 도꺼비 22-05-22 39
게시물 검색

2022년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2021년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2020년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2019년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2018년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
Privacy Policy
MCU BASIC ⓒ 2020
모바일버전으로보기