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 Note* Start ano<strong>the</strong>r SPI transmission <strong>to</strong> receive <strong>the</strong>* 2 least significant bitslda CHANNEL ;load ACCA with CHANNELsta SPDR ;s<strong>to</strong>re ACCA <strong>to</strong> spi data regWAIT2 brclr 7,SPSR,WAIT2 ;wait until SPIF flag is setlda SPDR ;load ACCA with LSB of ADC resultsta RESULT+1 ;s<strong>to</strong>re this <strong>to</strong> LSB of RESULTsta PORTC ;s<strong>to</strong>re <strong>the</strong> 2 LSBs <strong>to</strong> Port Cbset CS,PORTA ;CS* is high, end 16 bit framenc...Freescale Semiconduc<strong>to</strong>r, I* Wait for ever until resetFOR bra FOR ;branch <strong>to</strong> itselforg $1FFE ;define reset vec<strong>to</strong>rdw STARTAN1228 — Rev. 2.024 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!