본문 바로가기

임베디드129

아두이노 무선으로 코드 업로드 하기 (블루투스) https://kocoafab.cc/tutorial/view/701 2020. 11. 17.
아두이노 내부 풀업 저항 사용하기 (INPUT_PULLUP) https://wikidocs.net/30793 위키독스 온라인 책을 제작 공유하는 플랫폼 서비스 wikidocs.net 2020. 11. 15.
16x2 8핀제어 데이터시트 그대로 적은 코드 /* * Main2.c * * Created: 2020-11-09 오전 10:29:49 * Author: User */ #define F_CPU 16000000UL #include #include #include #define LCD_DATAPORTD #define LCD_COMMANDPORTD #define LCD_CTRLPORTB #define LCD_RS 0 #define LCD_RW 1 #define LCD_EN 2 void lcdData(unsigned char data) { LCD_CTRL |= (1 2020. 11. 9.
16x2 lcd 4핀제어. 코드설명 필기 /* * main3_4pins.c * * Created: 2020-11-09 오후 1:57:06 * Author: User */ #define F_CPU 16000000UL #include #include #define LCD_DATA_DIRDDRD #define LCD_CTRL_DIRDDRB #define LCD_DATA_PORTPORTD #define LCD_CTRL_PORTPORTB #define RS PORTB0 #define EN PORTB1 void lcdComm(unsigned char cmd){ //상위 4비트 처리 LCD_DATA_PORT = (LCD_DATA_PORT & 0x0F) | (cmd & 0xF0); LCD_CTRL_PORT &= ~(1 2020. 11. 9.
16x2 LCD D0, D1 -> C 포트에 꼽은 코드 D0, D1이 RX, TX에 꽂혀있어서 업로드가 잘 안되는 듯함. rx tx 뽑아서 업로드 하고 꽂고 다시 업로드 하면 될때도 있고. 이렇게 여러번 해도 안될때도 있고. 꼽힌채로 업로드 해서 될 때 도 있음 -> rx tx를 C 포트에 꼽으면 되는가? 해서 아래 코드를 시도해봄 /* * LCD16x2.c * * Created: 2020-11-06 오후 2:00:16 * Author : User */ #include #define F_CPU 16000000UL #include #define RSPORTB0 #define RWPORTB1 #define EPORTB2 int main(void) { int r, c; char *string[] = {"1st line", "pin23"}; lcdInit(); fo.. 2020. 11. 7.
16x2 LCD (LC1621-SMLYH6) /* * LCD16x2.c * * Created: 2020-11-06 오후 2:00:16 * Author : User */ #include #define F_CPU 16000000UL #include #define RSPORTB0 #define RWPORTB1 #define EPORTB2 int main(void) { int r, c; char *string[] = {"1st line", "2nd line"}; lcdInit(); for (r=0; r 2020. 11. 6.
interrupt 2개 사용 LED 2개 제어 /* * 201105_interrupt.c * * Created: 2020-11-05 오전 9:37:16 * Author : User */ #include #include #define F_CPU 16000000UL // #define _BV(x)(1 1 any logical change // INT1 -> any logical change //EICRA |= _BV(ISC10); // INT0 //EICRA |= _BV(ISC00); // INT1 //EICRA = (_BV(ISC00)) | (_BV(ISC00)); //EICRA |= 5; //EICRA |= 0x05; EICRA |= 0b00000101; //Enable external interrupt 0 and interrupt 1 using t.. 2020. 11. 6.
interrupt 하나 사용 ,LED 하나 /* * 201105_interrupt.c * * Created: 2020-11-05 오전 9:37:16 * Author : User */ #include #include #define F_CPU 16000000UL // #define _BV(x)(1 1interrupt 2개 사용 LED 2개 제어/* * 201105_interrupt.c * * Created: 2020-11-05 오전 9:37:16 * Author : User */ #include #include #define F_CPU 16000000UL // #define _BV(x) (1 1 2020. 11. 5.
atmega 328p port ddrx 2020. 11. 4.
button 풀다운으로 연결하면 켜졌다가 버튼 누르면 꺼짐풀업으로 연결하면 꺼져있다가 버튼 누르면 켜짐#define F_CPU 16000000UL #include #define LED1PORTD6 #define LED2PORTD7 #define BUTTONPORTB0 uint8_t key_lock =0; int main(void) { DDRD = (1 2020. 11. 4.
arduino uno atmega pin map 2020. 11. 3.
201103_LedBlink.c / DDRx 펌웨어 = 데이터시트를 보면서 레지스터를 직접 제어 DDRx 레지스터는 입출력 설정 레지스터 0은 입력 1은 출력을 의미 " | " : 다른 설정들은 건드리지 않고 특정 값만 바꾸겠다는 의미 | 없으면 변수초기화하는것,, 싹 다 바꿈 PORTB |= 0 2020. 11. 3.
atmega328p datasheet 2020. 11. 3.
AtmelStudio7.0 설치 atmega 328개발환경 2020. 11. 3.
NCS 하드웨어분석  하드웨어 설계 문서의 종류 1. 하드웨어 구성도 = 블록 다이어그램(block diagram) :복잡한 회로도를 간결하게 보기 위해 2. 회로도 3. 부품 배치도 . : 아트워크  부품 정보 1. 부품 리스트 2. 부품의 데이터시트 하드웨어구성도 (1) 클럭(Clock) 순차 회로의 동작을 위해 필요한 일정한 주파수의 전기적 펄스 신호를 의미하며 대부 분의 반도체 회로들은 이 신호에 동기를 맞추어서 동작한다. 일반적으로 크리스털과 같은 진동 소자와 주변 회로를 구성하여 구형파를 발생시킨다. JTAG 디버깅/테스트 : 하드웨어 디버깅 하는것,. TRACE32 2020. 11. 3.
cds # readadc.py import spidev, time def analog_read(channel): r = spi.xfer2([1, (8 + channel) 2020. 10. 30.
raspberrypi dht11 python dht_simpletest.py import time import board import adafruit_dht # Initial the dht device, with data pin connected to: dhtDevice = adafruit_dht.DHT11(board.D4) # you can pass DHT22 use_pulseio=False if you wouldn't like to use pulseio. # This may be necessary on a Linux single board computer like the Raspberry Pi, # but it will not work in CircuitPython. # dhtDevice = adafruit_dht.DHT22(board.D18,.. 2020. 10. 30.
raspberrypi dht11 wiringpi 사용 더보기 https://devicemart.blogspot.com/2019/06/dht-11.html [흥프로] 라즈베리파이 실습 예제 온습도 센서 DHT - 11 사용하기 전기/전자부품, 로봇/기계부품, 코딩교육 국내 1위 쇼핑몰 디바이스마트 공식 블로그입니다. devicemart.blogspot.com https://m.blog.naver.com/chandong83/220902795488 라즈베리 파이(Raspberry Pi) 온습도 센서(DHT11) 다뤄보기 이번엔 DHT11을 라즈베리 파이에서 다뤄볼 것이다. 이전에 아두이노로 테스트해본 적이 있었다. http://... blog.naver.com https://blog.naver.com/roboholic84/220360435768 [라즈베리파이 강.. 2020. 10. 29.
16x2lcd raspberrypi https://www.raspberrypi-spy.co.uk/2012/07/16x2-lcd-module-control-using-python/ 16x2 LCD Module Control Using Python - Raspberry Pi Spy Raspberry Pi tutorials and guides to help you learn and build awesome projects. Sensors, displays, screens, motors, servos, lights, LEDs and more! www.raspberrypi-spy.co.uk #!/usr/bin/python #-------------------------------------- # ___ ___ _ ____ # / _ \/ _ \(_.. 2020. 10. 29.
라즈베리파이4, 3 핀맵 , 데이터시트 4 3 2020. 10. 23.