Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Homepage
include "mcp3202.h"
SPI spi(PA_7,PA_6,PA_5); mosi , miso ,sck
MCP3202 ma_adc = MCP3202(spi, PA_0);
int main() { spi.format(8,0); spi.frequency(1000000); printf("====== Init mcp3202======\n"); ThisThread::sleep_for(1000ms); printf("====== Start ======\n");
while(1)# { printf("Reading of channel A \n"); int valA = ma_adc.readA(); wait_us(1000); printf("Reading of channel B \n"); int valB = ma_adc.readB(); wait_us(1000000); printf ("Result %d , %d \n ", valA , valB); } }