12.07.2015 Views

Interfacing the M68HC05 MCU to the MC145051 A/D Converter

Interfacing the M68HC05 MCU to the MC145051 A/D Converter

Interfacing the M68HC05 MCU to the MC145051 A/D Converter

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Freescale Semiconduc<strong>to</strong>r, Inc.Application Notenc...Freescale Semiconduc<strong>to</strong>r, IInside <strong>the</strong><strong>MC145051</strong>process with a graph that depicts <strong>the</strong> testing of a signal of magnitudebetween 3/8 and 4/8 of <strong>the</strong> full scale analog reference voltage. After <strong>the</strong>guesswork is done, <strong>the</strong> binary answer of 011 is written <strong>to</strong> an outputregister for fur<strong>the</strong>r processing.In this example, <strong>the</strong> input voltage does not change over <strong>the</strong> entireconversion process. We have assumed that <strong>the</strong> signal does not changeand <strong>the</strong>re is no noise <strong>to</strong> change <strong>the</strong> input voltage. In most cases asample-and-hold circuit is used <strong>to</strong> sample a voltage signal and hold it fora specific length of time until <strong>the</strong> conversion process is complete.The accuracy, linearity, and speed of <strong>the</strong> successive approximating A/Dconverter are dependent on <strong>the</strong> properties of <strong>the</strong> DAC and <strong>the</strong>compara<strong>to</strong>r. The settling time of <strong>the</strong> DAC and <strong>the</strong> speed of <strong>the</strong>compara<strong>to</strong>r determine <strong>the</strong> speed of <strong>the</strong> conversion process. Likewise, if<strong>the</strong> conversion demands more resolution, <strong>the</strong> time <strong>to</strong> convert will beleng<strong>the</strong>ned. The DAC's non-linearity will result in non-linearities within<strong>the</strong> ADC. All of <strong>the</strong>se fac<strong>to</strong>rs affect <strong>the</strong> digital output result of <strong>the</strong> ADC.As stated earlier, <strong>the</strong> <strong>MC145051</strong> will convert one of <strong>the</strong> 11 analog inputsin<strong>to</strong> a 10-bit digital representation of <strong>the</strong> analog signal. The 10-bit digitalvalue is transmitted <strong>to</strong> <strong>the</strong> outside world via a serial bus. Figure 3 showsa block diagram of <strong>the</strong> <strong>MC145051</strong>. The sequence of starting aconversion, converting <strong>the</strong> voltage, and transmitting <strong>the</strong> result is:1. The CS signal is driven low <strong>to</strong> initialize <strong>the</strong> serial port that a 4-bitaddress is going <strong>to</strong> be received and <strong>the</strong> previous 10-bit digitalresult will be transmitted.2. After <strong>the</strong> 4-bit mux address is received in <strong>the</strong> mux addressregister, one of <strong>the</strong> analog inputs is selected from <strong>the</strong> analogmultiplexer. This signal is sent <strong>to</strong> <strong>the</strong> sample-and-hold <strong>to</strong> start <strong>the</strong>10-bit conversion process.3. While <strong>the</strong> 4-bit address is received, <strong>the</strong> 10-bit previouslyconverted value is sent out on <strong>the</strong> D OUT pin.4. The internal clock drives <strong>the</strong> digital control circuitry, which in turnmanipulates <strong>the</strong> successive approximation register until <strong>the</strong> 10-bitconversion is complete.AN1228 — Rev. 2.04 MOTOROLAFor More Information On This Product,Go <strong>to</strong>: www.freescale.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!