검색결과 리스트
디지털회로에 해당되는 글 17건
- 2014.04.30 20140430 ADC제어
- 2014.04.25 20140425
- 2014.04.24 20140424 USART
- 2014.04.22 20144022 문자열 숫자, 출력하기
- 2014.04.21 20140421 LCD2
- 2014.04.17 20140417 LCD
- 2014.04.09 20140409 WinAVR설치
20140508 인터럽트 (0) | 2014.05.08 |
---|---|
CDS (0) | 2014.05.07 |
20140425 (0) | 2014.04.25 |
20140424 USART (0) | 2014.04.24 |
20144022 문자열 숫자, 출력하기 (0) | 2014.04.22 |
CDS (0) | 2014.05.07 |
---|---|
20140430 ADC제어 (0) | 2014.04.30 |
20140424 USART (0) | 2014.04.24 |
20144022 문자열 숫자, 출력하기 (0) | 2014.04.22 |
20140421 LCD2 (0) | 2014.04.21 |
20140430 ADC제어 (0) | 2014.04.30 |
---|---|
20140425 (0) | 2014.04.25 |
20144022 문자열 숫자, 출력하기 (0) | 2014.04.22 |
20140421 LCD2 (0) | 2014.04.21 |
20140417 LCD (0) | 2014.04.17 |
#include <stdio.h> #include "smart.h" |
|
20140425 (0) | 2014.04.25 |
---|---|
20140424 USART (0) | 2014.04.24 |
20140421 LCD2 (0) | 2014.04.21 |
20140417 LCD (0) | 2014.04.17 |
20140409 WinAVR설치 (0) | 2014.04.09 |
#include <stdio.h> #include "smart.h" void inst_clear(void); ![]() void inst_return(void); ![]() void inst_entry(void); ![]() void inst_display(void); ![]() void inst_cursor(void); ![]() void inst_function(void); ![]() void data_a(void); ![]() void lcd_init(void); ![]() int main(void) { lcd_init(); data_a(); data_a(); data_a(); data_a(); data_a(); while(1); { } return 0; } void inst_clear(void) ![]() { volatile unsigned int uicnt; DDRA = (1<<PIN_RS)|(1<<PIN_RW)|(1<<PIN_E); //DDRA방향세개를 출력으로 바꿈 DDRC = 0xFF; //DDRC방향 모두를 출력으로 바꿈 PORTA = (0<<PIN_E); PORTA=(0<<PIN_RS)|(0<<PIN_RW)|(0<<PIN_E); DELAY(10000); PORTA=PORTA|(1<<PIN_E); DELAY(500); PORTC=0x01; DELAY(10000); PORTA=PORTA&~(1<<PIN_E); DELAY(500); } void inst_return(void) ![]() { volatile unsigned int uicnt; DDRA = (1<<PIN_RS)|(1<<PIN_RW)|(1<<PIN_E); DDRC = 0xFF; PORTA = (0<<PIN_E); PORTA=(0<<PIN_RS)|(0<<PIN_RW)|(0<<PIN_E); DELAY(10000); PORTA=PORTA|(1<<PIN_E); DELAY(500); PORTC=0x02; DELAY(10000); PORTA=PORTA&~(1<<PIN_E); DELAY(500); } void inst_entry(void) ![]() { volatile unsigned int uicnt; DDRA = (1<<PIN_RS)|(1<<PIN_RW)|(1<<PIN_E); DDRC = 0xFF; PORTA = (0<<PIN_E); PORTA=(0<<PIN_RS)|(0<<PIN_RW)|(0<<PIN_E); DELAY(10000); PORTA=PORTA|(1<<PIN_E); DELAY(500); PORTC=0x06; DELAY(10000); PORTA=PORTA&~(1<<PIN_E); DELAY(500); } void inst_display(void) ![]() { volatile unsigned int uicnt; DDRA = (1<<PIN_RS)|(1<<PIN_RW)|(1<<PIN_E); DDRC = 0xFF; //DDRC방향 모두를 출력으로 바꿈 PORTA = (0<<PIN_E); PORTA=(0<<PIN_RS)|(0<<PIN_RW)|(0<<PIN_E); DELAY(10000); PORTA=PORTA|(1<<PIN_E); DELAY(500); PORTC=0xF; DELAY(10000); PORTA=PORTA&~(1<<PIN_E); DELAY(500); } void inst_cursor(void) ![]() { volatile unsigned int uicnt; DDRA = (1<<PIN_RS)|(1<<PIN_RW)|(1<<PIN_E); DDRC = 0xFF; PORTA = (0<<PIN_E); PORTA=(0<<PIN_RS)|(0<<PIN_RW)|(0<<PIN_E); DELAY(10000); PORTA=PORTA|(1<<PIN_E); DELAY(500); PORTC=0x14; DELAY(10000); PORTA=PORTA&~(1<<PIN_E); DELAY(500); } void inst_function(void) ![]() { volatile unsigned int uicnt; DDRA = (1<<PIN_RS)|(1<<PIN_RW)|(1<<PIN_E); DDRC = 0xFF; PORTA = (0<<PIN_E); PORTA=(0<<PIN_RS)|(0<<PIN_RW)|(0<<PIN_E); DELAY(10000); PORTA=PORTA|(1<<PIN_E); DELAY(500); PORTC=0x3C; DELAY(10000); PORTA=PORTA&~(1<<PIN_E); DELAY(500); } void data_a(void) ![]() { volatile unsigned int uicnt; DDRA = (1<<PIN_RS)|(1<<PIN_RW)|(1<<PIN_E); DDRC = 0xFF; PORTA = (0<<PIN_E); PORTA=(1<<PIN_RS)|(0<<PIN_RW)|(0<<PIN_E); DELAY(10000); PORTA=PORTA|(1<<PIN_E); DELAY(500); PORTC='A'; DELAY(10000); PORTA=PORTA&~(1<<PIN_E); DELAY(500); } void lcd_init(void) ![]() { volatile unsigned int uicnt; DELAY(500); inst_function(); inst_entry(); inst_cursor(); inst_display(); inst_clear(); inst_return(); } |
20140425 (0) | 2014.04.25 |
---|---|
20140424 USART (0) | 2014.04.24 |
20144022 문자열 숫자, 출력하기 (0) | 2014.04.22 |
20140417 LCD (0) | 2014.04.17 |
20140409 WinAVR설치 (0) | 2014.04.09 |
20140425 (0) | 2014.04.25 |
---|---|
20140424 USART (0) | 2014.04.24 |
20144022 문자열 숫자, 출력하기 (0) | 2014.04.22 |
20140421 LCD2 (0) | 2014.04.21 |
20140409 WinAVR설치 (0) | 2014.04.09 |
WinAVR설치
구글에서 winavr검색 다운로드하면
WinAVR20100110을 받을수 있다. 받아라 커스텀설치에서 3가지 항목나오는데 3가지 다 받아두자.
20140425 (0) | 2014.04.25 |
---|---|
20140424 USART (0) | 2014.04.24 |
20144022 문자열 숫자, 출력하기 (0) | 2014.04.22 |
20140421 LCD2 (0) | 2014.04.21 |
20140417 LCD (0) | 2014.04.17 |
RECENT COMMENT