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 NoteAppendix B — MC68HC705C8/<strong>MC145051</strong> FlowchartSTART"INITIALIZE PORTS"PORT A = PORT B = PORT C = $FFDATA DIR A = DATA DIR B = DATA DIR C = $FFnc...Freescale Semiconduc<strong>to</strong>r, I"INITIALIZE THE A/D CHANNEL #"CHANNEL = $00"INITIALIZE SPI MODULE"TURN ON MASTER MODECPHA = CPOL = 0"BEGIN A/D ACQUISITION"CS = 0"1ST 8-BIT SERIAL TRANSFER"LOAD ACCA UPPER NIBBLEWITH CHANNEL #STORE ACCA TO SPI DATA REGISTERTO START TRANSMISSIONIS SERIALTRANSFER DONE?NOYESAAN1228 — Rev. 2.020 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!