<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to MCP3008 only gives 255 or 0</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/9eda65c2dd/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/9eda65c2dd/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/9eda65c2dd/</id><updated>2020-02-27T16:12:09.271000Z</updated><subtitle>Recent posts to MCP3008 only gives 255 or 0</subtitle><entry><title>MCP3008 only gives 255 or 0</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/9eda65c2dd/?limit=25#4b2e" rel="alternate"/><published>2020-02-27T16:12:09.271000Z</published><updated>2020-02-27T16:12:09.271000Z</updated><author><name>eamonn</name><uri>https://forge.codesys.com/u/eamonn/</uri></author><id>https://forge.codesys.com93d29555113ddc1ee4abe8267b8fbb6abb24e8b6</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thanks for the reply.&lt;br/&gt;
That seems to have fixed the problem.&lt;br/&gt;
I now get a range of readings. similar to what I expected.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MCP3008 only gives 255 or 0</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/9eda65c2dd/?limit=25#904b" rel="alternate"/><published>2020-02-27T16:12:08.445000Z</published><updated>2020-02-27T16:12:08.445000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.com87128b822637e7c9c991e87fafef4a828f4ba919</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
if you are working with Rasbian Stretch from 11-29-2017 Version (current Version)&lt;br/&gt;
there seems a Problem with the maxSPI Speed.&lt;br/&gt;
You can reduce here the SPImax Speed, then it should work. (sure depends on your used Versions of Rasbian)&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://www.raspberrypi.org/forums/viewtopic.php?f=44&amp;amp;t=207412" rel="nofollow"&gt;https://www.raspberrypi.org/forums/view ... 4&amp;amp;t=207412&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Edwin&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: SPI_SPeed.jpg" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=3548"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MCP3008 only gives 255 or 0</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/9eda65c2dd/?limit=25#0241" rel="alternate"/><published>2020-02-27T16:12:06.165000Z</published><updated>2020-02-27T16:12:06.165000Z</updated><author><name>eamonn</name><uri>https://forge.codesys.com/u/eamonn/</uri></author><id>https://forge.codesys.comb343a8abd70d68e271ae7173c06f1dc8ba11917e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I set up the mcp3008 the same as the picture. I am using different sensors though.&lt;br/&gt;
I tried testing it with a potentiometer and that's how I found out it gives 255 if the channel input is 1 volt higher than Vref and 0 if its less.&lt;br/&gt;
I am using a raspberry pi 3 model B.&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Untitled.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=3547"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MCP3008 only gives 255 or 0</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/9eda65c2dd/?limit=25#1d86" rel="alternate"/><published>2020-02-27T16:12:05.364000Z</published><updated>2020-02-27T16:12:05.364000Z</updated><author><name>Ingo</name><uri>https://forge.codesys.com/u/ingo/</uri></author><id>https://forge.codesys.com0b3fd527ed03f9c79416f1d9f4212223fbb497da</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Can you post your setup?&lt;br/&gt;
A photo or a sketch (e.g. with "Fritzing").&lt;/p&gt;
&lt;p&gt;Gesendet von meinem LG-H870 mit Tapatalk&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MCP3008 only gives 255 or 0</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/9eda65c2dd/?limit=25#5df7" rel="alternate"/><published>2020-02-27T16:12:04.560000Z</published><updated>2020-02-27T16:12:04.560000Z</updated><author><name>eamonn</name><uri>https://forge.codesys.com/u/eamonn/</uri></author><id>https://forge.codesys.com14c6f224900e45096ec6107f1f0fcdd78152e095</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I am trying to measure temperature using a MCP3008 to convert the values. The only values I get from it are 0 or 255.&lt;br/&gt;
I check the wiring a few times so I doubt that's the problem. I have setup the SPI master and MCP3008.&lt;br/&gt;
It only gives 255 when the input to channel 0 is 1V higher than Vref.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>