==========================================================================================

S.C.

=======================================================================================


<<C>>


=extern


<smart.h>

#ifndef __SMART_H__
#define __SMART_H__

extern int A;
extern int B;

void test(void);

#endif //__SMART_H__


<main.c>

#include <stdio.h>
#include "smart.h"

int A = 3;
int B;

int main(void)
{
  printf(
"main::A = [%d]\n",A);
  printf(
"main::B = [%d]\n",B);
  
  test();

  ++A;
  ++B;

  printf(
"main::A = [%d]\n",A);
  printf(
"main::B = [%d]\n",B);
  
  test();  

  
return 0;
}


<test.c>

#include "smart.h"

void test(void)
{
  printf(
"test::A = [%d]\n",A);
  printf(
"test::B = [%d]\n",B);
  
return;
}





=static : 협의하지 않은 전역변수 => 분리 (중복방지 / 보안)

#include <stdio.h>
#include "smart.h"

static int A = 3;
int B;

int main(void)
{
  printf(
"main::A = [%d]\n",A);
  printf(
"main::B = [%d]\n",B);
  
  test();

  ++A;
  ++B;

  printf(
"main::A = [%d]\n",A);
  printf(
"main::B = [%d]\n",B);
  
  test();  

  
return 0;
}









=

#include "smart.h"

int A = 100;

void test(void)
{
  printf(
"test::A = [%d]\n",A);
  printf(
"test::B = [%d]\n",B);
  
return;
}









<<AVR>>

=CHARACTER DISPLAY LCD MODULE (판넬 + 제어용칩)

http://www.devicemart.co.kr/1160130










=실습 LED

http://www.pretty-kunze.de/html/lcd.pdf













=smart.h / lcd.h




#ifndef __SMART_H__
#define __SMART_H__

#define  DDRC  (*((volatile unsigned char *)0x34))
#define  PORTC  (*((volatile unsigned char *)0x35))  
#define  DDRG  (*((volatile unsigned char *)0x64))
#define  PORTG  (*((volatile unsigned char *)0x65))

#endif // __SMART_H__


#ifndef __LCD_H__
#define __LCD_H__
#include "smart.h"
#define  LCD_BUS  PORTC
#define  LCD_CTL  PORTG

#define  LCD_PIN_RS  0
#define LCD_PIN_RW  1
#define LCD_PIN_EN  2

#endif // __LCD_H__



=






*AC/DC  에디슨


=드라이버(장치)

<MAIN.C>




-ATmega 초기화 (INIT)

-LCD 초기화



<LCD.H>



<LCD.C>




==========================================================================================

디지털회로

=======================================================================================


-시계



=CLOCK


-REFERENCE NAME - Y => 크리스탈

-오실레이터 - 크리스탈(펄스) / RESONATOR(약간 사인파)











=카운트다운






(10진카운터 테스트 불가)

S1,S2 라벨 => ERROR





=>병렬가산기 이용


'2015 스마트 콘트롤러 > 업무일지' 카테고리의 다른 글

20150320  (0) 2015.03.20
20150319  (0) 2015.03.19
20150317  (0) 2015.03.17
20150316  (0) 2015.03.16
20150313  (0) 2015.03.13
Posted by ahj333
,