<?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>PIC Projects &#8211; semifluid.com</title>
	<atom:link href="/category/pic-projects/feed/" rel="self" type="application/rss+xml" />
	<link>/</link>
	<description>Intermediate in flow properties between solids and liquids; highly viscous.</description>
	<lastBuildDate>Thu, 31 May 2018 17:28:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.1</generator>
	<item>
		<title>8&#215;8 RGB LED Display</title>
		<link>/2010/06/28/8x8-rgb-led-display/</link>
		
		<dc:creator><![CDATA[Steven A. Cholewiak]]></dc:creator>
		<pubDate>Tue, 29 Jun 2010 02:21:23 +0000</pubDate>
				<category><![CDATA[C Projects]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[LEDs]]></category>
		<category><![CDATA[PIC Projects]]></category>
		<category><![CDATA[PIC16F628]]></category>
		<category><![CDATA[Controller]]></category>
		<category><![CDATA[LED]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[RGB]]></category>
		<guid isPermaLink="false">/?p=213</guid>

					<description><![CDATA[So, this project was sidelined until I had to make another BatchPCB purchase.  Thankfully it wasn&#8217;t too long until I had the opportunity to work on it again! The current setup is basically 4 of the original 4 RGB LED Controller boards and 12 of the updated DR1r3 boards. All 16 are wired in parallel [&#8230;]]]></description>
										<content:encoded><![CDATA[<p style="text-align: left;">So, this project was sidelined until I had to make another BatchPCB purchase.  Thankfully it wasn&#8217;t too long until I had the opportunity to work on it again!  The current setup is basically 4 of the <a href="http://semifluid.com/2009/01/06/pic16f628-4-rgb-led-pwm-controller/">original 4 RGB LED Controller boards</a> and 12 of the <a href="http://semifluid.com/2010/02/16/4-rgb-led-controller-update/">updated DR1r3 boards</a>.  All 16 are wired in parallel and being controlled by my desktop machine.  You can see an extended version of this RGB test sequence after the break and I&#8217;m also including the (uncommented, sorry!) <a href="http://processing.org/" target="_blank">Processing 1.1</a> code that I used to control the boards.</p>
<p><center><br />
<iframe title="8x8 RGB LED Display - Closeup" width="648" height="486" src="https://www.youtube.com/embed/ImFNgAgYKUY?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe><br />
</center></p>
<p><span id="more-213"></span></p>
<p>Here&#8217;s an extended cut of the video display (which is displaying an RGB Test Sequence).  Note that the current maximum throughput is approximately 12-13 frames per second due to the RS-232 baud rate bottleneck, but I&#8217;m looking for ways to speed up the data transfer without requiring a faster oscillator.:</p>
<p><center><br />
<iframe title="8x8 RGB LED Display" width="648" height="486" src="https://www.youtube.com/embed/gtfMJSERY3o?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe><br />
</center></p>
<p>The <a href="http://processing.org/" target="_blank">Processing 1.1</a> code:<br />
<a href="/wp-content/uploads/2010/06/VideoDisplay.zip">VideoDisplay</a> (includes the .pde file and the video used)</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>4 RGB LED Controller Update</title>
		<link>/2010/02/16/4-rgb-led-controller-update/</link>
		
		<dc:creator><![CDATA[Steven A. Cholewiak]]></dc:creator>
		<pubDate>Tue, 16 Feb 2010 17:44:18 +0000</pubDate>
				<category><![CDATA[C Projects]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[LEDs]]></category>
		<category><![CDATA[PIC Projects]]></category>
		<category><![CDATA[PIC16F628]]></category>
		<category><![CDATA[Controller]]></category>
		<category><![CDATA[LED]]></category>
		<category><![CDATA[Lights]]></category>
		<category><![CDATA[RGB]]></category>
		<guid isPermaLink="false">/?p=191</guid>

					<description><![CDATA[I recently began working on a consulting project that required the creation of some PCBs.  Since I have had such great success with BatchPCB.com in the past, I decided to use them again to fab the custom PCBs.  The BatchPCB purchasing system adds a few static fees (set-up, handling, and shipping), so I felt that [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I recently began working on a consulting project that required the creation of some PCBs.  Since I have had such great success with BatchPCB.com in the <a href="http://semifluid.com/2009/01/06/pic16f628-4-rgb-led-pwm-controller/" target="_self">past</a>, I decided to use them again to fab the custom PCBs.  The BatchPCB purchasing system adds a few static fees (set-up, handling, and shipping), so I felt that this was as good a time as any to make some additional of my <a href="http://semifluid.com/2009/01/06/pic16f628-4-rgb-led-pwm-controller/" target="_self">PIC16F628 4 RGB LED PWM Controller</a> boards with a couple of modifications.</p>
<p><a href="/wp-content/uploads/2010/02/DSC_1877.jpg"><img fetchpriority="high" decoding="async" class="aligncenter size-medium wp-image-197" title="4 RGB LED Controller Boards" src="/wp-content/uploads/2010/02/DSC_1877-300x200.jpg" alt="" width="300" height="200" /></a></p>
<p><span id="more-191"></span>As I noted in the previous post, there was an error on the first revision of the board and a pull-up resistor on RA5 (pin 4 in the schematic above) was necessary.  I added the MCLR resistor to the board along with a couple of other modifications:</p>
<ul>
<li>Removed the extraneous capacitors, we only need one.</li>
<li>Added a breakout for the one remaining I/O pin.</li>
<li>Added a small perfboard to the PCB with +5V and ground lines.</li>
<li>Relocated the resistors to make them <em>much easier </em>to solder.  I may use a SIL resistor array in the future.</li>
</ul>
<p>I kept the LED locations exactly the same because, hey, if I put all of the time and effort into the 4 boards that I previously ordered, then I might as well keep the same form factor.  My scheme for the short-term is to create a 4&#215;4 array of the 4 RGB LED Controller boards, which will give me a 20cmx20cm 8&#215;8 RGB LED display.</p>
<p>Here are some pictures of the boards:</p>
<p style="text-align: center;"><a href="/wp-content/uploads/2010/02/DSC_1874.jpg"><img loading="lazy" decoding="async" class="size-thumbnail wp-image-196 alignnone" title="4 RGB LED Controller Board Front" src="/wp-content/uploads/2010/02/DSC_1874-150x150.jpg" alt="" width="150" height="150" /></a> <a href="/wp-content/uploads/2010/02/DSC_1872.jpg"><img loading="lazy" decoding="async" class="size-thumbnail wp-image-195 alignnone" title="4 RGB LED Controller Board Back" src="/wp-content/uploads/2010/02/DSC_1872-150x150.jpg" alt="" width="150" height="150" /></a> <a href="/wp-content/uploads/2010/02/DSC_1871.jpg"><img loading="lazy" decoding="async" class="size-thumbnail wp-image-194 alignnone" title="4 RGB LED Controller Board Front and Back" src="/wp-content/uploads/2010/02/DSC_1871-150x150.jpg" alt="" width="150" height="150" /></a><a href="/wp-content/uploads/2010/02/DSC_1868.jpg"> <img loading="lazy" decoding="async" class="alignnone size-thumbnail wp-image-193" title="4 RGB LED Controller Boards Group" src="/wp-content/uploads/2010/02/DSC_1868-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p style="text-align: left;">Here is the updated schematic and board (note, you can open the BRD and SCH files in <a href="http://www.cadsoftusa.com/" target="_blank">Eagle Layout Editor</a>):</p>
<p style="text-align: center;"><a href="/wp-content/uploads/2010/02/PIC16F628-4-RGB-LED-DR1r3-Eagle-Schematic.png"><img loading="lazy" decoding="async" class="alignnone size-thumbnail wp-image-206" title="PIC16F628 4 RGB LED DR1r3 Eagle Schematic" src="/wp-content/uploads/2010/02/PIC16F628-4-RGB-LED-DR1r3-Eagle-Schematic-150x150.png" alt="" width="150" height="150" /></a> <a href="/wp-content/uploads/2010/02/PIC16F628-4-RGB-LED-DR1r3-Eagle-Board.png"><img loading="lazy" decoding="async" class="alignnone size-thumbnail wp-image-205" title="PIC16F628 4 RGB LED DR1r3 Eagle Board" src="/wp-content/uploads/2010/02/PIC16F628-4-RGB-LED-DR1r3-Eagle-Board-150x150.png" alt="" width="150" height="150" /></a></p>
<ul>
<li><a href="/wp-content/uploads/2010/02/PIC16F628-4-RGB-LED-DR1r3.brd">PIC16F628 4 RGB LED DR1r3 Eagle Board</a></li>
</ul>
<p style="text-align: left;">And finally, here is an updated firmware that improves the PWM performance:</p>
<ul>
<li><a href="/wp-content/uploads/2010/02/16F628-Serial-4-LED-PWM-4-bit-exp-DR1r8.c">16F628 Serial 4 LED PWM &#8211; 4-bit exp DR1r8.c</a></li>
<li><a href="/wp-content/uploads/2010/02/16F628-Serial-4-LED-PWM-4-bit-exp-DR1r8.hex">16F628 Serial 4 LED PWM &#8211; 4-bit exp DR1r8.hex</a></li>
</ul>
<p>I will make sure to post when I have the full array put together (I currently only have 12 of the 16 boards I need for the 4&#215;4 array).</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>PIC16F628 4 RGB LED PWM Controller</title>
		<link>/2009/01/06/pic16f628-4-rgb-led-pwm-controller/</link>
		
		<dc:creator><![CDATA[Steven A. Cholewiak]]></dc:creator>
		<pubDate>Tue, 06 Jan 2009 19:36:53 +0000</pubDate>
				<category><![CDATA[C Projects]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[LEDs]]></category>
		<category><![CDATA[PIC Projects]]></category>
		<guid isPermaLink="false">/?p=147</guid>

					<description><![CDATA[I am a big fan of LEDs.  Bright, colorful, flashing LEDs.  So, given my affinity for LEDs, I decided to work on a controller that me and a few of my friends could use as an art project/passive information display.  I have posted videos from the first prototypes (here and here), but it has been [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I am a big fan of <a href="http://en.wikipedia.org/wiki/LED" target="_blank">LEDs</a>.  Bright, colorful, flashing LEDs.  So, given my affinity for LEDs, I decided to work on a controller that me and a few of my friends could use as an art project/passive information display.  I have posted videos from the first prototypes (<a href="http://semifluid.com/2008/10/06/pic16f628-serial-4-led-pwm/" target="_self">here</a> and <a href="http://semifluid.com/2008/12/05/pic16f628-serial-4-led-pwm-dr1r6/" target="_self">here</a>), but it has been tough to dedicate time to further development given my research, so I thought I would post the information so that anyone can take the design and modify it to their liking!</p>
<p><a href="/wp-content/uploads/2009/01/4rgbled-angle-rainbow.jpg" target="_blank"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-152" title="4rgbled-angle-rainbow_thumb" src="/wp-content/uploads/2009/01/4rgbled-angle-rainbow_thumb.jpg" alt="" width="500" height="334" /><span id="more-147"></span></a></p>
<p>Some insipration came from the <a href="http://thingm.com/products/blinkm/" target="_blank">BlinkM</a> &#8220;smart LED&#8221; and the <a href="http://www.macetech.com/blog/node/54" target="_blank">ShiftBrite</a> RGB LED Module, but I was interested in using RS232 serial control.  Therefore, I chose one of my favorite simple-to-use microcontrollers, the PIC16F628.  The advantages include the built-in 4MHz oscillator, hardware USART, and ease of reprogramming.  A couple of features I had in mind during the design:</p>
<ol>
<li>Multiple intensities for each color (using PWM)</li>
<li>Multiple individually controllable RGB LEDs</li>
<li>High-speed update rate</li>
<li>Daisy-chainable and addressable</li>
<li>Simple serial control</li>
</ol>
<p style="text-align: left;"><strong>Schematic</strong><a href="/wp-content/uploads/2009/01/pic16f628-4-rgb-led-dr1r1-schematic.png" target="_blank"><br />
Here</a> is the full schematic for the driver.  I chose to use a <a href="http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010209" target="_blank">PIC16F628</a> as the microcontroller because it is cheap, has a internal oscillator (4 MHz) and an internal USART. NOTE: There is an error in this schematic and a pull-up resistor on RA5 (pin 4 in the schematic) is necessary.  See the bottom of the post for an updated schematic and board.
</p>
<p style="text-align: left;"><a href="/wp-content/uploads/2009/01/pic16f628-4-rgb-led-dr1r1-schematic.png" target="_blank"><img loading="lazy" decoding="async" class="size-thumbnail wp-image-164 aligncenter" title="pic16f628-4-rgb-led-dr1r1-schematic" src="/wp-content/uploads/2009/01/pic16f628-4-rgb-led-dr1r1-schematic-150x150.png" alt="" width="150" height="150" /></a></p>
<p><strong>Board<br />
</strong>I decided I would try getting a PCB printed for the first time, so I got boards created at BatchPCB.com for $5 each.  The total for 4 boards shipped was $32.36 (4 x $5 for the boards and $12.36 for shipping and handling).  They took a long time to arrive, but the quality was well worth the wait.  NOTE: There is an error on the first revision of the board and a pull-up resistor on RA5 (pin 4 in the schematic above) is necessary.  You can see how I compensated for the mistake in the <a href="/wp-content/uploads/2009/01/4rgbled-front-off.jpg" target="_blank">second picture</a> below (look on the back of the upper-left board).  This will be corrected in future revisions.  See the bottom of the post for an updated schematic and board.</p>
<p style="text-align: center;"><a href="/wp-content/uploads/2009/01/pic16f628-4-rgb-led-dr1r1-board.png"><img loading="lazy" decoding="async" class="alignnone size-thumbnail wp-image-165" title="pic16f628-4-rgb-led-dr1r1-board" src="/wp-content/uploads/2009/01/pic16f628-4-rgb-led-dr1r1-board-150x150.png" alt="" width="150" height="150" /></a> <a href="/wp-content/uploads/2009/01/4rgbled-front-off.jpg"><img loading="lazy" decoding="async" class="alignnone size-thumbnail wp-image-157" title="4rgbled-front-off" src="/wp-content/uploads/2009/01/4rgbled-front-off-150x150.jpg" alt="" width="150" height="150" /></a> <a href="/wp-content/uploads/2009/01/4rgbled-angle-off.jpg"><img loading="lazy" decoding="async" class="alignnone size-thumbnail wp-image-153" title="4rgbled-angle-off" src="/wp-content/uploads/2009/01/4rgbled-angle-off-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p><strong>Control Format<br />
</strong>The current firmware has 8 commands (the 9th, self-test was removed to save space).  See the source code for the firmware for how the commands are implemented, but here is some example usage:</p>
<ul>
<li>Turn off all LEDs: 0h2000FF</li>
<li>Make all LEDs full-intensity red: 0h2F00FF</li>
<li>Make all LEDs full-intensity red: 0h1F00F00F00F00FF</li>
<li>Make all LEDs at address 1 half-intensity green: 0h207001</li>
<li>Make LED 2 at address 1 half-intensity green: 0h100007000000001</li>
<li>Load start-up settings for all controllers: 0h40FF</li>
</ul>
<p>Commands:</p>
<ol>
<li>Update individual LEDs using 4-bit exponential update<br />
Byte 1, Nibble 1 = led1Red;   Byte 1, Nibble 2 = led1Green<br />
Byte 2, Nibble 1 = led1Blue;  Byte 2, Nibble 2 = led2Red<br />
Byte 3, Nibble 1 = led2Green; Byte 3, Nibble 2 = led2Blue<br />
Byte 4, Nibble 1 = led3Red;   Byte 4, Nibble 2 = led3Green<br />
Byte 5, Nibble 1 = led3Blue;  Byte 5, Nibble 2 = led4Red<br />
Byte 6, Nibble 1 = led4Green; Byte 6, Nibble 2 = led4Blue<br />
Byte 7 = theAddress</li>
<li>Update all LEDs using 4-bit exponential update<br />
Byte 0, Nibble 2 = led1Red = led2Red = led3Red = led4Red<br />
Byte 1, Nibble 1 = led1Green = led2Green = led3Green = led4Green<br />
Byte 1, Nibble 2 = led1Blue = led2Blue = led3Blue = led4Blue<br />
Byte 2 = theAddress</li>
<li>Save start-up settings<br />
Byte 1 = theAddress</li>
<li>Load start-up settings<br />
Byte 1 = theAddress</li>
<li>Get address<br />
Byte 1 = theAddress</li>
<li>Set address (one-time set)<br />
Byte 1 = theAddress to save<br />
Byte 2 = theAddress</li>
<li><strong><em>Disabled in this release.<br />
</em></strong>Self test<br />
Byte 1 = theAddress</li>
<li>Update individual LEDs using 6-bit update<br />
Byte 1 = led1Red;    Byte 2 = led1Green<br />
Byte 3 = led1Blue;   Byte 4 = led2Red<br />
Byte 5 = led2Green;  Byte 6 = led2Blue<br />
Byte 7 = led3Red;    Byte 8 = led3Green<br />
Byte 9 = led3Blue;   Byte 10 = led4Red<br />
Byte 11 = led4Green; Byte 12 = led4Blue<br />
Byte 13 = theAddress</li>
<li>Update all LEDs using 6-bit update<br />
Byte 1 = led1Red = led2Red = led3Red = led4Red<br />
Byte 2 = led1Green = led2Green = led3Green = led4Green<br />
Byte 3 = led1Blue = led2Blue = led3Blue = led4Blue<br />
Byte 4 = theAddress</li>
</ol>
<p><strong>Source Code<br />
</strong>The PIC16F628 needs to be programmed with the firmware below.  The Windows application is included as an example of how one could control a 2&#215;2 array of the PIC16F628 4 RGB LED PWM Controller boards (4&#215;4 LEDs).</p>
<ul>
<li><a href="/wp-content/uploads/2009/01/16f628-serial-4-led-pwm-4-bit-exp-dr1r7.c">16f628-serial-4-led-pwm-4-bit-exp-dr1r7.c</a> (<a href="/wp-content/uploads/2009/01/16f628-serial-4-led-pwm-4-bit-exp-dr1r7.hex">hex</a>)</li>
<li><a href="/wp-content/uploads/2009/01/16-led-sequencer-dr1r2.zip">16 Led Sequencer DR1r2</a></li>
</ul>
<p>The first couple of prototypes have worked well, but I am still working on refining the PCB, circuit, firmware, and software design.  Here are a few pictures of the boards:</p>
<p style="text-align: center;"><a href="/wp-content/uploads/2009/01/4rgbled-angle-rainbow.jpg"><img loading="lazy" decoding="async" class="alignnone size-thumbnail wp-image-163" title="4rgbled-angle-rainbow" src="/wp-content/uploads/2009/01/4rgbled-angle-rainbow-150x150.jpg" alt="" width="150" height="150" /></a> <a href="/wp-content/uploads/2009/01/4rgbled-front-rainbow.jpg"><img loading="lazy" decoding="async" class="alignnone size-thumbnail wp-image-159" title="4rgbled-front-rainbow" src="/wp-content/uploads/2009/01/4rgbled-front-rainbow-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p style="text-align: center;"><a href="/wp-content/uploads/2009/01/4rgbled-angle-white.jpg"><img loading="lazy" decoding="async" class="alignnone size-thumbnail wp-image-151" title="4rgbled-angle-white" src="/wp-content/uploads/2009/01/4rgbled-angle-white-150x150.jpg" alt="" width="150" height="150" /></a> <a href="/wp-content/uploads/2009/01/4rgbled-front-white.jpg"><img loading="lazy" decoding="async" class="alignnone size-thumbnail wp-image-161" title="4rgbled-front-white" src="/wp-content/uploads/2009/01/4rgbled-front-white-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p style="text-align: left;"><strong><em>Update (01/06/2008)</em><br />
</strong>Here is an updated schematic and board with the corrected MCLR pullup:
</p>
<p style="text-align: center;"><a href="/wp-content/uploads/2009/01/pic16f628-4-rgb-led-dr1r2-schematic.png"><img loading="lazy" decoding="async" class="alignnone size-thumbnail wp-image-175" title="pic16f628-4-rgb-led-dr1r2-schematic" src="/wp-content/uploads/2009/01/pic16f628-4-rgb-led-dr1r2-schematic-150x150.png" alt="" width="150" height="150" /></a> <a href="/wp-content/uploads/2009/01/pic16f628-4-rgb-led-dr1r2-board.png"><img loading="lazy" decoding="async" class="alignnone size-thumbnail wp-image-176" title="pic16f628-4-rgb-led-dr1r2-board" src="/wp-content/uploads/2009/01/pic16f628-4-rgb-led-dr1r2-board-150x150.png" alt="" width="150" height="150" /></a></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>PIC16F628 Serial 4 LED PWM DR1r6</title>
		<link>/2008/12/05/pic16f628-serial-4-led-pwm-dr1r6/</link>
		
		<dc:creator><![CDATA[Steven A. Cholewiak]]></dc:creator>
		<pubDate>Fri, 05 Dec 2008 19:33:16 +0000</pubDate>
				<category><![CDATA[C Projects]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[LEDs]]></category>
		<category><![CDATA[PIC Projects]]></category>
		<category><![CDATA[PIC16F628]]></category>
		<category><![CDATA[Software]]></category>
		<guid isPermaLink="false">/?p=139</guid>

					<description><![CDATA[I&#8217;ve been working on a project in my spare time with two friends to create some ambient light controllers, so I thought I&#8217;d just post two short videos to demonstrate the current state of the project.  In the current iteration, they can be used as wall-washers or they can be enclosed to create ambient light [&#8230;]]]></description>
										<content:encoded><![CDATA[<p style="text-align: left;">I&#8217;ve been working on a <a href="http://semifluid.com/2008/10/06/pic16f628-serial-4-led-pwm/" target="_self">project</a> in my spare time with two friends to create some ambient light controllers, so I thought I&#8217;d just post two short videos to demonstrate the current state of the project.  In the current iteration, they can be used as wall-washers or they can be enclosed to create ambient light cubes/spheres/<a href="http://en.wikipedia.org/wiki/Pentagonal_cupola" target="_self">pentagonal cupolas</a>/<a href="http://en.wikipedia.org/wiki/Rhombo-hexagonal_dodecahedron" target="_blank">rhombo-hexagonal dodecahedrons</a>/etc.  Each module is addressable and uses a PIC16F628 to control each of the RGB LEDs (which were purchased from the eBay seller <a href="http://myworld.ebay.com/jeledhk/" target="_blank">jeledhk</a> with the description &#8220;Superflux RGB 5mm R/H LEDLamp 8Kmcd COMMON CATHODE&#8221;).  The PCBs were created using BatchPCB.com for $5 each (+ ~$15 total for S&amp;H and setup) and are beautifully etched, drilled, and silkscreened (although it took about 1.5 months to receive them).  Ok, less talk, more videos; one video on the front page and another after the jump:</p>
<p><center><br />
<iframe loading="lazy" title="PIC16F628 Serial 4 LED PWM DR1r6 Demo" width="648" height="486" src="https://www.youtube.com/embed/iiQMxkn_BJo?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe><br />
</center></p>
<p><span id="more-139"></span></p>
<p><center><br />
<iframe loading="lazy" title="PIC16F628 Serial 4 LED PWM DR1r6 Random Noise" width="648" height="486" src="https://www.youtube.com/embed/Zky58Ku6aD0?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe><br />
</center></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>PIC16F628 Serial 4 LED PWM</title>
		<link>/2008/10/06/pic16f628-serial-4-led-pwm/</link>
		
		<dc:creator><![CDATA[Steven A. Cholewiak]]></dc:creator>
		<pubDate>Mon, 06 Oct 2008 15:37:00 +0000</pubDate>
				<category><![CDATA[C Projects]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[LEDs]]></category>
		<category><![CDATA[PIC Projects]]></category>
		<category><![CDATA[PIC16F628]]></category>
		<guid isPermaLink="false">/?p=127</guid>

					<description><![CDATA[It has been a long time since I&#8217;ve done any microcontroller work, so I decided to get back into the swing of things when 2 of my friends and I decided on collaborating on an interactive &#8220;art&#8221; piece.  Details are forthcoming, but in the meantime, a photo and a video of one of the LED [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>It has been a long time since I&#8217;ve done any microcontroller work, so I decided to get back into the swing of things when 2 of my friends and I decided on collaborating on an interactive &#8220;art&#8221; piece.  Details are forthcoming, but in the meantime, a photo and a video of one of the LED components (video after the break):</p>
<p style="text-align: center;"><a href="/wp-content/uploads/2008/10/cimg9028.jpg" target="_blank"><img loading="lazy" decoding="async" class="size-full wp-image-128 aligncenter" title="cimg9028_tn" src="/wp-content/uploads/2008/10/cimg9028_tn.jpg" alt="" width="500" height="509" /></a></p>
<p style="text-align: left;"><span id="more-127"></span></p>
<p><center><br />
<iframe loading="lazy" title="PIC16F628 Serial 4 LED PWM 4-bit exp DR1r2" width="648" height="486" src="https://www.youtube.com/embed/XIAShJc-6vI?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe><br />
</center></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Tracking a Bike Ride &#038; PIC16F88 GPS Logger DR1r7</title>
		<link>/2007/06/15/tracking-a-bike-ride-pic16f88-gps-logger-dr1r7/</link>
		
		<dc:creator><![CDATA[Steven A. Cholewiak]]></dc:creator>
		<pubDate>Fri, 15 Jun 2007 22:36:20 +0000</pubDate>
				<category><![CDATA[C Projects]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[PIC Projects]]></category>
		<category><![CDATA[PIC16F88]]></category>
		<guid isPermaLink="false">/?p=80</guid>

					<description><![CDATA[My original intention for my PIC16F88 Delorme Tripmate GPS Logger and GPS Logger with Time and Speed was to log my runs around Lafayette and West Lafayette. However, I&#8217;ve found that the weight of the GPS makes it a real pain to lug it around. Running around with a weight bouncing around in my backpack [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>My original intention for my <a href="http://semifluid.com/2007/01/26/pic16f88-delorme-tripmate-gps-logger/">PIC16F88 Delorme Tripmate GPS Logger</a> and <a href="http://semifluid.com/2007/02/01/pic16f88-delorme-tripmate-gps-logger-with-time-and-speed/">GPS Logger with Time and Speed</a> was to log my runs around <a href="http://www.lafayette.in.gov/" target="_blank">Lafayette</a> and <a href="http://www.westlafayette.in.gov/" target="_blank">West Lafayette</a>.  However, I&#8217;ve found that the weight of the GPS makes it a real pain to lug it around.  Running around with a weight bouncing around in my backpack is no fun.  Now that it has gotten warmer and the sun is shining &#8217;til 9 PM (really more like <a href="http://www.gaisma.com/en/location/west-lafayette-indiana.html" target="_blank">9:30 PM</a>), I&#8217;ve been biking quite a bit.  The lower impact nature of bike riding makes it much easier to carry the Tripmate GPS receiver.  So I took went out this afternoon for a ride to see how it performs:</p>
<p style="text-align: center"><a href="/wp-content/uploads/2007/06/2007-06-15-bike-ride.jpg" title="2007-06-15 Bike Ride Path" target="_blank"><img decoding="async" src="/wp-content/uploads/2007/06/2007-06-15-bike-ride-thumb.jpg" alt="2007-06-15 Bike Ride Path Thumbnail" /></a></p>
<p>And the ride did not turn out too bad!  (Click the image above to see a better view of the route, outlined in yellow.)  There are some problems with the logging, but this can be attributed to the quality of the fix (most likely 2-D for most of the ride) and the tendency for the GPS to loose its fix when the sky was occluded.  See the upper right of the path where I went biking through the woods and you can see that it lost the fix from the time I entered the woods to the time I left them.  Continue to the post for more information and the updated firmware.<span id="more-80"></span></p>
<p>A few weeks ago, I talked with an individual about modifying the firmware for use with PC GPS software.  One major problem is the current size of the firmware.  There are so many function calls at this point that is difficult to add much more.  However, I was able to manipulate the output format to make it compatible with some software that reads NMEA sentences.</p>
<p><strong>What are the functional changes in the firmware?</strong></p>
<p>The updated firmware, which can be found at the bottom of the post, uses the same circuit as my <a href="http://semifluid.com/2007/01/26/pic16f88-delorme-tripmate-gps-logger/">PIC16F88 Delorme Tripmate GPS Logger</a> and <a href="http://semifluid.com/2007/02/01/pic16f88-delorme-tripmate-gps-logger-with-time-and-speed/">GPS Logger with Time and Speed</a>.  The output format is modified:<br />
<em>$GPRMC,123456,A,4234.4594,N,11233.2892,W,78910</em></p>
<p>This sentence contains the following information:</p>
<ul>
<li><strong>123456</strong> UTC Time of fix 12:34:56</li>
<li><strong>A</strong> Navigation receiver warning (A = Valid, V = Invalid)</li>
<li><strong>4234.4594,N</strong> Latitude 42 degrees, 34.4594 minutes North</li>
<li><strong>11233.2892,W</strong> Longitude 112 degrees, 33.2892 minutes West</li>
<li><strong>78910</strong> EEPROM end address of the sentence (for determination of where the sentence was stored)</li>
</ul>
<p>In addition, the serial baud rate has been increased to 38400 baud.  This was done to decrease the read time; however, it may be a good idea to revert to 4800 baud if you plan on directly reading the data with a dedicated GPS program (like <a href="https://en.wikipedia.org/wiki/Microsoft_Streets_%26_Trips" target="_blank">Microsoft Streets &amp; Trips</a> or <a href="http://shop.delorme.com/OA_HTML/DELibeCCtpSctDspRte.jsp?section=10120&amp;minisite=10020" target="_blank">Delorme Street Atlas USA</a>) Therefore to read data, you must:</p>
<ol>
<li>Use a normal serial cable to connect computer and circuit</li>
<li>Open serial terminal application with settings: 38400, 8, N, 1 and enable recording data</li>
<li>Power circuit with mode switch depressed to read back GPS data stored on EEPROM</li>
<li>Disconnect circuit power to stop reading data</li>
</ol>
<p>Once the data has been captured, you can directly open the file with a NMEA processing program such as <a href="http://4river.a.la9.jp/gps/file/nmea2kmz.htm" target="_blank">Nmea2kmz</a>.  If you use Nmea2kmz, make sure to use the following settings:</p>
<p style="text-align: center"><a href="/wp-content/uploads/2007/06/2007-06-15-nmea2kmz.jpg" title="2007-06-15 Bike Ride Nmea2kmz settings"><img decoding="async" src="/wp-content/uploads/2007/06/2007-06-15-nmea2kmz.jpg" alt="2007-06-15 Bike Ride Nmea2kmz settings" /></a></p>
<p>After the KML file is created, you can open it directly in <a href="http://www.google.com/earth/index.html" target="_blank">Google Earth</a>.  If you are interested in more information about the route, look on the left-hand side and you can get information about the total trip time and the total distance followed.  For example, today I biked 28.839 km (17.920 miles) in 1 hour, 23 minutes, and 53 seconds:</p>
<p align="center"> <a href="/wp-content/uploads/2007/06/2007-06-15-distance.jpg" target="_blank"><img decoding="async" src="/wp-content/uploads/2007/06/2007-06-15-distance-thumb.jpg" alt="2007-06-15 Bike Ride Path Time and Distance Thumbnail" /></a></p>
<p>Here are the raw data file from this GPS logger firmware (DR1r7), the KML file created by Nmea2kml, and a KMZ file created by Google Earth for my bike ride this afternoon:</p>
<ul>
<li><a href="/wp-content/uploads/2007/06/2007-06-15-gps.TXT" title="2007-06-15-gps.TXT">2007-06-15-gps.TXT</a> (234 KB)</li>
<li><a href="/wp-content/uploads/2007/06/14_55_32.kml" target="_blank">14_55_32.kml</a> (1.2 MB)<a href="/wp-content/uploads/2007/06/14_55_32.kml" target="_blank"><br />
</a></li>
<li><a href="/wp-content/uploads/2007/06/14_55_32.kmz" target="_blank">14_55_32.kmz</a> (78 KB)<a href="/wp-content/uploads/2007/06/14_55_32.kmz" target="_blank"><br />
</a></li>
</ul>
<p><strong>Source Code<br />
</strong>As with the original <a href="http://semifluid.com/2007/01/26/pic16f88-delorme-tripmate-gps-logger/">PIC16F88 Delorme Tripmate GPS Logger</a> and <a href="http://semifluid.com/2007/02/01/pic16f88-delorme-tripmate-gps-logger-with-time-and-speed/">GPS Logger with Time and Speed</a>, the PIC16F88 must be initially programmed with the â€˜tinybld16F88_i8MHz _19200.HEXâ€<img src="https://s.w.org/images/core/emoji/15.0.3/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /> hex file to program the GPS logger firmware onto the PIC. If you have already programmed the bootloader onto the PIC then all you need is to load the newest firmware below.</p>
<ul>
<li><a href='http://semifluid.com/wp-content/uploads/2007/06/tinybld16F88_i8MHz-_19200.hex'>tinybld16F88_i8MHz _19200.hex</a></li>
<li><a href="/wp-content/uploads/2007/06/16f88-24lc1025-gps-compress-dr1r7.c" target="_blank">16f88-24lc1025-gps-compress-dr1r7.c</a> (<a href="/wp-content/uploads/2007/06/16f88-24lc1025-gps-compress-dr1r7.hex" target="_blank">HEX</a>)</li>
<li><a href='http://semifluid.com/wp-content/uploads/2007/06/241025multi.c'>241025multi.c</a></li>
</ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>PIC16F88 Delorme Tripmate GPS Logger with Time and Speed</title>
		<link>/2007/02/01/pic16f88-delorme-tripmate-gps-logger-with-time-and-speed/</link>
		
		<dc:creator><![CDATA[Steven A. Cholewiak]]></dc:creator>
		<pubDate>Fri, 02 Feb 2007 04:47:26 +0000</pubDate>
				<category><![CDATA[C Projects]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[PIC Projects]]></category>
		<category><![CDATA[PIC16F88]]></category>
		<guid isPermaLink="false">/?p=46</guid>

					<description><![CDATA[I&#8217;ve updated my PIC16F88 Delorme Tripmate GPS Logger, so it now includes time and speed logging. Using the trip information recorded by the GPS logger, you now have even more variables to play with. For example, using time and velocity information, one can plot not only the speed, but also the acceleration of the car [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve updated my <a href="http://semifluid.com/2007/01/26/pic16f88-delorme-tripmate-gps-logger/">PIC16F88 Delorme Tripmate GPS Logger</a>, so it now includes time and speed logging. Using the trip information recorded by the GPS logger, you now have even more variables to play with. For example, using time and velocity information, one can plot not only the speed, but also the acceleration of the car (dv/dt) for a trip:</p>
<p><a href="http://semifluid.com/wp-content/uploads/2007/02/Accel-and-Speed.gif"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2007/02/Accel-and-Speed-300x170.gif" alt="" title="Accel-and-Speed" width="300" height="170" class="aligncenter size-medium wp-image-1028" srcset="/wp-content/uploads/2007/02/Accel-and-Speed-300x170.gif 300w, /wp-content/uploads/2007/02/Accel-and-Speed-1024x583.gif 1024w, /wp-content/uploads/2007/02/Accel-and-Speed.gif 1186w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>Continue to the post for more information about the updated firmware, usage instructions, and limitations of this firmware.<span id="more-46"></span></p>
<p>This PIC16F88 Delorme Tripmate GPS Logger with Time and Speed firmware uses the exact same hardware and software of the <a href="http://semifluid.com/2007/01/26/pic16f88-delorme-tripmate-gps-logger/">PIC16F88 Delorme Tripmate GPS Logger</a>, so please follow the instructions on the PIC16F88 Delorme Tripmate GPS Logger page for information about component selection and circuit construction. This firmware is intended solely as an update to allow for speed and time logging.</p>
<p>The firmware was rewritten to accommodate the variable logging changes, so the structure is quite different. Unfortunately I had to move most of the processing commands to functions outside of main() because of page size limitations. This clutters the code quite a bit, but I needed to do it to fit all of the code onto a PIC16F88. I&#8217;m planning on moving this firmware to a PIC18F series microcontroller at some point to take advantage of the larger program space and RAM. However, for the time being this current iteration will stand as my exercise monitor.</p>
<p><strong>What are the functional changes in the firmware?</strong></p>
<ol>
<li>The microcontroller now records Time, Latitude, Longitude, and Speed when valid data being received (as opposed to just Latitude and Longitude). Unfortunately, due to the program memory restrictions of the PIC16F88, I was unable to include date and/or Course Made Good (heading) recording.  Please note that the date and heading are stored in RAM but are not written to the EEPROM.</li>
<li>The read mode no longer outputs nice, Google-friendly Latitude and Longitude coordinates. Again, due to program memory restrictions, I removed all floating point math. Therefore, the Latitude and Longitude are now presented in the original NMEA HHMM.MMMM format. This requires some post processing, but it is very minimal.  Please see the Excel file included with the example below.</li>
<li>Any previously recorded data will return nonsense information.  This is due to the new storage format.</li>
</ol>
<p>Other than these functional changes, the firmware should be drop-in compatible.</p>
<p><strong>Source Code<br />
</strong>As with the original <a href="http://semifluid.com/2007/01/26/pic16f88-delorme-tripmate-gps-logger/">PIC16F88 Delorme Tripmate GPS Logger</a>, the PIC16F88 must be initially programmed with the â€˜tinybld16F88_i8MHz _19200.HEXâ€<img src="https://s.w.org/images/core/emoji/15.0.3/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /> hex file to program the GPS logger firmware onto the PIC. If you have already programmed the bootloader onto the PIC then all you need is to load the newest firmware below.</p>
<ul>
<li><a href='http://semifluid.com/wp-content/uploads/2007/02/tinybld16F88_i8MHz-_19200.hex'>tinybld16F88_i8MHz _19200.hex</a></li>
<li><a href='http://semifluid.com/wp-content/uploads/2007/02/16F88-24LC1025-GPS-Compress-DR1r6.c'>16F88 &#8211; 24LC1025 GPS Compress DR1r6.c</a> (<a href='http://semifluid.com/wp-content/uploads/2007/02/16F88-24LC1025-GPS-Compress-DR1r6.hex'>hex</a>)</li>
<li><a href='http://semifluid.com/wp-content/uploads/2007/02/241025multi.c'>241025multi.c</a></li>
</ul>
<p><strong><em>UPDATE (February 27, 2007)</em></strong><br />
Terry pointed out the following issue with the source code:</p>
<blockquote><p>Found one bug. In socal, the longitude is &gt; 99, so the fprintf needs to be changed from:</p>
<p>void sendDataToSerial() {<br />
fprintf(PC,&#8221;%06Lu,&#8221;, GPRMC.time);<br />
fprintf(PC,&#8221;%04Lu.%04Lu,%C,&#8221;, GPRMC.latHandM, GPRMC.latFractM, GPRMC.latDir);<br />
fprintf(PC,&#8221;%04Lu.%04Lu,%C,&#8221;, GPRMC.lonHandM, GPRMC.lonFractM, GPRMC.lonDir);<br />
fprintf(PC,&#8221;%03Lu.%03Lurn&#8221;, GPRMC.speedH, GPRMC.speedL);<br />
}</p>
<p>To:</p>
<p>void sendDataToSerial() {<br />
fprintf(PC,&#8221;%06Lu,&#8221;, GPRMC.time);<br />
fprintf(PC,&#8221;%04Lu.%04Lu,%C,&#8221;, GPRMC.latHandM, GPRMC.latFractM, GPRMC.latDir);<br />
fprintf(PC,&#8221;%05Lu.%04Lu,%C,&#8221;, GPRMC.lonHandM, GPRMC.lonFractM, GPRMC.lonDir);<br />
fprintf(PC,&#8221;%03Lu.%03Lurn&#8221;, GPRMC.speedH, GPRMC.speedL);<br />
}</p></blockquote>
<p><strong>Example Output</strong></p>
<ul>
<li>Raw data output from PIC16F88 Delorme Tripmate GPS Logger: <a href='http://semifluid.com/wp-content/uploads/2007/02/2007-02-01.txt'>2007-02-01.txt</a></li>
</ul>
<p><a href="http://semifluid.com/wp-content/uploads/2007/02/2007-02-01.jpg"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2007/02/2007-02-01-300x225.jpg" alt="" title="2007-02-01" width="300" height="225" class="aligncenter size-medium wp-image-1034" srcset="/wp-content/uploads/2007/02/2007-02-01-300x225.jpg 300w, /wp-content/uploads/2007/02/2007-02-01.jpg 512w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>PIC16F88 Delorme Tripmate GPS Logger</title>
		<link>/2007/01/26/pic16f88-delorme-tripmate-gps-logger/</link>
		
		<dc:creator><![CDATA[Steven A. Cholewiak]]></dc:creator>
		<pubDate>Fri, 26 Jan 2007 22:05:56 +0000</pubDate>
				<category><![CDATA[C Projects]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[PIC Projects]]></category>
		<category><![CDATA[PIC16F88]]></category>
		<guid isPermaLink="false">/?p=43</guid>

					<description><![CDATA[This project focused on creating a simple serial data logger for the Delorme Tripmate (also known as the GPSTripmate). The Tripmate is an older GPS receiver that can be purchased on eBay for &#60;$20. I happen to have one that my family used a couple of years ago and it is still in great shape. [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="http://semifluid.com/wp-content/uploads/2007/01/PIC16F88_GPS_Logger.jpg"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2007/01/PIC16F88_GPS_Logger.jpg" alt="" title="PIC16F88 Delorme Tripmate GPS Logger" width="240" height="180" class="alignleft size-full wp-image-1019" /></a>This project focused on creating a simple serial data logger for the <a href="http://www.bevhoward.com/TripMate.htm" target="_blank">Delorme Tripmate</a> (also known as the GPSTripmate).  The Tripmate is an older GPS receiver that can be purchased on eBay for &lt;$20.  I happen to have one that my family used a couple of years ago and it is still in great shape.  It has been sitting in the back of my car for the past four years, so I finally decided to put it to good use.  The plan was to create a GPS data logger that would record the position of the unit and allow me to read back the latitude and longitude after acquiring the data.  My ultimate goal will be to use a small backpack to record my runs (once the weather warms up).  This was a fun experiment because not only did I need to interface the PIC16F88 to the Tripmate, but I also needed to parse the output and implement an efficient storage solution.  Read on to find out more information about the project, see the schematic and soure code I wrote, and find out how the data was visualized.<span id="more-43"></span></p>
<p><strong>Delorme Tripmate<br />
</strong>The Tripmate was a GPS receiver manufactured by <a href="http://info.delorme.com/" target="_blank">Delorme</a> that was originally intended for use with their Street Atlas USA computer program.  The Tripmate uses an RS-232 serial connection to send and receive data using  the <a href="https://en.wikipedia.org/wiki/NMEA_0183" target="_blank">NMEA 0183</a> standard (i.e. 4800 baud, 8 data bits, 1 stop bit, no parity).  The one interesting quirk about the Tripmate is that it needed to receive the string &#8220;ASTRAL&#8221; before it would output any information.  I modified my Tripmate to self-start using a loopback modification.  Now the Tripmate will output the NMEA strings whenever it is powered.  More information about the self-start modification can be found on these websites:</p>
<ul>
<li>Modify the Delorme Tripmate to selfstart</li>
<li><a href="http://www.ke4nyv.com/gpsstuff.htm" target="_blank">Tripmate Self-Start and External Power Mod</a></li>
</ul>
<p>Once the Tripmate is modified to self-start, it will automatically output position and satellite information when power is applied.  The sentences that the Tripmate outputs are GPRMC (Recommended minimum specific GPS/Transit data), GPGSA (GPS DOP and active satellites) GPGGA (GPS Fix Data), and GPGSV (GPS Satellites in view).  We are specifically interested in the GPRMC sentence for this project.</p>
<p><strong>$GPRMC sentence information<br />
</strong>An example $GPRMC sentence sent by the Tripmate would be:<br />
<em>$GPRMC,123456,A,4234.4594,N,11233.2892,W,010.0,022.7,220107,015.5,W*77</em></p>
<p>This sentence contains the following information:</p>
<blockquote><p><strong>123456</strong> UTC Time of fix 12:34:56<br />
<strong>A</strong>            Navigation receiver warning (A = Valid, V = Invalid)<br />
<strong>4234.4594,N</strong>    Latitude 42 degrees, 34.4594 minutes North<br />
<strong>11233.2892,W</strong>   Longitude 112 degrees, 33.2892 minutes West<br />
<strong>010.0</strong>        Speed (Knots)<br />
<strong>022.7</strong>        Course Made Good (Degrees)<br />
<strong>220107       </strong>UTC Date of fix January 22, 2007<br />
<strong>015.5,W</strong>      Magnetic variation, 20.3 deg. East<br />
<strong>*77</strong> Checksum</p></blockquote>
<p>The job of the microchip will now be to parse this data, discard any irrelevant information, and store the variables of interest (Latitude and Longitude).</p>
<p><strong>Schematic</strong><a href="/wp-content/uploads/2007/05/pic18f88-delorme-tripmate-gps-logger-dr1r2.gif" target="_blank" title="PIC16F88 Delorme Tripmate GPS Logger Schematic"><img decoding="async" src="/wp-content/uploads/2007/05/pic18f88-delorme-tripmate-gps-logger-dr1r2.thumbnail.gif" title="PIC16F88 Delorme Tripmate GPS Logger Schematic" alt="PIC16F88 Delorme Tripmate GPS Logger Schematic" align="right" /></a><br />
<a href="/wp-content/uploads/2007/05/pic18f88-delorme-tripmate-gps-logger-dr1r2.gif" target="_blank">Here</a> is the full schematic for the driver.  I chose to use a PIC16F88 as the microcontroller it is cheap, has a high speed internal oscillator (8MHz), an internal USART, and is bootloadable.  I will discuss each of the components below. As always, the part numbers for the components are linked to websites for data and more information when available.<br />
<em><strong>UPDATE (February 9, 2007)</strong></em><br />
Terry pointed out that there is a mistake in the schematic.  Pin 8 on the PIC16F88 (USART RX) should go to pin 3 on the MAX233 instead of pin 2.<br />
<em><strong>UPDATE (February 20, 2007)</strong></em><br />
The schematic has been corrected.<br />
<em><strong>UPDATE (May 10, 2007)</strong></em><br />
Rogerio pointed out another mistake in the schematic.  Pin 11 on the PIC16F88 (USART TX) should go to pin 2 on the MAX233 instead of pin 1.  It looks like the original mistake that I made was to shift the two lines one pin up when drawing up the schematic. The schematic has been corrected.</p>
<p><strong>Power Supply</strong><br />
This is the only component that is ambiguous in the schematic.  I use 4 AA NiMH batteries in series, giving me a supply voltage of approximately 4.8V (<a href="https://en.wikipedia.org/wiki/NiMH" target="_blank">NiMH</a> AA batteries are ~1.2V cells).  This is very convenient because I can recharge 4 AA batteries for the Tripmate and 4 for the logger circuit and so far I have found that they last quite a while.  However, if you want to use a 9V battery or alkaline batteries, I would suggest using a <a href="https://en.wikipedia.org/wiki/Low_dropout_regulator" target="_blank">low-dropout voltage regulator</a> to ensure that you don&#8217;t burn out the ICs.</p>
<p><strong>MAX233<br />
</strong>I use a <a href="http://www.maxim-ic.com/datasheet/index.mvp/id/1798" target="_blank">MAX233</a> as I do in my <a href="http://semifluid.com/2006/01/31/rs-232-level-converter/">RS-232 Level Converter</a>.  You are more than welcome to substitute any suitable RS-232 level converter; however, the MAX233 is nice because it has internal capacitors.  The MAX233 is used to convert the logic level signals of the PIC microcontroller to RS-232 compatible voltage levels for both the Tripmate and the computer.  Although the MAX233 should nominally be run at 5 Volts, I have found that it works perfectly fine at 4.8V.  The serial connection in the schematic is set up for a computer connection.  To log data from the Tripmate, you must use a <a href="http://www.microchipc.com/make_a_solderless_RS232_crossover_cable/" target="_blank">crossover cable</a> that swaps the TX and RX serial data lines.</p>
<p><strong>PIC16F88</strong><br />
The microcontroller used is a Microchip PIC16F88.  I initially programmed the PIC with the <a href="http://www.etc.ugal.ro/cchiculita/software/picbootloader.htm">Tiny PIC Bootloader</a> (<a href='http://semifluid.com/wp-content/uploads/2007/01/tinybld16F88_i8MHz-_19200.hex'>tinybld16F88_i8MHz _19200.hex</a>) so that the PIC would run at 8MHz using its internal oscillator.  Whenever the firmware is updated, I can re-flash the PIC using the Tiny PIC Bootloader program.  This allows for quick and easy debugging.  R1 is a pull-up resistor necessary for operation. R4 and R5 are resistors for the status LEDs (LED1 and LED2). R6 is a pull-down resistor for the mode switch (S1).</p>
<p><strong>24LC1025<br />
</strong>The 24LC1025 is the EEPROM used in this project to store the latitude and longitude information.  The 24LC1025 is a 1024K bit Serial EEPROM.  The 24LC1025 can be read with a clock frequency of   400 kHz and has a 5 ms write speed.  It has a rewrite endurance of 1,000,000 cycles and can operate between 2.5V and 5.5V.  The 24AA1025 or the 24FC1025 can be substituted for the 24LC1025 in this project if necessary.   I used a custom library to read and write bytes to the EEPROM.  R2 and R3 are pull-up resistors for the Serial Data and Clock lines.</p>
<p><strong>Theory of Operation (Aquiring and Recording GPS Data)</strong></p>
<ol>
<li>Crossover cable is used to connect Tripmate and circuit</li>
<li>Tripmate is turned on (batteries are put into the case)</li>
<li>Circuit is turned on</li>
<li>Mode switch is pressed after power is connected to begin data logging</li>
<li>LED1 (pinLEDSTATUS) will turn on when the GPS unit has aquired a fix (i.e. Navigation receiver warning = &#8216;A&#8217;) and is recording data to the EEPROM (Please note that it can take over 5 minutes for the Tripmate to aquire a fix)</li>
<li>Disconnect circuit power to end data logging</li>
<li>Turn off Tripmate</li>
</ol>
<p><strong>Theory of Operation (Reading GPS Data)</strong></p>
<ol>
<li> Normal serial cable is used to connect computer and circuit</li>
<li>Open serial terminal application to record Latitude and Longitude data</li>
<li>Power circuit with mode switch depressed to read back GPS data stored on EEPROM</li>
<li> Disconnect circuit power to stop reading data</li>
</ol>
<p><strong>Source Code<br />
</strong>The PIC16F88 must initially programmed with the â€˜tinybld16F88_i8MHz _19200.HEXâ€<img src="https://s.w.org/images/core/emoji/15.0.3/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /> hex file to program the bootloader on the PIC. Then, using Tiny PIC Bootloader, the hex file can be placed on the chip using the Tiny PIC Bootloader <a href="http://www.etc.ugal.ro/cchiculita/software/tinybldusage.htm">frontend</a>. Please feel free to <a href="http://semifluid.com/contact-me/">contact me</a> if you have any problems.</p>
<ul>
<li><a href='http://semifluid.com/wp-content/uploads/2007/01/tinybld16F88_i8MHz-_19200.hex'>tinybld16F88_i8MHz _19200.hex</a></li>
<li><a href='http://semifluid.com/wp-content/uploads/2007/01/16F88-24LC1025-GPS-Compress-DR1r4.c'>16F88 &#8211; 24LC1025 GPS Compress DR1r4.c</a> (<a href='http://semifluid.com/wp-content/uploads/2007/01/16F88-24LC1025-GPS-Compress-DR1r4.hex'>hex</a>)</li>
<li><a href='http://semifluid.com/wp-content/uploads/2007/01/241025multi.c'>241025multi.c</a></li>
</ul>
<p><strong>Example Output</strong></p>
<ul>
<li>Raw data output from PIC16F88 Delorme Tripmate GPS Logger: <a href='http://semifluid.com/wp-content/uploads/2007/01/TestCapture.txt'>TestCapture.txt</a></li>
</ul>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
