<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PSoC &#8211; IoT Expert</title>
	<atom:link href="https://iotexpert.com/tag/psoc/feed/" rel="self" type="application/rss+xml" />
	<link>https://iotexpert.com</link>
	<description>Engineering for the Internet of Things</description>
	<lastBuildDate>Tue, 22 Nov 2016 21:32:59 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://iotexpert.com/wp-content/uploads/2017/01/cropped-Avatar-32x32.jpg</url>
	<title>PSoC &#8211; IoT Expert</title>
	<link>https://iotexpert.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>PSoC4000s and the CY8CKIT145 Stamp Board &#8211; Part 2</title>
		<link>https://iotexpert.com/psoc4000s-and-the-cy8ckit145-stamp-board-part-2/</link>
					<comments>https://iotexpert.com/psoc4000s-and-the-cy8ckit145-stamp-board-part-2/#comments</comments>
		
		<dc:creator><![CDATA[Alan Hawse]]></dc:creator>
		<pubDate>Tue, 01 Mar 2016 15:47:41 +0000</pubDate>
				<category><![CDATA[Cy8CKIT-145]]></category>
		<category><![CDATA[Devices]]></category>
		<category><![CDATA[Embedded Design]]></category>
		<category><![CDATA[PSoC 4000S]]></category>
		<category><![CDATA[PSoC Creator]]></category>
		<category><![CDATA[Capsense]]></category>
		<category><![CDATA[PSoC]]></category>
		<guid isPermaLink="false">https://iotexpert.com/?p=617</guid>

					<description><![CDATA[In the previous post, I unboxed the CY8CKIT145 and showed you the schematics.   In this post, I will show you how to build the CapSense firmware that runs on the PSoC4000S.  The first decision I needed to make was how to connect the PSoC and the PRoC chips.  So I looked at the back [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>In the <a href="https://iotexpert.com/2016/02/29/psoc4000s-and-the-cy8ckit145-stamp-board-part-1/">previous post</a>, I unboxed the CY8CKIT145 and showed you the schematics.   In this post, I will show you how to build the CapSense firmware that runs on the PSoC4000S.  The first decision I needed to make was how to connect the PSoC and the PRoC chips.  So I looked at the back of the kit and there was a handy-dandy picture of the schematic in the silkscreen.  Here is a zoomed in view:</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2016/02/zoom-145.png"><img decoding="async" class="alignnone size-full wp-image-625" src="https://iotexpert.com/wp-content/uploads/2016/02/zoom-145.png" alt="zoom-145" width="233" height="206" /></a></p>
<p>I didn&#8217;t have the schematic on the airplane, but here is a more &#8220;schematic&#8221; view of the chips on the board.</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2016/02/systemschematic-c.png"><img fetchpriority="high" decoding="async" class="alignnone size-large wp-image-623" src="https://iotexpert.com/wp-content/uploads/2016/02/systemschematic-c-1024x701.png" alt="systemschematic-c" width="1024" height="701" srcset="https://iotexpert.com/wp-content/uploads/2016/02/systemschematic-c-1024x701.png 1024w, https://iotexpert.com/wp-content/uploads/2016/02/systemschematic-c-600x410.png 600w, https://iotexpert.com/wp-content/uploads/2016/02/systemschematic-c-300x205.png 300w, https://iotexpert.com/wp-content/uploads/2016/02/systemschematic-c.png 1067w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>I knew that the UART source code would be slightly easier, so I picked that as the mechanism to connect the chips.  On my computer I had the &#8220;capsenseled&#8221; workspace from the videos.  So, I created a new PSoC4000S project in that workspace called &#8220;145capsenseled.&#8221;  I started with the schematic:</p>
<ol>
<li>Add the new CapSense component.  I am currently running a &#8220;nightly build&#8221; of PSoC Creator 3.3 that supports the new chip.  You can see in the PSoC Creator release I&#8217;m using there is a prototype version of the CapSense component.</li>
<li>Add 5 Digital Output Pins under software control to drive the LEDs that are next to the slider</li>
<li>Add 1 Digital Output pin to drive the blue LED</li>
<li>Add a Serial Communication Block (SCB) configured as a UART</li>
</ol>
<p><a href="https://iotexpert.com/wp-content/uploads/2016/02/capsenseled-schematic.png"><img decoding="async" class="alignnone size-full wp-image-627" src="https://iotexpert.com/wp-content/uploads/2016/02/capsenseled-schematic.png" alt="capsenseled-schematic" width="456" height="464" srcset="https://iotexpert.com/wp-content/uploads/2016/02/capsenseled-schematic.png 456w, https://iotexpert.com/wp-content/uploads/2016/02/capsenseled-schematic-295x300.png 295w" sizes="(max-width: 456px) 100vw, 456px" /></a></p>
<p>Here is a screenshot of the new CapSense component configuration wizard.  You can see I added a linear slider and set up the component to use SmartSense full-auto tuning.</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2016/02/capsense-configuration.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-631" src="https://iotexpert.com/wp-content/uploads/2016/02/capsense-configuration.png" alt="capsense-configuration" width="639" height="483" srcset="https://iotexpert.com/wp-content/uploads/2016/02/capsense-configuration.png 639w, https://iotexpert.com/wp-content/uploads/2016/02/capsense-configuration-600x454.png 600w, https://iotexpert.com/wp-content/uploads/2016/02/capsense-configuration-300x227.png 300w" sizes="auto, (max-width: 639px) 100vw, 639px" /></a></p>
<p>After configuring the CapSense, I set up the pin assignments using the DWR:</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2016/02/capsenseled-pinassignment1.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-632" src="https://iotexpert.com/wp-content/uploads/2016/02/capsenseled-pinassignment1.png" alt="capsenseled-pinassignment" width="921" height="365" srcset="https://iotexpert.com/wp-content/uploads/2016/02/capsenseled-pinassignment1.png 921w, https://iotexpert.com/wp-content/uploads/2016/02/capsenseled-pinassignment1-600x238.png 600w, https://iotexpert.com/wp-content/uploads/2016/02/capsenseled-pinassignment1-300x119.png 300w" sizes="auto, (max-width: 921px) 100vw, 921px" /></a></p>
<p>Then I wrote the firmware, which was pretty straight forward.</p>
<ul>
<li>10-11 start the CapSense</li>
<li>12 start the UART</li>
<li>16: If the CapSense block is done scanning and is idle, then read the CapSense and do something with it (lines 17 -&gt; 41).</li>
<li>18: figure out where the person is touching</li>
<li>19: if they have actually touched the block</li>
<li>22-26 light up the LEDs</li>
<li>30-35 If there is no touch, then turn off the LEDs.</li>
<li>36-37 start the next scan</li>
<li>38-39: If the UART is not busy&#8230; then send the position (0-100) or (0xFF if there is no touch).</li>
<li>41-42: If there is a byte in the UART receive buffer, then light up or turn off the Blue LED. (Notice that the LED is active low so I use the &#8220;!&#8221; operation to flip the state of the signal.</li>
</ul>
<p><a href="https://iotexpert.com/wp-content/uploads/2016/02/capsense-firmware.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-633" src="https://iotexpert.com/wp-content/uploads/2016/02/capsense-firmware.png" alt="capsense-firmware" width="952" height="898" srcset="https://iotexpert.com/wp-content/uploads/2016/02/capsense-firmware.png 952w, https://iotexpert.com/wp-content/uploads/2016/02/capsense-firmware-600x566.png 600w, https://iotexpert.com/wp-content/uploads/2016/02/capsense-firmware-300x283.png 300w" sizes="auto, (max-width: 952px) 100vw, 952px" /></a></p>
<p>After that, I programmed the kit and tested it.  It seemed like everything was good.  In the <a href="https://iotexpert.com/2016/03/02/psoc4000s-and-the-cy8ckit145-stamp-board-part-3/" target="_blank">next post</a>, I&#8217;ll show you the schematic and firmware that runs on the PRoC BLE.</p>
<p>You can find the PSoC Creator workspace on <a href="https://github.com/iotexpert/CY8CKIT-145-Examples" target="_blank">github</a> in the directory called &#8220;capsenseble-145.&#8221;</p>
<p><span><p><div class="table-responsive"><table  style="width:95%; "  class="easy-table easy-table-default " border="1">
<thead>
<tr><th >Index</th>
<th >Description</th>
</tr>
</thead>
<tbody>
<tr><td ><a href="https://iotexpert.com/2016/02/29/psoc4000s-and-the-cy8ckit145-stamp-board-part-1/">PSoC4000s and the CY8CKIT145 Stamp Board - Part 1</a></td>
<td > The board and schematics</td>
</tr>

<tr><td ><a href="https://iotexpert.com/2016/03/01/psoc4000s-and-the-cy8ckit145-stamp-board-part-2/">PSoC4000s and the CY8CKIT145 Stamp Board - Part 2</a></td>
<td > PSoC4000S Firmware</td>
</tr>

<tr><td ><a href="https://iotexpert.com/2016/03/02/psoc4000s-and-the-cy8ckit145-stamp-board-part-3/">PSoC4000s and the CY8CKIT145 Stamp Board - Part 3</a></td>
<td > PRoC BLE Firmware</td>
</tr>

<tr><td ><a href="https://iotexpert.com/2016/03/05/psoc4000s-and-the-cy8ckit145-stamp-board-part-4/">PSoC4000s and the CY8CKIT145 Stamp Board - Part 4</a></td>
<td > Debugging the problem</td>
</tr>
</tbody></table></div></p></span></p>
]]></content:encoded>
					
					<wfw:commentRss>https://iotexpert.com/psoc4000s-and-the-cy8ckit145-stamp-board-part-2/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>PSoC4000s and the CY8CKIT145 Stamp Board &#8211; Part 1</title>
		<link>https://iotexpert.com/psoc4000s-and-the-cy8ckit145-stamp-board-part-1/</link>
					<comments>https://iotexpert.com/psoc4000s-and-the-cy8ckit145-stamp-board-part-1/#comments</comments>
		
		<dc:creator><![CDATA[Alan Hawse]]></dc:creator>
		<pubDate>Mon, 29 Feb 2016 10:00:35 +0000</pubDate>
				<category><![CDATA[Bluetooth]]></category>
		<category><![CDATA[Cy8CKIT-145]]></category>
		<category><![CDATA[Devices]]></category>
		<category><![CDATA[Embedded Design]]></category>
		<category><![CDATA[PSoC 4000S]]></category>
		<category><![CDATA[Capsense]]></category>
		<category><![CDATA[PSoC]]></category>
		<guid isPermaLink="false">https://iotexpert.com/?p=581</guid>

					<description><![CDATA[One of the cool things about my job is I get to try out lots of new development kits before they are released to the general public.  In the previous post I talked about the demonstration I gave at the Embedded World conference using the CY8CKIT-042 BLE.  You can find a complete video tutorial for that [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>One of the cool things about my job is I get to try out lots of new development kits before they are released to the general public.  In the <a href="https://iotexpert.com/2016/02/28/embedded-world-2016/" target="_blank">previous post</a> I talked about the demonstration I gave at the Embedded World conference using the CY8CKIT-042 BLE.  You can find a complete video tutorial for that project on the cypress.com <a href="http://www.cypress.com/products/how-make-ios-app-control-robot-using-bluetooth-low-energy-ble" target="_blank">video tutorial</a> website.  While I was at the conference, I picked up an engineering sample of a new development kit and put it into my backpack because I wanted to try a new feature of PSoC Creator on the way home.  But, when I got on the airplane, I thought I would build the same project I had demonstrated at the conference using this kit.  So, in the next few posts, I am going to show you the new CY8CKIT145 Stamp Board and how to build an IOT solution with it.</p>
<p>It is called a &#8220;stamp board&#8221; because it comes in a flat postage stamp-like postcard mailer.  Here is a picture of the front and the back (you can see that it has already lived a hard life riding around in my backpack).</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2016/02/IMG_2720.jpg"><img loading="lazy" decoding="async" class="alignnone size-large wp-image-585" src="https://iotexpert.com/wp-content/uploads/2016/02/IMG_2720-1024x768.jpg" alt="IMG_2720" width="1024" height="768" srcset="https://iotexpert.com/wp-content/uploads/2016/02/IMG_2720-1024x768.jpg 1024w, https://iotexpert.com/wp-content/uploads/2016/02/IMG_2720-600x450.jpg 600w, https://iotexpert.com/wp-content/uploads/2016/02/IMG_2720-300x225.jpg 300w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></p>
<p>Here is the back of the mailer:</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2016/02/IMG_2722.jpg"><img loading="lazy" decoding="async" class="alignnone size-large wp-image-584" src="https://iotexpert.com/wp-content/uploads/2016/02/IMG_2722-1024x768.jpg" alt="IMG_2722" width="1024" height="768" srcset="https://iotexpert.com/wp-content/uploads/2016/02/IMG_2722-1024x768.jpg 1024w, https://iotexpert.com/wp-content/uploads/2016/02/IMG_2722-600x450.jpg 600w, https://iotexpert.com/wp-content/uploads/2016/02/IMG_2722-300x225.jpg 300w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></p>
<p>In the picture you can see the yellow label proclaiming this to be an engineering sample.  It doesn&#8217;t seem like much, but when you pull back the front of the package you get to see the surprise:</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2016/02/IMG_2721-1.jpg"><img loading="lazy" decoding="async" class="alignnone size-large wp-image-586" src="https://iotexpert.com/wp-content/uploads/2016/02/IMG_2721-1-1024x768.jpg" alt="IMG_2721-1" width="1024" height="768" srcset="https://iotexpert.com/wp-content/uploads/2016/02/IMG_2721-1-1024x768.jpg 1024w, https://iotexpert.com/wp-content/uploads/2016/02/IMG_2721-1-600x450.jpg 600w, https://iotexpert.com/wp-content/uploads/2016/02/IMG_2721-1-300x225.jpg 300w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></p>
<p>The kit can literally be broken into four separate pieces:</p>
<ol>
<li>The main board:
<ul>
<li>The <a href="http://www.cypress.com/products/32-bit-arm-cortex-m0-psoc-4-s-series" target="_blank">PSoC4000S</a></li>
<li>A reset switch</li>
<li>A user LED</li>
<li>A user push button</li>
<li>A programming selector (to pick either the PSoC4000s or the PRoC BLE (that is on the back of the kit)) as the target of the programmer</li>
<li>All of the PSoC4000S pins are available on the 100mil center headers</li>
<li>A PCB footprint for a 10-pin ARM programming header</li>
</ul>
</li>
<li>A programmer board:
<ul>
<li>A PSoC5LP programmed with KitProg2 Firmware</li>
<li>A programmer mode button</li>
<li>100mil center header with some of the PSoC5LP pins</li>
</ul>
</li>
<li>A Capsense slider user interface board with a 5 Segment Slider and 5 LEDs</li>
<li>A Capsense button user interface board with 3 mutual capacitance buttons and 3 LEDs</li>
</ol>
<p><a href="https://iotexpert.com/wp-content/uploads/2016/02/145front-e.png"><img loading="lazy" decoding="async" class="alignnone size-large wp-image-615" src="https://iotexpert.com/wp-content/uploads/2016/02/145front-e-1024x764.png" alt="145front-e" width="1024" height="764" srcset="https://iotexpert.com/wp-content/uploads/2016/02/145front-e-1024x764.png 1024w, https://iotexpert.com/wp-content/uploads/2016/02/145front-e-600x448.png 600w, https://iotexpert.com/wp-content/uploads/2016/02/145front-e-300x224.png 300w, https://iotexpert.com/wp-content/uploads/2016/02/145front-e.png 1508w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></p>
<p>And the back, with the tiny 10mm X 10mm PRoC BLE module:</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2016/02/IMG_2706.jpg"><img loading="lazy" decoding="async" class="alignnone size-large wp-image-588" src="https://iotexpert.com/wp-content/uploads/2016/02/IMG_2706-1024x768.jpg" alt="IMG_2706" width="1024" height="768" srcset="https://iotexpert.com/wp-content/uploads/2016/02/IMG_2706-1024x768.jpg 1024w, https://iotexpert.com/wp-content/uploads/2016/02/IMG_2706-300x225.jpg 300w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></p>
<p>Here is the schematic for the board:</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2016/02/CY8CKIT-145_PSOC_4A-S1-page1.png"><img loading="lazy" decoding="async" class="alignnone size-large wp-image-606" src="https://iotexpert.com/wp-content/uploads/2016/02/CY8CKIT-145_PSOC_4A-S1-page1-1024x791.png" alt="CY8CKIT-145_PSOC_4A-S1-page1" width="1024" height="791" srcset="https://iotexpert.com/wp-content/uploads/2016/02/CY8CKIT-145_PSOC_4A-S1-page1-1024x791.png 1024w, https://iotexpert.com/wp-content/uploads/2016/02/CY8CKIT-145_PSOC_4A-S1-page1-600x464.png 600w, https://iotexpert.com/wp-content/uploads/2016/02/CY8CKIT-145_PSOC_4A-S1-page1-300x232.png 300w, https://iotexpert.com/wp-content/uploads/2016/02/CY8CKIT-145_PSOC_4A-S1-page1.png 1650w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></p>
<p><a href="https://iotexpert.com/wp-content/uploads/2016/02/CY8CKIT-145_PSOC_4A-S1-page-2.png"><img loading="lazy" decoding="async" class="alignnone size-large wp-image-608" src="https://iotexpert.com/wp-content/uploads/2016/02/CY8CKIT-145_PSOC_4A-S1-page-2-1024x791.png" alt="CY8CKIT-145_PSOC_4A-S1 page 2" width="1024" height="791" srcset="https://iotexpert.com/wp-content/uploads/2016/02/CY8CKIT-145_PSOC_4A-S1-page-2-1024x791.png 1024w, https://iotexpert.com/wp-content/uploads/2016/02/CY8CKIT-145_PSOC_4A-S1-page-2-600x464.png 600w, https://iotexpert.com/wp-content/uploads/2016/02/CY8CKIT-145_PSOC_4A-S1-page-2-300x232.png 300w, https://iotexpert.com/wp-content/uploads/2016/02/CY8CKIT-145_PSOC_4A-S1-page-2.png 1650w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></p>
<p><a href="https://iotexpert.com/wp-content/uploads/2016/02/CY8CKIT-145_PSOC_4A-S1-page3.png"><img loading="lazy" decoding="async" class="alignnone size-large wp-image-609" src="https://iotexpert.com/wp-content/uploads/2016/02/CY8CKIT-145_PSOC_4A-S1-page3-1024x791.png" alt="CY8CKIT-145_PSOC_4A-S1-page3" width="1024" height="791" srcset="https://iotexpert.com/wp-content/uploads/2016/02/CY8CKIT-145_PSOC_4A-S1-page3-1024x791.png 1024w, https://iotexpert.com/wp-content/uploads/2016/02/CY8CKIT-145_PSOC_4A-S1-page3-600x464.png 600w, https://iotexpert.com/wp-content/uploads/2016/02/CY8CKIT-145_PSOC_4A-S1-page3-300x232.png 300w, https://iotexpert.com/wp-content/uploads/2016/02/CY8CKIT-145_PSOC_4A-S1-page3.png 1650w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></p>
<p>I wanted to build a project that would have two-way communication between my iPhone and the board, and would be compatible with the Swift App I had written.  The user of the board would have a capsense slider (and LEDs) of which the iPhone App could read the position.  In addition, it would have an LED that the iOS app could turn on and off.  Here is a demonstration that I filmed with my iPhone on the airplane:</p>

<a href='https://iotexpert.com/wp-content/uploads/2016/02/IMG_2708.mov'>145 Demo Video</a>

<p>In the <a href="https://iotexpert.com/2016/03/01/psoc4000s-and-the-cy8ckit145-stamp-board-part-2/">next post</a> I will describe the overall system and show you the firmware.</p>
<p><span><p><div class="table-responsive"><table  style="width:95%; "  class="easy-table easy-table-default " border="1">
<thead>
<tr><th >Index</th>
<th >Description</th>
</tr>
</thead>
<tbody>
<tr><td ><a href="https://iotexpert.com/2016/02/29/psoc4000s-and-the-cy8ckit145-stamp-board-part-1/">PSoC4000s and the CY8CKIT145 Stamp Board - Part 1</a></td>
<td > The board and schematics</td>
</tr>

<tr><td ><a href="https://iotexpert.com/2016/03/01/psoc4000s-and-the-cy8ckit145-stamp-board-part-2/">PSoC4000s and the CY8CKIT145 Stamp Board - Part 2</a></td>
<td > PSoC4000S Firmware</td>
</tr>

<tr><td ><a href="https://iotexpert.com/2016/03/02/psoc4000s-and-the-cy8ckit145-stamp-board-part-3/">PSoC4000s and the CY8CKIT145 Stamp Board - Part 3</a></td>
<td > PRoC BLE Firmware</td>
</tr>

<tr><td ><a href="https://iotexpert.com/2016/03/05/psoc4000s-and-the-cy8ckit145-stamp-board-part-4/">PSoC4000s and the CY8CKIT145 Stamp Board - Part 4</a></td>
<td > Debugging the problem</td>
</tr>
</tbody></table></div></p></span></p>
]]></content:encoded>
					
					<wfw:commentRss>https://iotexpert.com/psoc4000s-and-the-cy8ckit145-stamp-board-part-1/feed/</wfw:commentRss>
			<slash:comments>12</slash:comments>
		
		
			</item>
	</channel>
</rss>
