东南大学信息学院poc实验报告Word文档下载推荐.docx

上传人:b****2 文档编号:14485400 上传时间:2022-10-23 格式:DOCX 页数:17 大小:495.82KB
下载 相关 举报
东南大学信息学院poc实验报告Word文档下载推荐.docx_第1页
第1页 / 共17页
东南大学信息学院poc实验报告Word文档下载推荐.docx_第2页
第2页 / 共17页
东南大学信息学院poc实验报告Word文档下载推荐.docx_第3页
第3页 / 共17页
东南大学信息学院poc实验报告Word文档下载推荐.docx_第4页
第4页 / 共17页
东南大学信息学院poc实验报告Word文档下载推荐.docx_第5页
第5页 / 共17页
点击查看更多>>
下载资源
资源描述

东南大学信息学院poc实验报告Word文档下载推荐.docx

《东南大学信息学院poc实验报告Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《东南大学信息学院poc实验报告Word文档下载推荐.docx(17页珍藏版)》请在冰豆网上搜索。

东南大学信息学院poc实验报告Word文档下载推荐.docx

Thehandshakingprocessisdescribedasfollows:

Whentheprinterisreadytoreceiveachar-acter,itholdsRDY=1.ThePOCmustthenholdacharacteratPD(paralleldata)portandproduceapulseattheterminalTR(transferrequest).TheprinterwillchangeRDYto0,takethecharacter

atPDandholdRDYat0untilthecharacterhasbeenprinted(e.g.delay5or10ms),thensetRDYto1againwhenitisreadytoreceivethenextcharacter.

ThebufferregisterBRisusedtotemporarilyholdacharactersentfromtheprocessor,whichchar-acterwillbetransferredtotheprinterlater.

ThestatusregisterSRisusedfortwocontrolfunctions:

①SR7servesasareadyflagtoindicatePOCisreadyornottoreceiveanewcharacterfromtheprocessor.

②SR0isusedtoenabletheinterruptrequestssentbyPOC.

Ininterruptmode,IfSR0=1,thenPOCwillsendaninterruptrequestsignaltoprocessorwhenitisreadytoreceiveacharacter(i.e.,whenSR7=1).

IfSR0=0,thenPOCwillnotinterrupt.

ThetransferofacharactertoPOCviathesystembusproceedsasfollows:

Ininterruptmode,SR0isalways1.

Aftersendingcharactertoprinter,POCsetstheSR7to1,sinceSR0=1,theinterruptrequestsignal(IRQ)issetto0,whichindicateaneffectiveinterruptsignaltotheprocessor.

1、processorsetsthevalueofSR7&

setsthevalueofBR

①WhentheprocessordetectstheeffectiveIRQsignal,theprocessordirectlyselectsBRandwritesacharacterintoBR,(processorwillneverreadthestateofSR7,whichisdifferentwithpollingmode.)

②ThentheprocessorsetstheSR7to0,whichindicatesthatthenewcharacterhasbeenwritteninto

BRandnotprintedyet.

2、POCreadsandsetsthevalueofSR7&

handshakesoperationswiththeprinter

①WhenPOCdetectsthatSR7issetto0,POCthenproceedstostartthehandshakingoperationswiththeprinter.

②Aftersendingcharactertoprinter,POCsetstheSR7to1,whichindicatesPOCisreadytoreceiveanothercharacterfromtheprocessor.Thetransfercyclecannowrepeat.(①and②aresamewiththepollingstate)

PS:

DuringthehandshakingoperationsbetweenPOCandprinter,theprocessordoesnottrytoaccessPOCuntilitreceivestheinterruptrequestsignal

1.TheoverallconnectionofthesimulatedprinterandPOCexpressedinthetopmoduleform

Figure3.Thetopmoduleformoftheproject

2.Designdescriptionofthesimulationinputwaveforms

TheinputandoutputofCPU,POCandprinterareshownbelow:

Processorj

Pins

Description

Input

clk

InputtheclockfortheCPUrunning.

mode

Choosethemodeforprinting.

Whenmode=’1’,selectainterruptmode.

IRQ

ReceivetheinterruptsignalIRQ.

WhenIRQ='

1'

newdatacanbesent.

DIN[7..0]

Readdatafrompoc.

DOUT[7..0]

Writedataintopoc.

Output

rw

ShowthedirectionoftheDOUT[7..0]andDIN[7..0]Whenrw='

0'

readdatafromPOC.

When'

rw'

='

writedatatoPOC.

A0

ControltheaddressreadandwriteonPOC.

WhenA0='

chooseSR.

chooseBR.

CS

CS=‘1’,pocwork.

data[7..0]

ThedatasendtoPOCtobeprinted

POC

InputtheclockforthePOCrunning.

RW

senddatatoCPU.

readdatafromCPU.

Inputaddress,

chooseBR.WhenA0='

RDY

Inputthereadysignalfromprinter.WhenRDY='

theprinterisidle.

WhenRDY='

theprinterisbusy.

InputthemodeofthePOC.

WhenCS=’0’,selectapollingmode.WhenCS=’1’,selectainterruptmode.

ThedatareceivefromCPUtobeprinted.

PD[7..0]

Outputthedatatoprinter.

OutputtheinterruptsignalIRQtoCPU,

showingthePOCandprinterisready.

TR

Theresponsetoprint'

RDYsignal,aone-cyclepulseattheportTR

(transferrequest)showsthatnewdataissenttoprinter.

CS=0POCsendthestateofSRtoCPU;

CS=1CPUreadthedatawriteinBR

Signal

SR[7..0]

TheregistercontainstheflagsforthePOC.WhenSR(7)='

it'

sidle.

WhenSR(7)='

sbusy.

BR[7..0]

Theregisterholdsthevalueofdatatoprint.

printer

Inputtheclockfortheprinterrunning.

InputthepulsesignalfromPOC,toshownewdataiscoming.

InputthedatafromPOC.

OutputRDYsignal,

whenRDY='

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > PPT模板 > 其它模板

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1