浓毛老太交欧美老妇热爱乱,蜜臀性色av免费,妺妺窝人体色www看美女,久久久久久久久久久大尺度免费视频,麻豆人妻无码性色av专区

位置:51電子網(wǎng) » 技術(shù)資料 » 其它綜合

用軟件仿真串口

發(fā)布時(shí)間:2008/6/5 0:00:00 訪問次數(shù):771

;*******************************************************************************

;duplexuartroutinesforthe8xc751and8xc752microcontrollers

;*******************************************************************************

 

;thisisademoprogramshowingawaytoperformsimultaneousrs-232

;transmitandreceiveusingonlyonehardwaretimer.

;thetransmitandreceiveroutinesdivideeachbittimeinto4slicesto

;allowsynchronizingtoincomingdatathatmaybeoutofsynchwithoutgoing

;data.

;themainprogramloopinthisdemoprocessesreceiveddataandsendsit

;backtothetransmitterinhexadecimalformat.thisinsuresthatwecan

;alwaysfillupthereceiverbuffer(sincethereturneddataislongerthan

;thereceiveddata)fortestingpurposes.example:iftheletter"a"is

;received,wewillecho"a41".

;*******************************************************************************

 

;$title(duplexuartroutinesforthe751/752)

;$date(8/20/92)

;$mod751

 

;*******************************************************************************

;definitions

;*******************************************************************************

 

;miscellaneous

txbitlenequ-4+1;timerslicesperserialbittransmit.

rxbitlenequ-4+1;timerslicesperserialbitreceive.

rxhalfbitequ(rxbitlen/4)+1;timerslicesforapartialbittime.

;usedtoadjusttheinputsampling

;timepoint.

;note:txbitlenandrxbitlenarekeptseparateinordertofacilitatethe

;possibilityofhavingdifferenttransmitandreceivebaudrates.thetimer

;wouldbesetuptogivefourslicesforthefastestbaudrate,andthe

;bitlenfortheslowerchannelwouldbesetlongerfortheslowerbaudrate.

;bitlen=-4+1givesfourtimerinterruptsperbit.bitlen=-8+1would

;give8slices,bitlen=-16+1wouldgive16slices,etc.

txpinbitp1.0;rs-232transmitpin(output).

rxpinbitp3.2;rs-232receivepin(input).

rtsbitp1.3;rs-232requesttosendpin(output).

ctsbitp1.6;rs-232cleartosendpin(input).

;note:p1.1andp1.2areusedtoinputthebaudrateselection.

 

;ramlocations

flagsdata20h;miscellaneousbitflags(seebelow).

txonbitflags.0;indicatestransmitterison(busy).

rxonbitflags.1;indicatesreceiverison(busy).

txfullbitflags.2;transmitbuffer(1byteonly)isfull.

rxfullbitflags.3;receiverbufferisfull.

rxavailbitflags.4;rxbufferisnotempty.

overrunerrbitflags.6;overrunerrorflag.

framingerrbitflags.7;framingerrorflag.

baudhighdata21h;highbytetimervalueforbaudrate.

baudlowdata22h;lowbytetimervalueforbaudrate.

txcntdata23h;rs-232bytetransmitbitcounter.

txtimedata24h;rs-232transmittimeslicecount.

txshiftdata25h;transmittershiftregister.

txdatdata26h;transmitterholdingregister.

rxcntdata27h;rs-232bytereceivebitcounter.

rxtimedata28h;rs-232receivetimeslicecount.

rxshiftdata29h;receivershiftregister.

rxdatcntdata2ah;receivedbytecount.

rxbufdata2bh;receivebuffer(3byteslong).

tempdata2fh;temporaryholdingregister.

rthdata40h

rtldata41h

 

;*******************************************************************************

;interruptvectors

;*******************************************************************************

org00h;resetvector.

ajmpreset

 

org03h;externalinterrupt0

ajmpintr0;(receivedrs-232startbit).

 

org0bh;timer0overflowinterrupt.

ajmptimer0;(4xthers-232bitrate).

 

org13h;externalinterrupt1.

reti;(notused).

org1bh;timeriinterrupt.

reti;(notused).

org23h;i2cinterrupt.

reti;(notused).

 

;*******************************************************************************

;interrupthandlers

;*******************************************************************************

;*******************************************************************************

;duplexuartroutinesforthe8xc751and8xc752microcontrollers

;*******************************************************************************

 

;thisisademoprogramshowingawaytoperformsimultaneousrs-232

;transmitandreceiveusingonlyonehardwaretimer.

;thetransmitandreceiveroutinesdivideeachbittimeinto4slicesto

;allowsynchronizingtoincomingdatathatmaybeoutofsynchwithoutgoing

;data.

;themainprogramloopinthisdemoprocessesreceiveddataandsendsit

;backtothetransmitterinhexadecimalformat.thisinsuresthatwecan

;alwaysfillupthereceiverbuffer(sincethereturneddataislongerthan

;thereceiveddata)fortestingpurposes.example:iftheletter"a"is

;received,wewillecho"a41".

;*******************************************************************************

 

;$title(duplexuartroutinesforthe751/752)

;$date(8/20/92)

;$mod751

 

;*******************************************************************************

;definitions

;*******************************************************************************

 

;miscellaneous

txbitlenequ-4+1;timerslicesperserialbittransmit.

rxbitlenequ-4+1;timerslicesperserialbitreceive.

rxhalfbitequ(rxbitlen/4)+1;timerslicesforapartialbittime.

;usedtoadjusttheinputsampling

;timepoint.

;note:txbitlenandrxbitlenarekeptseparateinordertofacilitatethe

;possibilityofhavingdifferenttransmitandreceivebaudrates.thetimer

;wouldbesetuptogivefourslicesforthefastestbaudrate,andthe

;bitlenfortheslowerchannelwouldbesetlongerfortheslowerbaudrate.

;bitlen=-4+1givesfourtimerinterruptsperbit.bitlen=-8+1would

;give8slices,bitlen=-16+1wouldgive16slices,etc.

txpinbitp1.0;rs-232transmitpin(output).

rxpinbitp3.2;rs-232receivepin(input).

rtsbitp1.3;rs-232requesttosendpin(output).

ctsbitp1.6;rs-232cleartosendpin(input).

;note:p1.1andp1.2areusedtoinputthebaudrateselection.

 

;ramlocations

flagsdata20h;miscellaneousbitflags(seebelow).

txonbitflags.0;indicatestransmitterison(busy).

rxonbitflags.1;indicatesreceiverison(busy).

txfullbitflags.2;transmitbuffer(1byteonly)isfull.

rxfullbitflags.3;receiverbufferisfull.

rxavailbitflags.4;rxbufferisnotempty.

overrunerrbitflags.6;overrunerrorflag.

framingerrbitflags.7;framingerrorflag.

baudhighdata21h;highbytetimervalueforbaudrate.

baudlowdata22h;lowbytetimervalueforbaudrate.

txcntdata23h;rs-232bytetransmitbitcounter.

txtimedata24h;rs-232transmittimeslicecount.

txshiftdata25h;transmittershiftregister.

txdatdata26h;transmitterholdingregister.

rxcntdata27h;rs-232bytereceivebitcounter.

rxtimedata28h;rs-232receivetimeslicecount.

rxshiftdata29h;receivershiftregister.

rxdatcntdata2ah;receivedbytecount.

rxbufdata2bh;receivebuffer(3byteslong).

tempdata2fh;temporaryholdingregister.

rthdata40h

rtldata41h

 

;*******************************************************************************

;interruptvectors

;*******************************************************************************

org00h;resetvector.

ajmpreset

 

org03h;externalinterrupt0

ajmpintr0;(receivedrs-232startbit).

 

org0bh;timer0overflowinterrupt.

ajmptimer0;(4xthers-232bitrate).

 

org13h;externalinterrupt1.

reti;(notused).

org1bh;timeriinterrupt.

reti;(notused).

org23h;i2cinterrupt.

reti;(notused).

 

;*******************************************************************************

;interrupthandlers

;*******************************************************************************
相關(guān)IC型號

熱門點(diǎn)擊

 

推薦技術(shù)資料

羅盤誤差及補(bǔ)償
    造成羅盤誤差的主要因素有傳感器誤差、其他磁材料干擾等。... [詳細(xì)]
版權(quán)所有:51dzw.COM
深圳服務(wù)熱線:13692101218  13751165337
粵ICP備09112631號-6(miitbeian.gov.cn)
公網(wǎng)安備44030402000607
深圳市碧威特網(wǎng)絡(luò)技術(shù)有限公司
付款方式


 復(fù)制成功!