欢迎来到天天文库
浏览记录
ID:41713166
大小:1.05 MB
页数:41页
时间:2019-08-30
《原文-标准并口程序》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、InterfacingtheStandardParallelPortTableofContents•IntroductiontoParallelPorts•HardwareProperties•Centronics?•PortAddresses•SoftwareRegisters-StandardParallelPort(SPP)•UsingTheParallelPorttoInput8Bits.•ParallelPortModesinBIOS•ParallelPortModesandtheECP'sExtendedControlRe
2、gisterIntroductiontoParallelPortsTheParallelPortisthemostcommonlyusedportforinterfacinghomemadeprojects.Thisportwillallowtheinputofupto9bitsortheoutputof12bitsatanyonegiventime,thusrequiringminimalexternalcircuitrytoimplementmanysimplertasks.Theportiscomposedof4controll
3、ines,5statuslinesand8datalines.It'sfoundcommonlyonthebackofyourPCasaD-Type25Pinfemaleconnector.TheremayalsobeaD-Type25pinmaleconnector.NewerParallelPortasarestandardizedundertheIEEE1284standardfirstreleasedin1994.Thisstandarddefines5modesofoperationwhichareasfollows,1.C
4、ompatibilityMode.2.NibbleMode.(ProtocolnotDescribedinthisDocument)3.ByteMode.(ProtocolnotDescribedinthisDocument)4.EPPMode(EnhancedParallelPort).5.ECPMode(ExtendedCapabilitiesPort).Theaimwastodesignnewdriversanddeviceswhichwerecompatiblewitheachotherandalsobackwardscomp
5、atiblewiththeStandardParallelPort(SPP).Compatibility,Nibble&BytemodesusejustthestandardhardwareavailableontheoriginalParallelPortcardswhileEPP&ECPmodesrequireadditionalhardwarewhichcanrunatfasterspeeds,whilestillbeingdownwardscompatiblewiththeStandardParallelPort.Compat
6、ibilitymodeornCentronicsMode1*asitiscommonlyknown,canonlysenddataintheforwarddirectionatatypicalspeedof50kbytespersecondbutcanbeashighas150+kbytesasecond.Inordertoreceivedata,youmustchangethemodetoeitherNibbleorBytemode.Nibblemodecaninputanibble(4bits)inthereversedirect
7、ion.E.g.fromdevicetocomputer.BytemodeusestheParallefsbi-directionalfeature(foundonlyonsomecards)toinputabyte(8bits)ofdatainthereversedirection.ExtendedandEnhancedParallelPortsuseadditionalhardwaretogenerateandmanagehandshaking.Tooutputabytetoaprinter(oranythinginthatmat
8、ter)usingcompatibilitymode,thesoftwaremust.1.WritethebytetotheDataPort.2.Checktoseeistheprinterisbusy.Ifthepri
此文档下载收益归作者所有