DesigningthePCBased4Chann精.docx

上传人:b****5 文档编号:4401336 上传时间:2022-12-01 格式:DOCX 页数:14 大小:1,004.47KB
下载 相关 举报
DesigningthePCBased4Chann精.docx_第1页
第1页 / 共14页
DesigningthePCBased4Chann精.docx_第2页
第2页 / 共14页
DesigningthePCBased4Chann精.docx_第3页
第3页 / 共14页
DesigningthePCBased4Chann精.docx_第4页
第4页 / 共14页
DesigningthePCBased4Chann精.docx_第5页
第5页 / 共14页
点击查看更多>>
下载资源
资源描述

DesigningthePCBased4Chann精.docx

《DesigningthePCBased4Chann精.docx》由会员分享,可在线阅读,更多相关《DesigningthePCBased4Chann精.docx(14页珍藏版)》请在冰豆网上搜索。

DesigningthePCBased4Chann精.docx

DesigningthePCBased4Chann精

The5StudentConferenceonResearchandDevelopment–SCOReD200711-12December2007,Malaysia

th

DesigningthePC-Based4-ChannelDigitalStorageOscilloscopebyusingDSPTechniques

N.SulaimanandN.A.Mahmud

HISdocumentexplainsanddemonstrateshowtheDSOcanbeoperatedvirtually,namely,runningatPC.Inaddition,thedocumentalsoexplainshowtheGUIisdeveloped,testedandhowtheintegrationbetweenhardwareandsoftwareisdone.DSOhasbeenpreferableequipmentbyscientistsorengineersoracademiciansorstudentsaswelltoverifytheelectricalorelectroniccircuitoperationandtosavetheanalyzedsignalforfuturereference.DSOwilldisplaythesignalamplitude,frequency,periodandwaveshapeandchangesinvoltageovertime.DSOusesADCtosamplethesignalandconvertthevoltagebeingmeasuredintodigitalform.ThevitalcriterionindesigningthePC-BasedOscilloscopeisthecapabilitytomeasureanddisplaythesignalcorrectlyandaccurately.Inordertoachieveit,severalfactorsneedtobeconsidered.Amongthemarethesamplingrate,goodamplifierbandwidth,gooddataacquisitiondevices,

IndexTerms—DSO,ADC,GUI,PIC,PC-Based4-ChannelnumberofADCchip,sizeofRAM,agoodPIC,external

FlashADCwithdirectmemoryaccessandDSPtechniquesOscilloscope

usedtoprocessthesignalandfilterthesignalfromnoise.

Besides,thefunctionalbuttonoftheDSOneedtobestudied

I.NOMENCLATUREsothatthebuttoncreatedinGUIwillcarrythesame

functionalityasthenormalDSO.Moreover,DSOisselectedDSO-DigitalStorageOscilloscope

inthisresearchnottheanalogtypeOscilloscopebecauseofPC-PersonalComputer

thecapabilityoftheequipmenttoobserveslowmovingGUI-GraphicalUserInterface

signalsasasolidpresentationonthemonitorscreen[6].TheADC-Analog-to-DigitalConverter

DSOalsohasanabilitytoholdorretainasignalinmemoryRAM-RandomAccessMemory

forlongperiodsoftime.InordertosamplethecorrectsignalPIC-PeripheralInterfaceComputer

andtoavoidaliasing,Low-passanti-aliasingfilterisused.For

thedisplayformattorepresentthecapturedwaveformontheTheresearchwasdonebyastudentunderherfinalyearengineering

projectsubjectandguidedbyalecturer.Theresearchwascarriedoutatscreen,sineinterpolationtechniqueisusedbecauseitcanUniversitiMalaysiaPahang(UMP).provideagoodrepresentationwithasfewas2.5samplesperAllauthorsareattachedtoFacultyofElectrical&ElectronicEngineeringcycle[6].(FKEE),UniversitiMalaysiaPahang(UMP),LockedBag12,25000Kuantan,

ThebrainofthehardwareisPICwhichwillprocessthePahangDarulMakmur,Malaysia.

receivedsignalandthensendthedatatoPCthroughRS232E-mail:

norizam@ump.edu.my

Abstract—Nowadays,theDigitalStoragestartstoreplace

analogtypeOscilloscopeduetothebetterfunctionalityandfeatures.DigitalStorageOscilloscope(DSO)isadeviceusedbyengineers,scientistorengineeringstudentstoverifyorchecktheelectroniccircuitoperationwherethedisplayedsignalintheDSOmonitorcanbeanalyzedandsavedforfuturereference.DSOusesanAnalog-to-DigitalConverter(ADC)toconverttheelectricalvoltageorcurrentbeingmeasuredintodigitalformatcertainsamplingtime.Thesampleofthesignalwillbesavedandaccumulateduntilitabletodescribeawaveformandreassemblesthewaveformforviewinginonthemonitorscreen.ThepurposeoftheresearchistodesignthePC-Based4-ChannelOscilloscopewheretheelectricalsignalbeingmeasuredwillbedisplayedonthePC(PersonalComputer)monitorequippedwithfunctionalitybuttonshownintermofWindowbasedGUI(GraphicalUserInterface).TheGUIisdevelopedbyusingMicrosoftVisualC++6.0.ThePIC(PeripheralInterfaceController)isusedfordataacquisitionwhichtransfersthedatabeingmeasuredtoPCthroughRS232.Here4built-inADCsareusedinordertoproduce4channelsOscilloscope.ThePICisprogrammedbyusingClanguagetoreadthedatafromADCandthentransferthedatatoPC.Frequencyof5kHzisusedasasamplingrate.Meanwhile,theclockspeedof20MHzisselectedinordertoreducethepowerconsumptionandnoise.Inaddition,8KbytesRAMchipisusedforstoringpurpose.Theresearchoutcomeshows3typesofwaveformssuchasSinusoidal,SquareandTriangulararedisplayedwiththecorrectfrequencyandamplitude.ItistestedbyusingSignalGeneratorasaninputtoproducethewaveformtothehardware.Theintegrationbetweenhardware(PIC)andsoftware(GUI)isfullyworking.Besidethat,theGUIisveryuserfriendlyandeasytobeconfigured.Thedatafromthesignalbeingmeasuredalsocanbesavedandrestored.

USART-UniversalSynchronousAsynchronousReceiverTransmitterSPI-SerialPeripheralInterfaceI2C-InterIC

UART-UniversalAsynchronousReceiverTransmitter

TACQ-TimeAcknowledgementforPICBOR-Brown-Out-Reset

TC-HoldCapacitorChargingTime

II.INTRODUCTION

T

1-4244-1470-9/07/$25.00©2007IEEE.

Authorizedlicenseduselimitedto:

ZhengzhouUniversity.DownloadedonMay12,2010at02:

40:

10UTCfromIEEEXplore.Restrictionsapply.

accordingtotheinstructionembeddedtothechip.ThePICcontains4built-inADCstorepresentthe4channelscope.ThePICusesHarvardarchitectureduetofast,efficientandeffectiveprocessors.

InordertomakethecommunicationbetweenPICandPCworkcorrectlyandeffectively,theUSARTisused[8].ThedatafromPICthensenttotheMAX232bufferandthentransferredtoPC’sportthroughRS2329-pin.TheGUIatPCneedstobeconfiguredinordertointerpretthedataandshowthewaveformonthemonitorscreen.Theillustrationhowthe

dataistransmittedtoPCthroughRS232isshowninFigure1.

Fig.2.Simplifiedblockdiagramofresearchcomponents

FromFigure2,itcanbeclearlyseenthat8KbytesRAMisusedforstoragepurpose,8datalineconnectedtoportB(D7–

Fig.1.DatatransmissiontoPCthroughRS232D0)and13addresslinesconnectedtoportCandpotD.Since

2bytesarerequiredperreading.Hence,4000readingscanbe

III.METHODOLGYstored,that’s1000foreachchannel.Noticealsoonecontrol

lineconnectedfromPICtoRAMchip.ThislineisusedtoputTheresearchbeganbyselectingthecorrectandsuitabletheRAMchipinreadorwritemode.TheMAX232linecomponents.ThemaincomponentareFlashtypebufferisconnectedtopinRC7andRC6ofthePIC.PortDisMicrocontroller(PIC16F877)with4built-inADCs,SPI,I2C,usedforthefirst8-bitsofthe13-bitsaddressbus(213=8192UART,8-channel10bitADC,two8-bittimers,one16-bitaddress).PortEisusedtoselectRS232baudrateasshownintimer,watchdogtimer,BORandIn-Circuit-SerialTable1.TheRC4toRC0isusedfortheupper5-bitsoftheProgramming,RS-485typeUART.OthercomponentsaddressbusandPortBisusedfor8-bitdatabus.Theonlyinclude8KbytesRAMchip,MAX232(forlinebuffer)andcomponentmakinguseofthedataandaddressbusesistheRS2329-pinconnectedatPCanda5VvoltageregulatorexternalRAMchip.Inaddition,onelineisneededtoput(7805)topowerthecircuit.TheMAX232bufferisusedtoRAMchipinReadorWritemode[5].converttheTTLseriallogicofthePIC’sUARTtothecorrectRS232format[5].ThefourPIC’sADCpinsareusedfordataTABLE1

DIP-SWITCHCONFIGURATION

acquisition.TheUARThasbaudratesof300bpsto115kbps

with8or9bits,parity,startandstopbits.Aclockspeedtothe

PICissetto20MHznotonlytoreducepowerconsumptionandnoise,buttoobtainamaximumbaudrateof115kbpsoftheUARTforthefastercommunicationbetweenPICandPC[5].ThesimplifiedblockdiagramoftheresearchcomponentisshowninFigure2.

A5VVoltageRegulatorisneededinthedesigninordertogeneratea5VoltDCoutputtopowerthecircuit[9].The0.1µFcapacitorsareusedtoabsorblinenoise.Meanwhile,100µFcapacitorsareusedforstorageinthecaseofminordropinpowerinmillisecondsoftime;theoperationofthecircuitwillbenotaffected.

Forcommunicationprotocoldevelopment,therearetwomaincommunicationprotocols;real-timeandstorage[10].Theblockdiagramofreal-timecommunicationprotocolisshowninFigure3.

Authorizedlicenseduselimitedto:

ZhengzhouUniversity.DownloadedonMay12,2010at02:

40:

10UTCfromIEEEXplore.Restrictionsapply.

below.

TC=CHOLD(RIC+RSS+RS)In(1/2047)(3)=(-120pF)(1kΩ+7kΩ+10kΩ)In(0.0004885)=16.47µs

Thus,theTACQissetasbelow:

TACQ=2µs+16.47µs+[(50oC–25oC)](0.05µs/oC)

=19.72µs

Fig.3.Real-timemodewithfourchannels

TheGUIfortheresearchisdevelopedbyusingMicrosoft

TheRS232communicationisthebottleneckasthe

VisualC++6.0.TheprogramiscalledScope.exe.The

maximumsamplingfrequencyofPIC16F877Microcontroller

programisshowninFigure4.

ADCishigherthancanbetransmittedoverRS232[8].

Therefore,itmakessensetocalculatethemaximumsampleratebasebasedoncapacityofdatatransmittedthroughRS232atdifferentbaudrates.Twobytesaresentperframewhicheachbytecontains8-bitsplusastartbitandstopbit.Hence,20-bitsaresentperreading.Theformulaforcalculatingthesamplerateisshownbelow.

Samplerate=Baudrate/20

(1)No.ofChannels

Table2showsthetheoreticalreal-timesampleratesfor10-bit

ADC.

Fig.4.DisplayofScope.exeprogram

TABLE2

THEORETICALREAL-TIMESAMPLERATESThelefthalfofthewindowdisplaysthewaveformandthe

(10-bitADC)

righthalfofthewindowdisplaythecontrolpanels.The

controldialogishiddenanditcanbeactivatedbyclickingonthewaveformdisplayasshowninFigure5.ChannelsRaterateSample

at230Kbpsat1

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

当前位置:首页 > PPT模板 > 商务科技

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

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