본문 바로가기

전체 글

(88)
ATmega128 - DS1302 RTC(Real Time Clock) 동작 소스. #define dir_flow_set DDRC #define out_flow_pin PORTC #define in_flow_pin PINC #define data_out_set (dir_flow_set=0xFF, out_flow_pin=0xFB) #define data_in_set (dir_flow_set=0xFD) #define ds1302_reg_second (0x80) #define ds1302_reg_minute (0x82) #define ds1302_reg_hour (0x84) #define ds1302_reg_date (0x86) #define ds1302_reg_month (0x88) #define ds1302_reg_day (0x8a) #define ds1302_reg_year (0x8c)..
ATmega128 - COM26T2844VTX 단순 동작 및 초기화 소스. typedef unsigned char U08;typedef unsigned int U16; #define Control_Bus PORTA#define Data_Upper PORTC#define Data_Lower PORTF #define MAX_PIXEL 96000#define X_MAX_PIXEL 400#define Y_MAX_PIXEL 240 #define BLACK 0x0000#define WHITE 0xFFFF#define YELLOW 0xFFE0#define RED 0xF800#define GREEN 0x07E0#define BLUE 0x001F#define CYAN 0x07FF#define MAGENTA 0xF81F #define CSB_HIGH (Control_Bus |= 0x01)#def..
ATmega128 - 16x2, 20x4 공용 CLCD 동작 소스 #define clcd_bus PORTC#define enable (clcd_bus |= 0x04)#define disable (clcd_bus &= 0xFB) void clcd_inst(unsigned char Data) { clcd_bus = Data & 0xF0; enable; disable; clcd_bus = (Data
ATmega128 - 128x64 GLCD 문자 표시 동작 소스. /* 5x7 ASCII Character Font */ const unsigned char GLCD_Font[95][5] = { {0x00, 0x00, 0x00, 0x00, 0x00}, // 0x20 Space {0x00, 0x00, 0x4F, 0x00, 0x00}, // 0x21 ! {0x00, 0x07, 0x00, 0x07, 0x00}, // 0x22 " {0x14, 0x7F, 0x14, 0x7F, 0x14}, // 0x23 # {0x24, 0x2A, 0x7F, 0x2A, 0x12}, // 0x24 $ {0x23, 0x13, 0x08, 0x64, 0x62}, // 0x25 % {0x36, 0x49, 0x55, 0x22, 0x50}, // 0x26 & {0x00, 0x05, 0x03, 0x00, 0x0..
ATmega128 - 128x64 GLCD 단순 동작 및 초기화 소스. #define GLCD_DATABUS PORTA #define GLCD_CONTROL PORTF // #define GLCD_CONTROL_RS 0 // #define GLCD_CONTROL_RW 1 // #define GLCD_CONTROL_EN 2 // #define GLCD_CONTROL_CS1 3 // #define GLCD_CONTROL_CS2 4 // #define GLCD_CONTROL_RSTB 5 void GLCD_Instruction (unsigned char Inst, unsigned char Data) { GLCD_CONTROL = Inst & 0x38; // RS 0, E 0 delay_us(10); GLCD_DATABUS = Data; GLCD_CONTROL = (Inst & 0x..
ATmega128 - MCP3202 동작 소스. #define ADC_BUS PORTC#define ADC_OUT PINC#define CS_HIGH (ADC_BUS |= 0x01)#define CS_LOW (ADC_BUS &= 0x0E)#define DIN_HIGH (ADC_BUS |= 0x02)#define DIN_LOW (ADC_BUS &= 0x0D)#define CLK_HIGH (ADC_BUS |= 0x08)#define CLK_LOW (ADC_BUS &= 0x03) unsigned int ADC_MCP3202(void) { unsigned char ADC_Count = 0; unsigned int ADC_Data_Temp = 0; CS_HIGH; CS_LOW; DIN_HIGH; CLK_LOW; CLK_HIGH; CLK_LOW; DIN_HIGH..
집에서 만든 매우 간편한 샐러드 양상추 + 오이 + 피망 + 방울토마토 + 식초 될 수 있으면 달콤한 드레싱과 열량 높은 드레싱은 삼가기!
집에서 만든 사과잼 지금은 다 먹고 없습니다. ;) 물을 너무 많이 넣어서 흠이었었죠. ㅋ