Professional Documents
Culture Documents
HOME
BasicsofGPIOinLPC21xxARM7Tutorials|ELECTROONS.com
ARM7
WHATSNEW
AVR
8051
FREEPCB
PRAYOGWIKI
Enterkeyworks
SEARCH
August22,2014BreadboardPowerSuppliesReadbeforeyouBuyOne
HOME/ARMMICROCONTROLLER/ARM7/ELECTRONICS/GENERALKNOWHOW/INTERFACINGTUTORIAL/LPC21XX/NXP/PHYSICAL
COMPUTING/BASICSOFGPIOINLPC21XXARM7TUTORIALS
BasicsofGPIOinLPC21xxARM7Tutorials
January28,2013
Basic Registers
DownloadUserManualforLPC2148Chapter7,PAGE75
0
Share
PINSEL Registers
MostofthepinsonLPC2148aremultifunctional,everypincanbeusedtoperformoneoftheassignedfunctiontoitdependonthesettingof
PINSELregisterofthespecificporttowhichthatpinbelongs.
ForexampleintheLPC214Xpindiagramabove,pinnumber1islabeledasP0.21/PWM5/AD1.6/CAP1.3,itmeansthispincanfunctionin
4modes.Itcanbeeither
PORT0.21(GPIO)or
PWMOut5or
ADC1inputforchannel6thatisAD1.6or
CAP1.3TimerCapturePin
Outofthelisted4possiblefunctions,Pin1canfunctionasanyoneatonce.Currentfunctionofanypincanbe
configuredusingcorrespondingPINSELregisterinthiscasePINSEL0orPINSEL1(havetocheckindatasheet),for
everymultifunctionalpin,defaultfunctionalityisalwaysGPIOprovidedGPIOisoneofthefunctions.
forLPC2148thereare3PINSELregisters,PINSELx(x:0,1,2),refertodatasheetformoredetailschecktable60
onwards.
GPIO Registers
http://www.electroons.com/blog/2013/01/basicsofgpioinlpc21xxarm7tutorials/
1/5
11/27/2015
BasicsofGPIOinLPC21xxARM7Tutorials|ELECTROONS.com
LikeusonFacebook!
Like
6k
ToenableFastInputOutput,SystemControlandStatusregister(SCS)shouldbegivenvalue3.
REFERtoUserManualformoredetailsonIODIR,IOSET,IOCLRcheckonPagenumber81onwards,itsChapter8
http://www.electroons.com/blog/2013/01/basicsofgpioinlpc21xxarm7tutorials/
2/5
11/27/2015
BasicsofGPIOinLPC21xxARM7Tutorials|ELECTROONS.com
IhopeyoucanintuitivelydeducethedifferencebetweenFastGPIOandGenerelPurposeInputOutput.Fastinputoutputcontrollerblockis
connectedtotheARMlocalbuswhileGPIOblockisconnectedwithPeripheralBusofthecontrollersystem.
IO0PIN=(IO0PIN&&0xFFFF00FF)|0x0000A500
PreviousArticle
HelloWorldLPC21xx/32bit
ProgrammingARM7
NextArticle
ADCInterfacingTutorialforLPC21xx
ARM7
ABOUTAUTHOR
IndianYouthful
LEAVEAREPLY
Youremailaddresswillnotbepublished.Requiredfieldsaremarked*
Name(required):
http://www.electroons.com/blog/2013/01/basicsofgpioinlpc21xxarm7tutorials/
3/5
11/27/2015
BasicsofGPIOinLPC21xxARM7Tutorials|ELECTROONS.com
Email(required):
Website
Yourcomment(required):
PostComment
Proveyouarehumanbyreadingthisresistor:
Matchtheslidersonthelefttoeachcolorbandontheresistor.
0+/5%
ClickHereforanewresistorimage.
Ifyou'dliketolearnmore,readaboutresistorcolorcodeshere.
10
20
http://www.electroons.com/blog/2013/01/basicsofgpioinlpc21xxarm7tutorials/
4/5
11/27/2015
BasicsofGPIOinLPC21xxARM7Tutorials|ELECTROONS.com
electroons.com
6,071likes
LikePage
Share
Bethefirstofyourfriendstolikethis
HOME
ARM7
AVR
8051
FREEPCB
PRAYOGWIKI
ContentatthissiteislicensedunderCCAttributionNoncommercialShareAlike3.0Unported
0
Share
http://www.electroons.com/blog/2013/01/basicsofgpioinlpc21xxarm7tutorials/
5/5