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 E — MC68HC705K1/<strong>MC145051</strong> FlowchartSTART"INITIALIZE PORT A"PORT A = $01PORT A DIRECTION = $07nc...Freescale Semiconduc<strong>to</strong>r, ICLEAR SER_OUT"BEGIN A/D ACQUISITION"CS = 0TMP_CHN = 0CHANNELCLEAR THE RESULT REGISTERS"INIT LOOP1 COUNTER"IX = 4"READ THE SERIAL INPUT PIN"SET CARRY BIT ACCORDING TO VALUE OF SER_INROTATE C BIT LEFT INTO RESULT REGISTERS0"WRITE THE SERIAL OUTPUT PIN"ROTATE LEFT TMP_CHNBIT #4 OFTMP_CHN?NOIX = 0?YESB1SET SER_OUT"CLOCK THE SERIAL CLOCK PIN"SET SER_CLKCLEAR SER_CLKDECREMENTIXAN1228 — Rev. 2.026 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!