<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;">안녕하세요&nbsp;<span _foo="color: #ffffff; background-color: #77b02b;" style="color: #ffffff; background-color: #77b02b;">메카솔루션</span>입니다.</p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><br /></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;">이번 글에서는 RTC 모듈인&nbsp;DS1307이&nbsp;<span style="font-weight: 600; font-family: AppleSDGothicNeo-Bold;">소스코드를 전부 제대로&nbsp;적용하고 하였는데도&nbsp;</span></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><span style="font-weight: 600; font-family: AppleSDGothicNeo-Bold;"><br /></span></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><span style="font-weight: 600; font-family: AppleSDGothicNeo-Bold;">작동이 안될 때의 상황을 해결 하는 법</span>을 알려 드리도록 하겠습니다.</p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><br /></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><br /></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;">우선 들어가기전에 잠시,&nbsp;RTC란,&nbsp;<span _foo="color: #ffffff; background-color: #ff0000;" style="color: #ffffff; background-color: #ff0000;">Real Time Clock</span>의 줄임말이며 RTC를 사용하는 이유는 아두이노로 시계를 만든다고 했을 때,&nbsp;</p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><br /></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><span style="font-weight: 600; font-family: AppleSDGothicNeo-Bold;">아두이노의 전원이 꺼지게 되면, 아두이노로 만든 시계의 시간은 초기화 되게 됩니다.</span></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><span style="font-weight: 600; font-family: AppleSDGothicNeo-Bold;"><br /></span></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><span style="font-weight: 600; font-family: AppleSDGothicNeo-Bold;">이 초기화를 방지하기 위해 독자적인 전원을 가진 RTC를 사용하는 것이지요.</span></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><br /></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><span class="_img  fx" thumburl="https://mblogthumb-phinf.pstatic.net/20160311_199/roboholic84_1457676531984iJCEH_PNG/132F4D6A4S.png?type=" style="max-width: 100%;"><img src="https://mblogthumb-phinf.pstatic.net/20160311_199/roboholic84_1457676531984iJCEH_PNG/132F4D6A4S.png?type=w2" largesrc="javascript:location.href='https://mblogthumb-phinf.pstatic.net/20160311_199/roboholic84_1457676531984iJCEH_PNG/132F4D6A4S.png?type=w2'" id="img_1" data-top="601" style="border: 0px; vertical-align: top; max-width: 100%;" /></span>&nbsp;</p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><br /></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;">DS1307을 코딩하여 실행하였으나 RTC가 동작하지 않는다는 에러 메시지와 함께 2000/1/1 0:0:0이라는 메시지가 출력 됩니다.</p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><br /></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;">회로도를 봅시다</p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><br /></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><span class="_img  fx" thumburl="https://mblogthumb-phinf.pstatic.net/20160311_2/roboholic84_1457675180957bDSot_JPEG/6OwGu.jpg?type=" style="max-width: 100%;"><img src="https://mblogthumb-phinf.pstatic.net/20160311_2/roboholic84_1457675180957bDSot_JPEG/6OwGu.jpg?type=w2" largesrc="javascript:location.href='https://mblogthumb-phinf.pstatic.net/20160311_2/roboholic84_1457675180957bDSot_JPEG/6OwGu.jpg?type=w2'" id="img_2" data-top="762" style="border: 0px; vertical-align: top; max-width: 100%;" /></span>&nbsp;</p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;">구글에&nbsp;ds1307 schematic 이라고 치면 나오는, D1과 배터리가 연결 되어있는 제품 회로도&nbsp;입니다.</p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><br /></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;">이 제품에 원래 들어가는 배터리는<span style="font-weight: 600; font-family: AppleSDGothicNeo-Bold;">&nbsp;LIR2032로써, 3.6V의 전압을 가진 배터리</span>입니다.</p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><span _foo="line-height: 1.5;"><span class="_img  fx" thumburl="https://mblogthumb-phinf.pstatic.net/20160311_75/roboholic84_1457675674491Nm9zj_JPEG/A1888240003b026ec11-d432-4469-819d-ed91fc17f1bb.jpeg?type=" style="max-width: 100%;"><img src="https://mblogthumb-phinf.pstatic.net/20160311_75/roboholic84_1457675674491Nm9zj_JPEG/A1888240003b026ec11-d432-4469-819d-ed91fc17f1bb.jpeg?type=w2" largesrc="javascript:location.href='https://mblogthumb-phinf.pstatic.net/20160311_75/roboholic84_1457675674491Nm9zj_JPEG/A1888240003b026ec11-d432-4469-819d-ed91fc17f1bb.jpeg?type=w2'" id="img_3" data-top="877" style="border: 0px; vertical-align: top; max-width: 100%;" /></span></span></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><span _foo="line-height: 1.5;">그러나 제품은 보시다시피 CR2032인 3V의 배터리를 사용하고 있습니다.</span></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><span _foo="line-height: 1.5;"><br /></span></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><span _foo="line-height: 1.5;">3V에 큰 저항까지&nbsp;거쳐 지나가 버리니 제 기능을 하기 힘들었던 것입니다.</span></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><span _foo="line-height: 1.5;"><br /></span></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><span class="_img  fx" thumburl="https://mblogthumb-phinf.pstatic.net/20160311_199/roboholic84_1457675619558EikfV_JPEG/20160311_142831.jpg?type=" style="max-width: 100%;"><img src="https://mblogthumb-phinf.pstatic.net/20160311_199/roboholic84_1457675619558EikfV_JPEG/20160311_142831.jpg?type=w2" largesrc="javascript:location.href='https://mblogthumb-phinf.pstatic.net/20160311_199/roboholic84_1457675619558EikfV_JPEG/20160311_142831.jpg?type=w2'" id="img_4" data-top="992" style="border: 0px; vertical-align: top; max-width: 100%;" /></span></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><br /></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;">그러므로 해결을 하기 위해서는 CR 2032를 LIR 2032 로 교체를 하거나 회로를 수정 해 주어야합니다.</p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><br /></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;">배터리는 구하기만 하게 되면&nbsp;간단하게 갈아 끼울 수 있으므로, 여기서는 회로를 수정 하는 방법을 알아 보도록 하겠습니다.</p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><br /></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><br /></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><span class="_img  fx" thumburl="https://mblogthumb-phinf.pstatic.net/20160311_23/roboholic84_1457676354758FTgvi_JPEG/6OwGu123.jpg?type=" style="max-width: 100%;"><img src="https://mblogthumb-phinf.pstatic.net/20160311_23/roboholic84_1457676354758FTgvi_JPEG/6OwGu123.jpg?type=w2" largesrc="javascript:location.href='https://mblogthumb-phinf.pstatic.net/20160311_23/roboholic84_1457676354758FTgvi_JPEG/6OwGu123.jpg?type=w2'" id="img_5" data-top="1199" style="border: 0px; vertical-align: top; max-width: 100%;" /></span>&nbsp;</p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;">LIR2032는 충전이 가능한 모델이므로 DS1037에도 충전을 위한 회로가 설계 되어 있습니다.</p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><br /></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;">그러나 저희가 사용하는 CR 2302는 충전이 불가능한 배터리이므로 삭제</p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><br /></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;">그리고 R4도 함께 제거 해 주시고 R6은 제거 후 전선으로 연결 하여 줍시다.</p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><br /></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><span class="_img  fx" thumburl="https://mblogthumb-phinf.pstatic.net/20160311_77/roboholic84_1457676125390SYSqA_JPEG/20160311_140217.jpg?type=" style="max-width: 100%;"><img src="https://mblogthumb-phinf.pstatic.net/20160311_77/roboholic84_1457676125390SYSqA_JPEG/20160311_140217.jpg?type=w2" largesrc="javascript:location.href='https://mblogthumb-phinf.pstatic.net/20160311_77/roboholic84_1457676125390SYSqA_JPEG/20160311_140217.jpg?type=w2'" id="img_6" data-top="1383" style="border: 0px; vertical-align: top; max-width: 100%;" /></span>&nbsp;</p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><br /></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;">왼쪽은 수정을 하지 않은 DS1307 모듈이고, 오른쪽은 회로를 수정한 DS1307 모듈입니다.</p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><br /></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;">기판으로 보게 되면&nbsp;빨간 사각형이 쳐진 부분의 부품들은 전부 제거 하여 주시고,</p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><br /></p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;">노란 사각형이 쳐진 부분의 부품은 제거 후 연결해 주시면 됩니다.</p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><br /></p>
<p _foo="text-align: center; " align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;">그 후 연결하여&nbsp;동작을 시키게 되면</p>
<p _foo="text-align: center;" align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><br /></p>
<p _foo="text-align: center; " align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><span class="_img  fx" thumburl="https://mblogthumb-phinf.pstatic.net/20160311_114/roboholic84_1457676700082nAoQm_PNG/ADFAS4D6F5.png?type=" style="max-width: 100%;"><img src="https://mblogthumb-phinf.pstatic.net/20160311_114/roboholic84_1457676700082nAoQm_PNG/ADFAS4D6F5.png?type=w2" largesrc="javascript:location.href='https://mblogthumb-phinf.pstatic.net/20160311_114/roboholic84_1457676700082nAoQm_PNG/ADFAS4D6F5.png?type=w2'" id="img_7" data-top="1613" style="border: 0px; vertical-align: top; max-width: 100%;" /></span>&nbsp;</p>
<p _foo="text-align: center; " align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;"><br /></p>
<p _foo="text-align: center; " align="center" style="padding: 0px; font-family: sans-serif; font-size: 16.002px; background-color: #ffffff;">오늘 날짜와 함께 시간이 출력되며 동작이 정상적으로 되게 됩니다.</p>