-------------------------------------------- -- A/D converter MCP3208 -------------------------------------------- function adc.init -ai begin )spi.init return load from(Spi.mpo;A) *spi.init -------------------------------------------- -- ( ch )adc.get ->x -------------------------------------------- function adc.get -ag h60 = $60 ch begin ->ch )spi.disable )spi.enable ( ch <<2 |h60 )spi.send )spi.rec12 return load from(Spi.mpo;A) *spi.disable *spi.enable *spi.send *spi.rec12 ---------------------------------------------- -- (fulltime , x , scsh , )adc.time ---------------------------------------------- function adc.time -at t1ms = 80000 begin 0>ftime 1>value 2>scsh ftime *value >>scsh return load from(std.mpo) *mult