1. 首页
  2. 课程学习
  3. 嵌入式
  4. PIC16F877A的MCP23016 IO扩展接口

PIC16F877A的MCP23016 IO扩展接口

上传者: 2022-10-22 03:30:50上传 PDF文件 369.59 KB 热度 13次

Thisapplicationnotedescribeshowtousea

PIC16F877AasanI

2

C™mastertocommunicatewith

theMicrochipMCP23016I

2

CI/OExpanderslave

device.

AnI/OExpanderdeviceisusedtoincreasetheI/O

capabilityofamicrocontroller(refertoFigure1).A

microcontroller’sI

2

Cportcanbeusedasacommuni-

cationchannelwithMCP23016(s)toexpandthemicro-

controller’sI/Ocount.ByusingtwoI

2

Cpins(andone

general-purposeI/Opin,ifusingtheinterruptcapability

oftheMCP23016),16to128general-purposeI/Oscan

begained.TheMCP23016hasthreeaddresspins

whichcanbeusedtoprovideuniqueaddressesforup

toeightdevices.

EachdeviceattachedtotheI

2

Cbusmustbeassigned

auniqueaddressunlessalldevices(withthesame

address)arereceivingthesamedataanddonottrans-

mitanydata.Whenthemasterinitiatesadatatransfer,

theaddressoftheslavedeviceistransmitted.Within

theaddress,theLSb(R/Wbit)specifieswhetherthe

masterreadsfrom,orwritesto,theslave.Forwrite

operations,aseriesofbyteswouldbetransmittedfrom

themaster.Forreadoperations,themasterwaitsfor

thebustobefree(i.e.,SCLlinenotpulledlow)and

thenclocksthedatatobereceivedfromtheslave.MAN245InterfacingTheMCP23016I/OExpanderWithThePIC16F877AWhatcanyoudowithanI/OExpander?Author:AbdelwahabFassi-FihriMicrochipTechnologyInc.AnI/OExpandercanalsobeusedtomonitorswitchesand/orsensors,driveLEDsand/orrelays,aswellasothergeneral-purposeI/Ofunctions.AnI/OExpanderINTRODUCTIONcanhaveseveralusesinavarietyofapplications.Typ-This

下载地址
用户评论