10.07.2015 Views

cubloc_manual2.pdf

cubloc_manual2.pdf

cubloc_manual2.pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

NOTE 10MCP3202 12 비트 A/D 변환큐블록에는 10 비트 해상도의 A/D 변환기가 내장되어 있어, 별도 칩없이도 10 비트 분해능을 갖는A/D 변환을 할 수 있습니다. 이보다 더 분해능이 높은 A/D 변환값이 필요하다면, 외부에 A/D 변환칩을 추가하는 방법으로 어플리케이션을 구현합니다. 여기에서는 MCP3202 라는 SPI 방식의 12비트 A/D 변환칩을 사용하는 방법에 대하여 설명합니다.CS VCCCH0 CLKCH1 DOGND DIMCS3202SOUT VINSIN VSSATN RESVSS VDDP0 P15P1 P14P2 P13P3 P12P4 P11P5 P10P6P9P7P8CB220핀이름 핀설명 입출력방향 설명CS Chip Select Input Low 일때 전송이 유효함CLK Clock Input 동기신호DI Data Input Input 데이터 입력단자 (MCS3202 관점에서 입력)DO Data Output Output 데이터 출력단자 (MCS3202 관점에서 출력)418Const Device = CB280Const iodi = 7Const iodo = 6Const ioclk = 5Const iocs = 4Dim I As ByteDim ad As IntegerDoLow iocsi = &b1011 'Channel 0'i = &h1111 'Channel 1Shiftout ioclk,iodi,0,i,4ad = Shiftin(ioclk,iodo,3,12)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!