tag 标签: 不适用定时器

相关资源
  • 所需E币: 3
    时间: 2019-12-24 19:14
    大小: 88.28KB
    上传者: wsu_w_hotmail.com
    ThePIC16C5Xhasone8-bittimer(Timer0)whichcanusean8-bitprescaler.Insomeinstances,theuserwouldliketousethistimerforsomeotherpurposeandyet,beabletodoatransmitandreceiveusingtheserialport.Thisapplicationnoteoffersroutinestodoasim-ple8-bittransmitandreceivewithnohandshake,atbaudratesfrom1200to9600.PleasenotethattheseroutinesuseatimedloopwhichisasaccurateastheclockwhichdrivesthePIC16C5X.Theuserentersthefrequencyandbaudratedesired.Thecalculatedvalue“delay”intheserialroutinehastobean8-bitvalueonly.Ifthevalueisgreaterthan8-bits,thefrequencyandbaudratevalueshavetobechanged.AN593SerialPortRoutinesWithoutUsingTimer0CONCLUSIONAuthor:StanD’SouzaMicrochipTechnologyInc.SimpletransmitandreceiveroutinescanbewrittenwithoutusingTimer0togeneratethebaudrate.INTRODUCTIONThePIC16C5Xhasone8-bittimer(Timer0)whichcanusean8-bitprescaler.Insomeinstances,theuserwouldliketousethistimerforsomeotherpurposeandyet,beabletodoatransmitandreceiveusingtheserialport.Thisapplicationnoteoffersroutinestodoasim-ple8-bittransmi……