MCP320x 16-bit to Nano

For general Flowcode discussion that does not belong in the other sections.
viktor_aust
Posts: 32
http://meble-kuchenne.info.pl
Joined: Fri May 17, 2024 1:04 am
Has thanked: 11 times
Been thanked: 5 times

Re: MCP320x 16-bit to Nano

Post by viktor_aust »

Hi Martin
You did not use the SPI Master component.
Is the next step?

mnfisher
Valued Contributor
Posts: 1918
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 156 times
Been thanked: 902 times

Re: MCP320x 16-bit to Nano

Post by mnfisher »

No I didn't use SPI here...

Just bit-bang the pins....

Martin

viktor_aust
Posts: 32
Joined: Fri May 17, 2024 1:04 am
Has thanked: 11 times
Been thanked: 5 times

Re: MCP320x 16-bit to Nano

Post by viktor_aust »

understood

mnfisher
Valued Contributor
Posts: 1918
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 156 times
Been thanked: 902 times

Re: MCP320x 16-bit to Nano

Post by mnfisher »

Just tested the above bit-bang code with an Arduino (Uno) - and seems to work okay.

With a VRef (and VDD) set at 5V and IN+ and IN- connected to a PSU (I also tried connecting IN- to GND) - I got reasonable results. For example - with the PSU set to 3V - 2.987V was output to UART.

I connected the pins to the logic analyser - and again the output seems reasonable.

0 - is CLK, 1 is Data and 2 is CS. The MCP3201 seems to take a moment to shutdown after CS returns high...
LabNation_Screenshot50.png
LabNation_Screenshot50.png (161.24 KiB) Viewed 55 times
Martin

Post Reply