Shop OBEX P1 Docs P2 Docs Learn Events
Help...Help... ADC convert ... — Parallax Forums

Help...Help... ADC convert ...

M.HenriquesM.Henriques Posts: 1
edited 2007-02-08 12:24 in BASIC Stamp
Hello,
·I am to use the ADC of microchip MCP3201, in an application with the BS2, would like to know as to read 12bits of the AD ones
Therefore with this application I do not obtain to get the 12 bits.
··
A2Ddata· ····· CON 0
A2Dclock ····· CON 1
A2Dcs··· ······· CON 2
·result···· ········ VAR Word
·
Main:
·
LOW A2Dcs
·
PULSOUT A2Dclock, 1
SHIFTIN A2Ddata, A2Dclock, MSBPOST, [noparse][[/noparse]result\13]
HIGH A2Dcs
·
Display:
·
DEBUG HOME
DEBUG "ADC..... ", DEC result, " ", CR
··
Best regards
·
Manuel Henriques
Sign In or Register to comment.