prototyping with pic microcontroller third day: communications 2009/02/13 youmin kim...

19
Prototyping with PIC Microcontroller Third day: Communications 2009/02/13 Youmin Kim ([email protected] ) Digital Media Lab

Upload: winfred-hudson

Post on 04-Jan-2016

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Prototyping with PIC Microcontroller Third day: Communications 2009/02/13 Youmin Kim (ym_kim@icu.ac.kr)ym_kim@icu.ac.kr Digital Media Lab

Prototyping with PIC Mi-crocontroller

Third day: Communications2009/02/13

Youmin Kim ([email protected])

Digital Media Lab

Page 2: Prototyping with PIC Microcontroller Third day: Communications 2009/02/13 Youmin Kim (ym_kim@icu.ac.kr)ym_kim@icu.ac.kr Digital Media Lab

Serial CommunicationUARTIrDAUSB

Bluetooth RS232 MAX232

Page 3: Prototyping with PIC Microcontroller Third day: Communications 2009/02/13 Youmin Kim (ym_kim@icu.ac.kr)ym_kim@icu.ac.kr Digital Media Lab

MAX232

Page 4: Prototyping with PIC Microcontroller Third day: Communications 2009/02/13 Youmin Kim (ym_kim@icu.ac.kr)ym_kim@icu.ac.kr Digital Media Lab

PIC

LED

OSC

Adaptor780512V5V

MAX232

Page 5: Prototyping with PIC Microcontroller Third day: Communications 2009/02/13 Youmin Kim (ym_kim@icu.ac.kr)ym_kim@icu.ac.kr Digital Media Lab

.Socket-12V Adapter 가 꽂힌다 . .

7805-12v 전압을 5v로 떨어뜨린다 .

.OSC- 클럭을 발생시킨다 .

.PIC-마이크로 컨트롤러 .

.LED-Light Emis-siveDiode.

.MAX232-MAXIM 社의 232Chip

Serial Cable 을 통해PC 로 전송

Page 6: Prototyping with PIC Microcontroller Third day: Communications 2009/02/13 Youmin Kim (ym_kim@icu.ac.kr)ym_kim@icu.ac.kr Digital Media Lab

CASE 1: IPTV Remote

Page 7: Prototyping with PIC Microcontroller Third day: Communications 2009/02/13 Youmin Kim (ym_kim@icu.ac.kr)ym_kim@icu.ac.kr Digital Media Lab

Bluetooth module

PIC #1

PIC #2

Page 8: Prototyping with PIC Microcontroller Third day: Communications 2009/02/13 Youmin Kim (ym_kim@icu.ac.kr)ym_kim@icu.ac.kr Digital Media Lab

CASE 2: PEER (ETRI Wear-able)

Database

ControllerOff-line data managing

Bluetooth Comm.

Viewer (Flash GUI)

Controller

Bluetooth Comm.

WBS uDevices

Viewer (Flash GUI)

Controller

Bluetooth Comm.

Viewer application

Controller

Bluetooth Comm.BT comm.

Apps’database

Page 9: Prototyping with PIC Microcontroller Third day: Communications 2009/02/13 Youmin Kim (ym_kim@icu.ac.kr)ym_kim@icu.ac.kr Digital Media Lab
Page 10: Prototyping with PIC Microcontroller Third day: Communications 2009/02/13 Youmin Kim (ym_kim@icu.ac.kr)ym_kim@icu.ac.kr Digital Media Lab

Ideation: Automatic,

but Digital Lamp

Page 11: Prototyping with PIC Microcontroller Third day: Communications 2009/02/13 Youmin Kim (ym_kim@icu.ac.kr)ym_kim@icu.ac.kr Digital Media Lab

PIC LED

Power

Clock

CDS

MAX232 PC

Page 12: Prototyping with PIC Microcontroller Third day: Communications 2009/02/13 Youmin Kim (ym_kim@icu.ac.kr)ym_kim@icu.ac.kr Digital Media Lab

A Port / ADC Port

oscillator

B Port

C Port

UART

좌측 상단부터 1 번 핀동그란 마크가 있음

Master Clear

Page 13: Prototyping with PIC Microcontroller Third day: Communications 2009/02/13 Youmin Kim (ym_kim@icu.ac.kr)ym_kim@icu.ac.kr Digital Media Lab

Circuit schematic

PIC16F73

CLK

LED

VCC (5V)

VCC (5V)

1

8

9

10

28 (RB7)

20

10K re-sister

350Ωresister

19

CDS

VCC (5V)

2 (AN0)

10K re-sister

MAX232

(RX, RC7)18

(TX, RC6)17PC

RX

TX

Page 14: Prototyping with PIC Microcontroller Third day: Communications 2009/02/13 Youmin Kim (ym_kim@icu.ac.kr)ym_kim@icu.ac.kr Digital Media Lab

Set_adc_channel() 함수로 지정된 ADC 포트의 값을 읽어서 리턴한다 .

ADC 로 설정된 포트 중 어느 곳에서 값을 읽어 올 것인지를 결정

Page 15: Prototyping with PIC Microcontroller Third day: Communications 2009/02/13 Youmin Kim (ym_kim@icu.ac.kr)ym_kim@icu.ac.kr Digital Media Lab

In the PC application, received values (e.g. 100, 123, …)

if received_value < 128:the program shows “Light On!”

else:the program shows “Light Off!”

Page 16: Prototyping with PIC Microcontroller Third day: Communications 2009/02/13 Youmin Kim (ym_kim@icu.ac.kr)ym_kim@icu.ac.kr Digital Media Lab

Prototyping on Universal PCB

&PC application (c#)

Page 17: Prototyping with PIC Microcontroller Third day: Communications 2009/02/13 Youmin Kim (ym_kim@icu.ac.kr)ym_kim@icu.ac.kr Digital Media Lab

How to PC application in c#?

Page 18: Prototyping with PIC Microcontroller Third day: Communications 2009/02/13 Youmin Kim (ym_kim@icu.ac.kr)ym_kim@icu.ac.kr Digital Media Lab

Question?

Page 19: Prototyping with PIC Microcontroller Third day: Communications 2009/02/13 Youmin Kim (ym_kim@icu.ac.kr)ym_kim@icu.ac.kr Digital Media Lab

Assignment 3:Studio project suggestion