<?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>PIC18F2550 &#8211; semifluid.com</title>
	<atom:link href="/category/pic-projects/pic18f2550/feed/" rel="self" type="application/rss+xml" />
	<link>/</link>
	<description>Intermediate in flow properties between solids and liquids; highly viscous.</description>
	<lastBuildDate>Thu, 26 Jan 2017 21:21:03 +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>PIC18F2550 KS0108 Graphical LCD Oscilloscope</title>
		<link>/2006/08/21/pic18f2550-ks0108-graphical-lcd-oscilloscope/</link>
		
		<dc:creator><![CDATA[Steven A. Cholewiak]]></dc:creator>
		<pubDate>Mon, 21 Aug 2006 17:00:56 +0000</pubDate>
				<category><![CDATA[C Projects]]></category>
		<category><![CDATA[GLCD]]></category>
		<category><![CDATA[PIC Projects]]></category>
		<category><![CDATA[PIC18F2550]]></category>
		<guid isPermaLink="false">http://semifluid.com/blog/?p=15</guid>

					<description><![CDATA[Using the PIC18F2550 GLCD Text Test as a basis for further experimentation, I put together a simple and accurate graphical oscilloscope using a PIC18F2550 microcontroller and a AGM1264F graphical LCD. The oscilloscope measures the average voltage, the maximum voltage, the minimum voltage, the peak-to-peak voltage, and the zero-crossing frequency for a DC signal over 100 [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="http://semifluid.com/wp-content/uploads/2006/08/PIC18F2550_GLCD_Oscilloscope.jpg"><img fetchpriority="high" decoding="async" src="http://semifluid.com/wp-content/uploads/2006/08/PIC18F2550_GLCD_Oscilloscope.jpg" alt="" title="PIC18F2550 KS0108 Graphical LCD Oscilloscope" width="280" height="200" class="alignleft size-full wp-image-958" /></a>Using the PIC18F2550 GLCD Text Test as a basis for further experimentation, I put together a simple and accurate graphical oscilloscope using a PIC18F2550 microcontroller and a <a href="http://www.azdisplays.com/graphic-lcd-display-module/AGM1264F/">AGM1264F</a> graphical LCD. The oscilloscope measures the <a href="https://en.wikipedia.org/wiki/Average">average</a> voltage, the <a href="https://en.wikipedia.org/wiki/Maximum">maximum</a> voltage, the <a href="https://en.wikipedia.org/wiki/Minimum">minimum</a> voltage, the <a href="https://en.wikipedia.org/wiki/Peak-to-peak">peak-to-peak</a> voltage, and the <a href="https://en.wikipedia.org/wiki/Zero_crossing">zero-crossing</a> frequency for a DC signal over 100 samples. The oscilloscope has a built in <a href="https://en.wikipedia.org/wiki/Oscilloscope#Trigger">edge trigger</a> function that can be set to capture on rise or fall (or disabled altogether). The time scale for the display is variable and can be easily redefined using the changeTimeDivision function. Likewise, the voltage range can be change to 0-5V, 0-2.5V, and 0-1.25V. The main limitations of this oscilloscope include relatively slow acquisition time and <a href="https://en.wikipedia.org/wiki/Analog-to-digital_converter#Sampling_rate">sampling rate</a> (~60kHz) and the fact that the inputs are limited by the constraints of the internal ADC. However, it is a very nice display and I highly suggest you view the <a href="http://semifluid.com/2006/08/21/pic18f2550-ks0108-graphical-lcd-oscilloscope-videos/">videos</a> to see it in action.<span id="more-15"></span></p>
<p><strong>Full Circuit</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/08/Full-Circuit2.gif"><img decoding="async" src="http://semifluid.com/wp-content/uploads/2006/08/Full-Circuit2-300x110.gif" alt="" title="PIC18F2550 KS0108 Graphical LCD Oscilloscope Full Circuit" width="300" height="110" class="alignright size-medium wp-image-965" srcset="/wp-content/uploads/2006/08/Full-Circuit2-300x110.gif 300w, /wp-content/uploads/2006/08/Full-Circuit2-1024x375.gif 1024w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>The source and firmware for the circuit can be found at the bottom of the page. Each section of the circuit is labeled in the schematic. All of the sections and their components are described and discussed below. The part numbers for the components are linked to websites for data and more information when available.</p>
<p><strong>Power Supply</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/08/Power-Supply.gif"><img decoding="async" src="http://semifluid.com/wp-content/uploads/2006/08/Power-Supply-300x110.gif" alt="" title="PIC18F2550 KS0108 Graphical LCD Oscilloscope Power Supply" width="300" height="110" class="alignright size-medium wp-image-822" srcset="/wp-content/uploads/2006/08/Power-Supply-300x110.gif 300w, /wp-content/uploads/2006/08/Power-Supply-1024x375.gif 1024w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>The power supply uses a 9 volt battery and a TC1262-5.0V high-accuracy low-dropout linear voltage regulator to provide a stable 5 volt supply for the microcontroller and the graphical LCD. A 1uF (microFarad) polarized decoupling capacitor is necessary on the output of the voltage regulator to prevent power spikes or ripples. A <a href="https://en.wikipedia.org/wiki/Wall_wart">wall wart</a> power supply as low as 5.3V can be substituted for the 9 Volt battery.</p>
<p><strong>AZ Displays AGM1264F</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/08/AGM1264F.gif"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2006/08/AGM1264F-300x110.gif" alt="" title="PIC18F2550 KS0108 Graphical LCD Oscilloscope AGM1264F" width="300" height="110" class="alignright size-medium wp-image-818" srcset="/wp-content/uploads/2006/08/AGM1264F-300x110.gif 300w, /wp-content/uploads/2006/08/AGM1264F-1024x375.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The <a href="http://www.ece.utexas.edu/~valvano/Datasheets/LCD1030.pdf">AGM1264F</a> is 128 x 64 pixel graphical LCD with built in controllers that allow is to be easily controlled using a PIC microcontroller. It is a 128 x 64 pixel graphical LCD and has an LED backlight, onboard negative voltage generator (LMC7660) for LCD driving, onboard Samsung <a href="http://www.alldatasheet.com/view.jsp?Searchword=KS0108">KS0108</a> controller, and an 8-Bit MPU interface.</p>
<p><strong>Analog Input</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/08/Analog-Input1.gif"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2006/08/Analog-Input1-300x110.gif" alt="" title="PIC18F2550 KS0108 Graphical LCD Oscilloscope Analog Input" width="300" height="110" class="alignright size-medium wp-image-964" srcset="/wp-content/uploads/2006/08/Analog-Input1-300x110.gif 300w, /wp-content/uploads/2006/08/Analog-Input1-1024x375.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The 1st analog input (Pin A0) is configured to be an analog input. Please note that &#8220;The source impedance affects the offset voltage at the analog input (due to pin leakage current). The maximum recommended impedance for analog sources is 2.5 kÎ©.&#8221; (PIC18F2550, p.260)</p>
<p><strong>Microcontroller</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/08/Microcontroller.gif"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2006/08/Microcontroller-300x110.gif" alt="" title="PIC18F2550 KS0108 Graphical LCD Oscilloscope Microcontroller" width="300" height="110" class="alignright size-medium wp-image-821" srcset="/wp-content/uploads/2006/08/Microcontroller-300x110.gif 300w, /wp-content/uploads/2006/08/Microcontroller-1024x375.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The microcontroller used is a Microchip PIC18F2550. I modified the PIC18F2550 <a href="http://www.etc.ugal.ro/cchiculita/software/picbootloader.htm">Tiny PIC Bootloader</a> assembly file so I could use a 20MHz crystal/resonator at 115,200 baud (the modified bootloader can be found at the bottom of the page). The PIC18F2550 runs at 48MHz using the internal <a href="https://en.wikipedia.org/wiki/PLL">PLL</a>. R1 is a pull-up resistor necessary for operation. C1 is a stabilizing capacitor that is used for the onboard USB voltage regulator, which is not used in this project. The component marked &#8216;RES&#8217; is a 20MHz resonator.</p>
<p><strong>RS232 Level Converter</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/08/RS232-Level-Converter2.gif"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2006/08/RS232-Level-Converter2-300x110.gif" alt="" title="PIC18F2550 KS0108 Graphical LCD Oscilloscope RS232 Level Converter" width="300" height="110" class="alignright size-medium wp-image-968" srcset="/wp-content/uploads/2006/08/RS232-Level-Converter2-300x110.gif 300w, /wp-content/uploads/2006/08/RS232-Level-Converter2-1024x375.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The microcontroller USART pins need to be connected to a <a href="http://semifluid.com/2006/01/31/rs-232-level-converter/">RS-232 Level Converter</a> to connect to a PC for firmware updates using the Tiny PIC Bootloader. Otherwise, after initial programming they can be left disconnected.</p>
<p><strong>Source and Firmware</strong><br />
The PIC must initially programmed with the &#8216;SAC_tinybld18F2550usb _20MHz_115200_48MHz&#8217; 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> with &#8217;12h 34h 56h 78h 90h&#8217; in the &#8216;List of codes to send first:&#8217; in the &#8216;Options&#8217; menu. 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/2006/08/SAC_tinybld18F2550usb_20MHz_115200_48MHz1.hex'>SAC_tinybld18F2550usb_20MHz_115200_48MHz.hex</a></li>
<li><a href='http://semifluid.com/wp-content/uploads/2006/08/18F2550-GLCD-Oscilloscope-DR1r1.c'>18F2550 GLCD Oscilloscope DR1r1.c</a> (<a href='http://semifluid.com/wp-content/uploads/2006/08/18F2550-GLCD-Oscilloscope-DR1r1.hex'>hex</a>)</li>
<li><a href='http://semifluid.com/wp-content/uploads/2006/08/GLCD-modified.c'>GLCD &#8211; modified.c</a></li>
</ul>
<p><strong>Videos</strong><br />
<a href="http://semifluid.com/2006/08/21/pic18f2550-ks0108-graphical-lcd-oscilloscope-videos/">Here</a> are three videos of the PIC18F2550 GLCD Oscilloscope in action. The first video demonstrates sine, triangle, and square waves of different frequencies. The second video demonstrates different waves with shifting amplitudes and offsets. The third video compares the display of the PIC18F2550 GLCD Oscilloscope to the display of a Hewlett Packard 54603B oscilloscope.</p>
<p><strong>Update (November 15, 2006)</strong><br />
Here is the firmware without the bootloader code:</p>
<ul>
<li><a href='http://semifluid.com/wp-content/uploads/2006/08/18F2550-GLCD-Oscilloscope-DR1r1-no-bootloader.c'>18F2550 GLCD Oscilloscope DR1r1 &#8211; no bootloader.c</a> (<a href='http://semifluid.com/wp-content/uploads/2006/08/18F2550-GLCD-Oscilloscope-DR1r1-no-bootloader.hex'>hex</a>)</li>
</ul>
<p><strong>Update (February 1, 2007)</strong><br />
Here is untested firmware for the PIC18F4550 without the bootloader code:</p>
<ul>
<li><a href='http://semifluid.com/wp-content/uploads/2006/08/18F4550-GLCD-Oscilloscope-DR1r1-no-bootloader.c'>18F4550 GLCD Oscilloscope DR1r1 &#8211; no bootloader.c</a> (<a href='http://semifluid.com/wp-content/uploads/2006/08/18F4550-GLCD-Oscilloscope-DR1r1-no-bootloader.hex'>hex</a>)</li>
</ul>
<p><strong>Update (April 11, 2007)</strong><br />
Here is untested firmware for the PIC18F252 and PIC18F452 without the bootloader code. Please note that you will need to use a 10MHz crystal/resonator instead of a 20MHz one.</p>
<ul>
<li><a href='http://semifluid.com/wp-content/uploads/2006/08/18F252-GLCD-Oscilloscope-DR1r1-no-bootloader.c'>18F252 GLCD Oscilloscope DR1r1 &#8211; no bootloader.c</a> (<a href='http://semifluid.com/wp-content/uploads/2006/08/18F252-GLCD-Oscilloscope-DR1r1-no-bootloader.hex'>hex</a>)</li>
<li><a href='http://semifluid.com/wp-content/uploads/2006/08/18F452-GLCD-Oscilloscope-DR1r1-no-bootloader.c'>18F452 GLCD Oscilloscope DR1r1 &#8211; no bootloader.c</a> (<a href='http://semifluid.com/wp-content/uploads/2006/08/18F452-GLCD-Oscilloscope-DR1r1-no-bootloader.hex'>hex</a>)</li>
</ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>PIC18F2550 KS0108 Graphical LCD Oscilloscope Videos</title>
		<link>/2006/08/21/pic18f2550-ks0108-graphical-lcd-oscilloscope-videos/</link>
		
		<dc:creator><![CDATA[Steven A. Cholewiak]]></dc:creator>
		<pubDate>Mon, 21 Aug 2006 17:00:18 +0000</pubDate>
				<category><![CDATA[C Projects]]></category>
		<category><![CDATA[GLCD]]></category>
		<category><![CDATA[PIC Projects]]></category>
		<category><![CDATA[PIC18F2550]]></category>
		<guid isPermaLink="false">http://semifluid.com/blog/?p=29</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[<p><center><br />
<iframe loading="lazy" title="PIC18F2550 GLCD Oscilloscope - 1" width="648" height="486" src="https://www.youtube.com/embed/zBIpvzX--XE?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-29"></span></p>
<p><center><br />
<iframe loading="lazy" title="PIC18F2550 GLCD Oscilloscope - 2" width="648" height="486" src="https://www.youtube.com/embed/USIhyghU6yo?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><center><br />
<iframe loading="lazy" title="PIC18F2550 GLCD Oscilloscope - 3" width="648" height="486" src="https://www.youtube.com/embed/PC6A0N8CSRg?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>PIC18F2550 MAX114 4-Channel ADC</title>
		<link>/2006/05/01/pic18f2550-max114-4-channel-adc/</link>
		
		<dc:creator><![CDATA[Steven A. Cholewiak]]></dc:creator>
		<pubDate>Mon, 01 May 2006 17:00:46 +0000</pubDate>
				<category><![CDATA[C Projects]]></category>
		<category><![CDATA[PIC Projects]]></category>
		<category><![CDATA[PIC18F2550]]></category>
		<guid isPermaLink="false">http://semifluid.com/blog/?p=20</guid>

					<description><![CDATA[I have experimented with MAX1241s and MAX144s in the past, hoping to find an external analog to digital converter (ADC) that will allow for multi-channel high-speed data acquisition. The MAX114 is an 8-bit four-channel ADC that allows for up to 1Msps (1,000,000 samples per second) with a parallel 8-bit microcontroller interface. This project investigated the [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="http://semifluid.com/wp-content/uploads/2006/05/PIC18F2550_MAX114.jpg"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2006/05/PIC18F2550_MAX114.jpg" alt="" title="PIC18F2550 MAX114 4-Channel ADC" width="280" height="200" class="alignleft size-full wp-image-941" /></a>I have experimented  with  <a href="http://semifluid.com/2006/04/23/pic18f2550-max1241-1-channel-adc/">MAX1241s</a> and <a href="http://semifluid.com/2006/04/23/pic18f2550-max144-2-channel-adc/">MAX144s</a> in the past, hoping to find an external <a href="https://en.wikipedia.org/wiki/Analog_to_Digital_converter">analog to digital converter</a> (ADC) that will allow for multi-channel high-speed data acquisition. The <a href="http://www.maxim-ic.com/datasheet/index.mvp/id/1424">MAX114</a> is an 8-bit four-channel ADC that allows for up to 1Msps (1,000,000 samples per second) with a parallel 8-bit microcontroller interface. This project investigated the viability of developing a high-speed multi-channel oscilloscope using the MAX114 and the PIC18F2550.<span id="more-20"></span></p>
<p><strong>Full Circuit</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/05/Full-Circuit.gif"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2006/05/Full-Circuit-300x130.gif" alt="" title="PIC18F2550 MAX114 4-Channel ADC Full Circuit" width="300" height="130" class="alignright size-medium wp-image-936" srcset="/wp-content/uploads/2006/05/Full-Circuit-300x130.gif 300w, /wp-content/uploads/2006/05/Full-Circuit-1024x445.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The source and firmware for the circuit can be found at the bottom of the page. Each section of the circuit is labeled in the schematic. All of the sections and their components are described and discussed below. The part numbers for the components are linked to websites for data and more information when available.</p>
<p><strong>Power Supply</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/05/Power-Supply.gif"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2006/05/Power-Supply-300x130.gif" alt="" title="PIC18F2550 MAX114 4-Channel ADC Power Supply" width="300" height="130" class="alignright size-medium wp-image-939" srcset="/wp-content/uploads/2006/05/Power-Supply-300x130.gif 300w, /wp-content/uploads/2006/05/Power-Supply-1024x445.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The power supply uses a 9 volt battery and a TC1262-5.0V high-accuracy low-dropout linear voltage regulator to provide a stable 5 volt supply for the microcontroller and the MAX114. A 1uF (microFarad) polarized decoupling capacitor is necessary on the output of the voltage regulator to prevent power spikes or ripples. A <a href="https://en.wikipedia.org/wiki/Wall_wart">wall wart</a> power supply as low as 5.3V can be substituted for the 9 Volt battery.</p>
<p><strong>Analog Input</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/05/Analog-Input.gif"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2006/05/Analog-Input-300x130.gif" alt="" title="PIC18F2550 MAX114 4-Channel ADC Analog Input" width="300" height="130" class="alignright size-medium wp-image-935" srcset="/wp-content/uploads/2006/05/Analog-Input-300x130.gif 300w, /wp-content/uploads/2006/05/Analog-Input-1024x445.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The analog input is connected to the A0 pin on the PIC, which is configured to be an analog input, and the IN1, IN2, IN3, and IN4 pins on the MAX114. Please note that for the PIC, &#8220;The source impedance affects the offset voltage at the analog input (due to pin leakage current). The maximum recommended impedance for analog sources is 2.5 kÎ©&#8221; (PIC18F2550, pp. 260). In addition, please note that for the MAX114, &#8220;The typical 32pF input capacitance allows source resistance as high as 800 Ohms without setup problems. For larger resistances, the acquisition time (tACQ) must be increased.&#8221; (<a href="http://pdfserv.maximintegrated.com/en/ds/MAX114-MAX118.pdf">MAX114</a>, pp. 10).</p>
<p><strong>MAX114</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/05/MAX114.gif"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2006/05/MAX114-300x130.gif" alt="" title="PIC18F2550 MAX114 4-Channel ADC MAX114" width="300" height="130" class="alignright size-medium wp-image-937" srcset="/wp-content/uploads/2006/05/MAX114-300x130.gif 300w, /wp-content/uploads/2006/05/MAX114-1024x445.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The MAX114 is a &#8220;microprocessor-compatible, 8-bit, 4-channel &#8230; analog-to-digital converter (ADC). [It] operates from a single +5V supply and uses a half-flash technique to achieve a 660ns conversion time (1Msps).&#8221; (<a href="http://pdfserv.maximintegrated.com/en/ds/MAX114-MAX118.pdf">MAX114</a>, pp. 1). The MAX114 is a high-speed ADC that allows for multi-channel data acquisition with minimal processor overhead. The bypass capacitors (C2 and C3) are necessary to minimize power input fluctuations.</p>
<p><strong>Microcontroller</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/05/Microcontroller.gif"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2006/05/Microcontroller-300x130.gif" alt="" title="PIC18F2550 MAX114 4-Channel ADC Microcontroller" width="300" height="130" class="alignright size-medium wp-image-938" srcset="/wp-content/uploads/2006/05/Microcontroller-300x130.gif 300w, /wp-content/uploads/2006/05/Microcontroller-1024x445.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The microcontroller used is a Microchip PIC18F2550. I  modified the PIC18F2550 <a href="http://www.etc.ugal.ro/cchiculita/software/picbootloader.htm">Tiny PIC Bootloader</a> assembly file so I could use a 20MHz crystal/resonator at 115,200 baud (the modified bootloader can be found at the bottom of the page). The PIC18F2550 runs at 48MHz using the internal <a href="https://en.wikipedia.org/wiki/PLL">PLL</a>. R1 is a pull-up resistor necessary for operation. C1 is a stabilizing capacitor that is used for the onboard USB voltage regulator, which is not used in this project. The component marked &#8216;RES&#8217; is a 20MHz resonator.</p>
<p><strong>RS232 Level Converter</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/05/RS232-Level-Converter.gif"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2006/05/RS232-Level-Converter-300x130.gif" alt="" title="PIC18F2550 MAX114 4-Channel ADC RS232 Level Converter" width="300" height="130" class="alignright size-medium wp-image-940" srcset="/wp-content/uploads/2006/05/RS232-Level-Converter-300x130.gif 300w, /wp-content/uploads/2006/05/RS232-Level-Converter-1024x445.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The microcontroller USART pins need to be connected to a <a href="http://semifluid.com/2006/01/31/rs-232-level-converter/">RS-232 Level Converter</a> to connect to a PC for firmware updates using the Tiny PIC Bootloader. Otherwise, after initial programming they can be left disconnected.</p>
<p><strong>Source and Firmware</strong></p>
<p>The PIC must initially programmed with the &#8216;SAC_tinybld18F2550usb _20MHz_115200_48MHz&#8217; 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> with &#8217;12h 34h 56h 78h 90h&#8217; in the &#8216;List of codes to send first:&#8217; in the &#8216;Options&#8217; menu. Please feel free to <a href="http://semifluid.com/contact-me/">contact me</a> if you have any problems.<br />
&#8211; <a href='http://semifluid.com/wp-content/uploads/2006/05/SAC_tinybld18F2550usb_20MHz_115200_48MHz.hex'>SAC_tinybld18F2550usb_20MHz_115200_48MHz.hex</a><br />
&#8211; <a href='http://semifluid.com/wp-content/uploads/2006/05/18F2550-MAX114.c'>18F2550 MAX114.c</a> (<a href='http://semifluid.com/wp-content/uploads/2006/05/18F2550-MAX114.hex'>hex</a>)</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>PIC18F2550 MAX144 2-Channel ADC</title>
		<link>/2006/04/23/pic18f2550-max144-2-channel-adc/</link>
		
		<dc:creator><![CDATA[Steven A. Cholewiak]]></dc:creator>
		<pubDate>Sun, 23 Apr 2006 17:00:50 +0000</pubDate>
				<category><![CDATA[C Projects]]></category>
		<category><![CDATA[PIC Projects]]></category>
		<category><![CDATA[PIC18F2550]]></category>
		<guid isPermaLink="false">http://semifluid.com/blog/?p=21</guid>

					<description><![CDATA[As discussed in my MAX1241 project, there are a number of advantages for utilizing external analog to digital converters (ADCs) in a project&#8217;s design. The MAX144 is a 12-bit two-channel ADC that has a &#8220;7.4Âµs successive-approximation ADC, automatic power-down, fast wake-up (2.5Âµs), an on-chip clock, and a high-speed, 3-wire serial interface.&#8221; All of these contribute [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="http://semifluid.com/wp-content/uploads/2006/04/PIC18F2550_MAX144.jpg"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2006/04/PIC18F2550_MAX144.jpg" alt="" title="PIC18F2550 MAX144 2-Channel ADC Image" width="280" height="200" class="alignleft size-full wp-image-926" /></a>As discussed in my <a href="http://semifluid.com/2006/04/23/pic18f2550-max1241-1-channel-adc/">MAX1241 project</a>, there are a number of advantages for utilizing external <a href="https://en.wikipedia.org/wiki/Analog_to_Digital_converter">analog to digital converters</a> (ADCs) in a project&#8217;s design. The <a href="http://www.maxim-ic.com/datasheet/index.mvp/id/1945">MAX144</a> is a 12-bit two-channel ADC that has a &#8220;7.4Âµs <a href="https://en.wikipedia.org/wiki/Analog-to-digital_converter#ADC_structures">successive-approximation ADC</a>, automatic power-down, fast wake-up (2.5Âµs), an on-chip clock, and a high-speed, 3-wire serial interface.&#8221; All of these contribute to a wonderful, fast, two-channel analog-to-digital converter, which can be utilized in a number of situations where high-speed (108ksps) data acquisition is necessary.<span id="more-21"></span></p>
<p><strong>Full Circuit</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/04/MAX144.gif"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2006/04/MAX144-300x130.gif" alt="" title="PIC18F2550 MAX144 2-Channel ADC MAX144" width="300" height="130" class="alignright size-medium wp-image-920" srcset="/wp-content/uploads/2006/04/MAX144-300x130.gif 300w, /wp-content/uploads/2006/04/MAX144-1024x445.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The source and firmware for the circuit can be found at the bottom of the page. Each section of the circuit is labeled in the schematic. All of the sections and their components are described and discussed below. The part numbers for the components are linked to websites for data and more information when available.</p>
<p><strong>Power Supply</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/04/Power-Supply1.gif"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2006/04/Power-Supply1-300x130.gif" alt="" title="PIC18F2550 MAX144 2-Channel ADC Power Supply" width="300" height="130" class="alignright size-medium wp-image-922" srcset="/wp-content/uploads/2006/04/Power-Supply1-300x130.gif 300w, /wp-content/uploads/2006/04/Power-Supply1-1024x445.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The power supply uses a 9 volt battery and a TC1262-5.0V high-accuracy low-dropout linear voltage regulator to provide a stable 5 volt supply for the microcontroller and the MAX144. A 1uF (microFarad) polarized decoupling capacitor is necessary on the output of the voltage regulator to prevent power spikes or ripples. A <a href="https://en.wikipedia.org/wiki/Wall_wart">wall wart</a> power supply as low as 5.3V can be substituted for the 9 Volt battery.</p>
<p><strong>Analog Input</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/04/Analog-Input.gif"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2006/04/Analog-Input-300x130.gif" alt="" title="PIC18F2550 MAX144 2-Channel ADC Analog In" width="300" height="130" class="alignright size-medium wp-image-918" srcset="/wp-content/uploads/2006/04/Analog-Input-300x130.gif 300w, /wp-content/uploads/2006/04/Analog-Input-1024x445.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The analog input is connected to the A0 pin on the PIC, which is configured to be an analog input, and the CH0 and CH1 pins on the MAX144. Please note that for the PIC, &#8220;The source impedance affects the offset voltage at the analog input (due to pin leakage current). The maximum recommended impedance for analog sources is 2.5 kÎ©&#8221; (PIC18F2550, pp. 260). In addition, please note that for the MAX144, &#8220;The acquisition time, tACQ, is the maximum time the device takes to acquire the signal, and is also the minimum time required for the signal to be acquired. Calculate this with the following equation: tACQ = 9(RS + RIN)CIN where RS is the source impedance of the input signal, RIN (9k) is the input resistance, and CIN (16pF) is the input capacitance of the ADC. Source impedances below 1k have no significant impact on the AC performance of the MAX144/MAX145&#8221; (<a href="http://pdfserv.maximintegrated.com/en/ds/MAX144-MAX145.pdf">MAX144</a>, pp. 8).</p>
<p><strong>MAX144</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/04/MAX144.gif"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2006/04/MAX144-300x130.gif" alt="" title="PIC18F2550 MAX144 2-Channel ADC MAX144" width="300" height="130" class="alignright size-medium wp-image-920" srcset="/wp-content/uploads/2006/04/MAX144-300x130.gif 300w, /wp-content/uploads/2006/04/MAX144-1024x445.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The MAX144 is a &#8220;Low-power, 12-bit analog-to-digital converter (ADC) &#8230; [that operates] with a single +2.7V to +5.25V supply and features a 7.4Î¼s successive-approximation ADC, automatic power-down, fast wake-up (2.5Î¼s), an on-chip clock, and a high-speed, 3-wire serial interface&#8221;  (<a href="http://pdfserv.maximintegrated.com/en/ds/MAX144-MAX145.pdf">MAX144</a>, pp. 1). The bypass capacitors (C2 and C3) are necessary to minimize power input fluctuations.</p>
<p><strong>Microcontroller</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/04/Microcontroller1.gif"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2006/04/Microcontroller1-300x130.gif" alt="" title="PIC18F2550 MAX144 2-Channel ADC Microcontroller" width="300" height="130" class="alignright size-medium wp-image-921" srcset="/wp-content/uploads/2006/04/Microcontroller1-300x130.gif 300w, /wp-content/uploads/2006/04/Microcontroller1-1024x445.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The microcontroller used is a Microchip PIC18F2550. I  modified the PIC18F2550 <a href="http://www.etc.ugal.ro/cchiculita/software/picbootloader.htm">Tiny PIC Bootloader</a> assembly file so I could use a 20MHz crystal/resonator at 115,200 baud (the modified bootloader can be found at the bottom of the page). The PIC18F2550 runs at 48MHz using the internal <a href="https://en.wikipedia.org/wiki/PLL">PLL</a>. R1 is a pull-up resistor necessary for operation. C1 is a stabilizing capacitor that is used for the onboard USB voltage regulator, which is not used in this project. The component marked &#8216;RES&#8217; is a 20MHz resonator.</p>
<p><strong>RS232 Level Converter</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/04/RS232-Level-Converter1.gif"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2006/04/RS232-Level-Converter1-300x130.gif" alt="" title="PIC18F2550 MAX144 2-Channel ADC RS232 Level Converter" width="300" height="130" class="alignright size-medium wp-image-923" srcset="/wp-content/uploads/2006/04/RS232-Level-Converter1-300x130.gif 300w, /wp-content/uploads/2006/04/RS232-Level-Converter1-1024x445.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The microcontroller USART pins need to be connected to a <a href="http://semifluid.com/2006/01/31/rs-232-level-converter/">RS-232 Level Converter</a> to connect to a PC for firmware updates using the Tiny PIC Bootloader. Otherwise, after initial programming they can be left disconnected.</p>
<p><strong>Source and Firmware</strong></p>
<p>The PIC must initially programmed with the &#8216;SAC_tinybld18F2550usb _20MHz_115200_48MHz&#8217; 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> with &#8217;12h 34h 56h 78h 90h&#8217; in the &#8216;List of codes to send first:&#8217; in the &#8216;Options&#8217; menu. Please feel free to <a href="http://semifluid.com/contact-me/">contact me</a> if you have any problems.<br />
&#8211; <a href='http://semifluid.com/wp-content/uploads/2006/04/SAC_tinybld18F2550usb_20MHz_115200_48MHz1.hex'>SAC_tinybld18F2550usb_20MHz_115200_48MHz</a><br />
&#8211; <a href='http://semifluid.com/wp-content/uploads/2006/04/18F2550-MAX144-SPI.c'>18F2550 MAX144 SPI.c</a> (<a href='http://semifluid.com/wp-content/uploads/2006/04/18F2550-MAX144-SPI.hex'>hex</a>)<br />
&#8211; <a href='http://semifluid.com/wp-content/uploads/2006/04/18F2550-MAX144-int16.c'>18F2550 MAX144 int16.c</a> (<a href='http://semifluid.com/wp-content/uploads/2006/04/18F2550-MAX144-int16.hex'>hex</a>)</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>PIC18F2550 MAX1241 1-Channel ADC</title>
		<link>/2006/04/23/pic18f2550-max1241-1-channel-adc/</link>
		
		<dc:creator><![CDATA[Steven A. Cholewiak]]></dc:creator>
		<pubDate>Sun, 23 Apr 2006 17:00:27 +0000</pubDate>
				<category><![CDATA[C Projects]]></category>
		<category><![CDATA[PIC Projects]]></category>
		<category><![CDATA[PIC18F2550]]></category>
		<guid isPermaLink="false">http://semifluid.com/blog/?p=22</guid>

					<description><![CDATA[There are a number of advantages for utilizing an external analog to digital converter (ADC) in a project&#8217;s design. The internal ADC of the PIC18F series is limited to 10-bit resolution, while much higher resolution ADCs are available. In addition, high-speed multi-channel conversion is possible utilizing multiple external ADCs and multi-channel ADCs. The MAX1241 is [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="http://semifluid.com/wp-content/uploads/2006/04/PIC18F2550_MAX1241.jpg"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2006/04/PIC18F2550_MAX1241.jpg" alt="" title="PIC18F2550_MAX1241" width="280" height="200" class="alignleft size-full wp-image-928" /></a>There are a number of advantages for utilizing an external <a href="https://en.wikipedia.org/wiki/Analog_to_Digital_converter">analog to digital converter</a> (ADC) in a project&#8217;s design. The internal ADC of the PIC18F series is limited to 10-bit resolution, while much higher resolution ADCs are available. In addition, high-speed multi-channel conversion is possible utilizing multiple external ADCs and multi-channel ADCs. The <a href="http://www.maxim-ic.com/datasheet/index.mvp/id/1620">MAX1241</a> is a 12-bit single-channel ADC that has a &#8220;7.5Âµs <a href="https://en.wikipedia.org/wiki/Analog-to-digital_converter#ADC_structures">successive-approximation ADC</a>, a fast <a href="http://www.maxim-ic.com/app-notes/index.mvp/id/641">track/hold</a> (1.5Âµs), an on-chip clock, and a high-speed, 3-wire serial interface.&#8221; All of these contribute to a great compact analog-to-digital converter, which can be utilized in a number of situations where high-speed sampling (73ksps) is required.<span id="more-22"></span></p>
<p><strong>Full Circuit</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/04/Full-Circuit.gif"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2006/04/Full-Circuit-300x130.gif" alt="" title="PIC18F2550 MAX1241 1-Channel ADC" width="300" height="130" class="alignright size-medium wp-image-907" srcset="/wp-content/uploads/2006/04/Full-Circuit-300x130.gif 300w, /wp-content/uploads/2006/04/Full-Circuit-1024x445.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The source and firmware for the circuit can be found at the bottom of the page. Each section of the circuit is labeled in the schematic. All of the sections and their components are described and discussed below. The part numbers for the components are linked to websites for data and more information when available.</p>
<p><strong>Power Supply</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/04/Power-Supply.gif"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2006/04/Power-Supply-300x130.gif" alt="" title="PIC18F2550 MAX1241 1-Channel ADC Power Supply" width="300" height="130" class="alignright size-medium wp-image-910" srcset="/wp-content/uploads/2006/04/Power-Supply-300x130.gif 300w, /wp-content/uploads/2006/04/Power-Supply-1024x445.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The power supply uses a 9 volt battery and a TC1262-5.0V high-accuracy low-dropout linear voltage regulator to provide a stable 5 volt supply for the microcontroller and the MAX1241. A 1uF (microFarad) polarized decoupling capacitor is necessary on the output of the voltage regulator to prevent power spikes or ripples. A <a href="https://en.wikipedia.org/wiki/Wall_wart">wall wart</a> power supply as low as 5.3V can be substituted for the 9 Volt battery.</p>
<p><strong>Analog Input</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/04/Analog-In.gif"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2006/04/Analog-In-300x130.gif" alt="" title="PIC18F2550 MAX1241 1-Channel ADC Analog In" width="300" height="130" class="alignright size-medium wp-image-906" srcset="/wp-content/uploads/2006/04/Analog-In-300x130.gif 300w, /wp-content/uploads/2006/04/Analog-In-1024x445.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The analog input is connected to the A0 pin on the PIC, which is configured to be an analog input, and the AIN pin on the MAX1241. Please note that for the PIC, &#8220;The source impedance affects the offset voltage at the analog input (due to pin leakage current). The maximum recommended impedance for analog sources is 2.5 kÎ©&#8221; (PIC18F2550, pp. 260). In addition, please note that for the MAX1241, &#8220;Acquisition time is calculated by: tACQ = 9(RS + RIN) x 16pF where RIN = 9k, RS = the input signalâ€<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;" />s source impedance, and tACQ is never less than 1.5Âµs. Source impedances below 1k do not significantly affect the ADCâ€<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;" />s AC performance&#8221; (<a href="http://pdfserv.maximintegrated.com/en/ds/MAX1240-MAX1241.pdf">MAX1241</a>, pp. 8 ).</p>
<p><strong>MAX1241</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/04/MAX1241.gif"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2006/04/MAX1241-300x130.gif" alt="" title="PIC18F2550 MAX1241 1-Channel ADC MAX1241" width="300" height="130" class="alignright size-medium wp-image-908" srcset="/wp-content/uploads/2006/04/MAX1241-300x130.gif 300w, /wp-content/uploads/2006/04/MAX1241-1024x445.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The MAX1241 is a &#8220;Low-power, 12-bit analog-to-digital converter (ADC) &#8230; [That] operates with a single +2.7V to +5.25V supply. [The MAX1241 features] a 7.5Âµs successive-approximation ADC, a fast track/hold (1.5Âµs), an on-chip clock, and a high-speed, 3-wire serial interface&#8221; (<a href="http://pdfserv.maximintegrated.com/en/ds/MAX1240-MAX1241.pdf">MAX1241</a>, pp. 1). The bypass capacitors (C2, C3, and C5) are necessary to minimize power input fluctuations.</p>
<p><strong>Microcontroller</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/04/Microcontroller.gif"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2006/04/Microcontroller-300x130.gif" alt="" title="PIC18F2550 MAX1241 1-Channel ADC Microcontroller" width="300" height="130" class="alignright size-medium wp-image-909" srcset="/wp-content/uploads/2006/04/Microcontroller-300x130.gif 300w, /wp-content/uploads/2006/04/Microcontroller-1024x445.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The microcontroller used is a Microchip PIC18F2550. I  modified the PIC18F2550 <a href="http://www.etc.ugal.ro/cchiculita/software/picbootloader.htm">Tiny PIC Bootloader</a> assembly file so I could use a 20MHz crystal/resonator at 115,200 baud (the modified bootloader can be found at the bottom of the page). The PIC18F2550 runs at 48MHz using the internal <a href="https://en.wikipedia.org/wiki/PLL">PLL</a>. R1 is a pull-up resistor necessary for operation. C1 is a stabilizing capacitor that is used for the onboard USB voltage regulator, which is not used in this project. The component marked &#8216;RES&#8217; is a 20MHz resonator.</p>
<p><strong>RS232 Level Converter</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/04/RS232-Level-Converter.gif"><img loading="lazy" decoding="async" src="http://semifluid.com/wp-content/uploads/2006/04/RS232-Level-Converter-300x130.gif" alt="" title="PIC18F2550 MAX1241 1-Channel ADC RS232 Level Converter" width="300" height="130" class="alignright size-medium wp-image-911" srcset="/wp-content/uploads/2006/04/RS232-Level-Converter-300x130.gif 300w, /wp-content/uploads/2006/04/RS232-Level-Converter-1024x445.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The microcontroller USART pins need to be connected to a <a href="http://semifluid.com/2006/01/31/rs-232-level-converter/">RS-232 Level Converter</a> to connect to a PC for firmware updates using the Tiny PIC Bootloader. Otherwise, after initial programming they can be left disconnected.</p>
<p><strong>Source and Firmware</strong></p>
<p>The PIC must initially programmed with the &#8216;SAC_tinybld18F2550usb _20MHz_115200_48MHz&#8217; 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> with &#8217;12h 34h 56h 78h 90h&#8217; in the &#8216;List of codes to send first:&#8217; in the &#8216;Options&#8217; menu. Please feel free to <a href="http://semifluid.com/contact-me/">contact me</a> if you have any problems.<br />
&#8211; <a href='http://semifluid.com/wp-content/uploads/2006/04/SAC_tinybld18F2550usb_20MHz_115200_48MHz.hex'>SAC_tinybld18F2550usb_20MHz_115200_48MHz.hex</a><br />
&#8211; <a href='http://semifluid.com/wp-content/uploads/2006/04/18F2550-MAX1241-SPI.c'>18F2550 MAX1241 SPI.c</a> (<a href='http://semifluid.com/wp-content/uploads/2006/04/18F2550-MAX1241-SPI.hex'>hex</a>)<br />
&#8211; <a href='http://semifluid.com/wp-content/uploads/2006/04/18F2550-MAX1241-int16.c'>18F2550 MAX1241 int16.c</a> (<a href='http://semifluid.com/wp-content/uploads/2006/04/18F2550-MAX1241-int16.hex'>hex</a>)</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>PIC18F2550 USB HID IO</title>
		<link>/2006/03/28/pic18f2550-usb-hid-io/</link>
		
		<dc:creator><![CDATA[Steven A. Cholewiak]]></dc:creator>
		<pubDate>Tue, 28 Mar 2006 17:00:43 +0000</pubDate>
				<category><![CDATA[C Projects]]></category>
		<category><![CDATA[PIC Projects]]></category>
		<category><![CDATA[PIC18F2550]]></category>
		<category><![CDATA[USB]]></category>
		<guid isPermaLink="false">http://semifluid.com/blog/?p=23</guid>

					<description><![CDATA[After completing the PIC18F2550 USB HID Oscilloscope, I decided to expand upon the project and firmware to include multiple analog inputs and digital i/o. The base firmware for this project is the same as the PIC18F2550 USB HID Oscilloscope&#8216;s; however, more features have been added that allow the user to access the PIC18F2550&#8217;s Port B [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="alignleft size-full wp-image-718" title="PIC18F2550 USB HID IO" src="http://semifluid.com/wp-content/uploads/2006/03/PIC18F2550_usb_hid_io.jpg" alt="" width="280" height="210" />After completing the <a href="http://semifluid.com/2006/01/31/pic12f675-oscilloscope/">PIC18F2550 USB HID Oscilloscope</a>, I decided to expand upon the project and firmware to include multiple analog inputs and digital <a href="https://en.wikipedia.org/wiki/Input/output">i/o</a>. The base firmware for this project is the same as the <a href="http://semifluid.com/2006/01/31/pic12f675-oscilloscope/">PIC18F2550 USB HID Oscilloscope</a>&#8216;s; however, more features have been added that allow the user to access the PIC18F2550&#8217;s Port B for digital i/o. In addition, the firmware now allows the user to access the AN0-AN4 analog pins for monitoring and data acquisition.<span id="more-23"></span></p>
<p><strong>Full Circuit</strong><br />
<a href="http://semifluid.com/wp-content/uploads/2006/03/Full-Circuit.gif"><img loading="lazy" decoding="async" class="alignright size-medium wp-image-723" title="PIC18F2550 USB HID IO Schematic" src="http://semifluid.com/wp-content/uploads/2006/03/Full-Circuit-300x139.gif" alt="" width="300" height="139" srcset="/wp-content/uploads/2006/03/Full-Circuit-300x139.gif 300w, /wp-content/uploads/2006/03/Full-Circuit-1024x474.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a>The source and firmware for the circuit can be found at the bottom of the page. Each section of the circuit is labeled in the schematic. All of the sections and their components are described and discussed below. The part numbers for the components are linked to websites for data and more information when available.</p>
<p><strong>Analog Inputs</strong><br />
<a href="http://semifluid.com/wp-content/uploads/2006/03/Analog-Inputs.gif"><img loading="lazy" decoding="async" class="alignright size-medium wp-image-721" title="PIC18F2550 USB HID IO Analog Inputs" src="http://semifluid.com/wp-content/uploads/2006/03/Analog-Inputs-300x139.gif" alt="" width="300" height="139" srcset="/wp-content/uploads/2006/03/Analog-Inputs-300x139.gif 300w, /wp-content/uploads/2006/03/Analog-Inputs-1024x474.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a>The 5 analog inputs are connected to pins A0, A1, A2, A3, and A5, which are configured to be analog inputs. Please note that &#8220;The source impedance affects the offset voltage at the analog input (due to pin leakage current). The maximum recommended impedance for analog sources is 2.5 kOhms.&#8221; (PIC18F2550, p.260)</p>
<p><strong>Digital Inputs/Outputs</strong><br />
<a href="http://semifluid.com/wp-content/uploads/2006/03/Digital-IO.gif"><img loading="lazy" decoding="async" class="alignright size-medium wp-image-722" title="PIC18F2550 USB HID IO Digital IO" src="http://semifluid.com/wp-content/uploads/2006/03/Digital-IO-300x139.gif" alt="" width="300" height="139" srcset="/wp-content/uploads/2006/03/Digital-IO-300x139.gif 300w, /wp-content/uploads/2006/03/Digital-IO-1024x474.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a>The digital inputs and outputs share Port B. Please note that:<br />
Maximum output current sunk by any I/O pin = 25 mA<br />
Maximum output current sourced by any I/O pin = 25 mA<br />
Maximum current sunk by all ports = 200 mA<br />
Maximum current sourced by all ports = 200 mA</p>
<p><strong>Microcontroller</strong><br />
<a href="http://semifluid.com/wp-content/uploads/2006/03/Microcontroller.gif"><img loading="lazy" decoding="async" class="alignright size-medium wp-image-724" title="PIC18F2550 USB HID IO Microcontroller" src="http://semifluid.com/wp-content/uploads/2006/03/Microcontroller-300x139.gif" alt="" width="300" height="139" srcset="/wp-content/uploads/2006/03/Microcontroller-300x139.gif 300w, /wp-content/uploads/2006/03/Microcontroller-1024x474.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a>The microcontroller used is a Microchip PIC18F2550. I modified the PIC18F2550 <a href="http://www.etc.ugal.ro/cchiculita/software/picbootloader.htm">Tiny PIC Bootloader</a> assembly file so I could use a 20MHz crystal/resonator at 115,200 baud (the modified bootloader can be found at the bottom of the page). The PIC18F2550 runs at 48MHz using the internal <a href="https://en.wikipedia.org/wiki/PLL">PLL</a>. R1 is a pull-up resistor necessary for operation. C1 is a stabilizing capacitor that is used for the onboard USB voltage regulator, which is used in this project. The component marked &#8216;RES&#8217; is a 20MHz resonator.</p>
<p><strong>RS232 Level Converter</strong><br />
<a href="http://semifluid.com/wp-content/uploads/2006/03/RS232-Level-Converter.gif"><img loading="lazy" decoding="async" class="alignright size-medium wp-image-726" title="PIC18F2550 USB HID IO RS232 Level Converter" src="http://semifluid.com/wp-content/uploads/2006/03/RS232-Level-Converter-300x139.gif" alt="" width="300" height="139" srcset="/wp-content/uploads/2006/03/RS232-Level-Converter-300x139.gif 300w, /wp-content/uploads/2006/03/RS232-Level-Converter-1024x474.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a>The microcontroller USART pins need to be connected to a <a href="http://semifluid.com/2006/01/31/rs-232-level-converter/">RS-232 Level Converter</a> to connect to a PC for firmware updates using the Tiny PIC Bootloader. Otherwise, after initial programming they can be left disconnected.</p>
<p><strong>USB I/O</strong><br />
<a href="http://semifluid.com/wp-content/uploads/2006/03/USB-IO.gif"><img loading="lazy" decoding="async" class="alignright size-medium wp-image-727" title="PIC18F2550 USB HID IO USB IO" src="http://semifluid.com/wp-content/uploads/2006/03/USB-IO-300x139.gif" alt="" width="300" height="139" srcset="/wp-content/uploads/2006/03/USB-IO-300x139.gif 300w, /wp-content/uploads/2006/03/USB-IO-1024x474.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a>The PIC is connected to the computer through a <a href="https://en.wikipedia.org/wiki/USB">USB</a> port and is bus-powered.</p>
<p><strong>Source and Firmware</strong><br />
The PIC must initially programmed with the &#8216;SAC_tinybld18F2550usb _20MHz_115200_48MHz&#8217; 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> with &#8217;12h 34h 56h 78h 90h&#8217; in the &#8216;List of codes to send first:&#8217; in the &#8216;Options&#8217; menu. 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/2006/03/SAC_tinybld18F2550usb_20MHz_115200_48MHz.hex">SAC_tinybld18F2550usb_20MHz_115200_48MHz.HEX</a></li>
<li><a href="http://semifluid.com/wp-content/uploads/2006/03/18F2550-USB-HID-CRC-IO.c">18F2550 USB HID CRC IO.c</a> (<a href="http://semifluid.com/wp-content/uploads/2006/03/18F2550-USB-HID-CRC-IO.hex">hex</a>)</li>
<li><a href="http://semifluid.com/wp-content/uploads/2006/03/usb_desc_hid-8-byte.h">usb_desc_hid 8-byte.h</a></li>
<li>Visual Basic example software and source code: <a href="http://semifluid.com/wp-content/uploads/2006/03/PIC18F2550-USB-HID-IO-VB-Example.zip">PIC18F2550 USB HID IO VB Example.zip</a></li>
</ul>
<p><strong>Update (November 15, 2006)</strong><br />
Here is the firmware without the bootloader code:</p>
<ul>
<li><a href="http://semifluid.com/wp-content/uploads/2006/03/18F2550-USB-HID-CRC-IO-no-bootloader.c">18F2550 USB HID CRC IO &#8211; no bootloader.c</a> (<a href="http://semifluid.com/wp-content/uploads/2006/03/18F2550-USB-HID-CRC-IO-no-bootloader.hex">hex</a>)</li>
</ul>
<p><strong>Update 2 (December 18, 2006)</strong><br />
Here are untested PIC18F4550 firmwares:</p>
<ul>
<li><a href="http://semifluid.com/wp-content/uploads/2006/03/18F4550-USB-HID-CRC-IO.c">18F4550 USB HID CRC IO.c</a> (<a href="http://semifluid.com/wp-content/uploads/2006/03/18F4550-USB-HID-CRC-IO.hex">hex</a>)</li>
<li><a href="http://semifluid.com/wp-content/uploads/2006/03/18F4550-USB-HID-CRC-IO-no-bootloader.c">18F4550 USB HID CRC IO &#8211; no bootloader.c</a> (<a href="http://semifluid.com/wp-content/uploads/2006/03/18F4550-USB-HID-CRC-IO-no-bootloader.hex">hex</a>)</li>
</ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>PIC18F2550 USB HID Oscilloscope</title>
		<link>/2006/03/27/pic18f2550-usb-hid-oscilloscope/</link>
		
		<dc:creator><![CDATA[Steven A. Cholewiak]]></dc:creator>
		<pubDate>Mon, 27 Mar 2006 17:00:35 +0000</pubDate>
				<category><![CDATA[C Projects]]></category>
		<category><![CDATA[PIC Projects]]></category>
		<category><![CDATA[PIC18F2550]]></category>
		<category><![CDATA[USB]]></category>
		<guid isPermaLink="false">http://semifluid.com/blog/?p=24</guid>

					<description><![CDATA[This is a project that I&#8217;ve been planning on putting together for a long time. After creating an oscilloscope using a PIC12F675, I wanted to create a simple and effective USB oscilloscope using the higher performance PIC18F2550. During the development of this project, I learned quite a bit about USB HID communication, which allows me [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="alignleft size-full wp-image-735" title="PIC18F2550 USB HID Oscilloscope" src="http://semifluid.com/wp-content/uploads/2006/03/PIC18F2550_usb_hid_oscilloscope.jpg" alt="" width="280" height="200" />This is a project that I&#8217;ve been planning on putting together for a long time. After creating an oscilloscope using a <a href="http://semifluid.com/2006/01/31/pic12f675-oscilloscope/">PIC12F675</a>, I wanted to create a simple and effective USB oscilloscope using the higher performance PIC18F2550. During the development of this project, I learned quite a bit about USB HID communication, which allows me to quickly and effectively communicate with the desktop computer. Using HID means that this oscilloscope does not require drivers (only the oscilloscope software).<span id="more-24"></span></p>
<p><strong>Full Circuit</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/03/Full-Circuit1.gif"><img loading="lazy" decoding="async" class="alignright size-medium wp-image-743" title="PIC18F2550 USB HID Oscilloscope Schematic" src="http://semifluid.com/wp-content/uploads/2006/03/Full-Circuit1-300x158.gif" alt="" width="300" height="158" srcset="/wp-content/uploads/2006/03/Full-Circuit1-300x158.gif 300w, /wp-content/uploads/2006/03/Full-Circuit1-1024x541.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The source and firmware for the circuit can be found at the bottom of the page. Each section of the circuit is labeled in the schematic. All of the sections and their components are described and discussed below. The part numbers for the components are linked to websites for data and more information when available.</p>
<p><strong>Analog Input</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/03/Analog-Input.gif"><img loading="lazy" decoding="async" class="alignright size-medium wp-image-742" title="PIC18F2550 USB HID Oscilloscope Analog Input" src="http://semifluid.com/wp-content/uploads/2006/03/Analog-Input-300x158.gif" alt="" width="300" height="158" srcset="/wp-content/uploads/2006/03/Analog-Input-300x158.gif 300w, /wp-content/uploads/2006/03/Analog-Input-1024x541.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The analog input for the oscilloscope is connected to the A0 pin, which is configured to be an analog input. Please note that &#8220;The source impedance affects the offset voltage at the analog input (due to pin leakage current). The maximum recommended impedance for analog sources is 2.5 kÎ©&#8221; (PIC18F2550, pp. 260).</p>
<p><strong>Microcontroller</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/03/Microcontroller1.gif"><img loading="lazy" decoding="async" class="alignright size-medium wp-image-745" title="PIC18F2550 USB HID Oscilloscope Microcontroller" src="http://semifluid.com/wp-content/uploads/2006/03/Microcontroller1-300x158.gif" alt="" width="300" height="158" srcset="/wp-content/uploads/2006/03/Microcontroller1-300x158.gif 300w, /wp-content/uploads/2006/03/Microcontroller1-1024x541.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The microcontroller used is a Microchip PIC18F2550. I modified the PIC18F2550 <a href="http://www.etc.ugal.ro/cchiculita/software/picbootloader.htm">Tiny PIC Bootloader</a> assembly file so I could use a 20MHz crystal/resonator at 115,200 baud (the modified bootloader can be found at the bottom of the page). The PIC18F2550 runs at 48MHz using the internal <a href="https://en.wikipedia.org/wiki/PLL">PLL</a>. R1 is a pull-up resistor necessary for operation. C1 is a stabilizing capacitor that is used for the onboard USB voltage regulator, which is used in this project. The component marked &#8216;RES&#8217; is a 20MHz resonator.</p>
<p><strong>RS232 Level Converter</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/03/RS232-Level-Converter1.gif"><img loading="lazy" decoding="async" class="alignright size-medium wp-image-747" title="PIC18F2550 USB HID Oscilloscope RS232 Level Converter" src="http://semifluid.com/wp-content/uploads/2006/03/RS232-Level-Converter1-300x158.gif" alt="" width="300" height="158" srcset="/wp-content/uploads/2006/03/RS232-Level-Converter1-300x158.gif 300w, /wp-content/uploads/2006/03/RS232-Level-Converter1-1024x541.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The microcontroller USART pins need to be connected to a <a href="http://semifluid.com/2006/01/31/rs-232-level-converter/">RS-232 Level Converter</a> to connect to a PC for firmware updates using the Tiny PIC Bootloader. Otherwise, after initial programming they can be left disconnected.</p>
<p><strong>USB I/O</strong></p>
<p><a href="http://semifluid.com/wp-content/uploads/2006/03/USB-IO1.gif"><img loading="lazy" decoding="async" class="alignright size-medium wp-image-738" title="PIC18F2550 USB HID Oscilloscope USB IO" src="http://semifluid.com/wp-content/uploads/2006/03/USB-IO1-300x158.gif" alt="" width="300" height="158" srcset="/wp-content/uploads/2006/03/USB-IO1-300x158.gif 300w, /wp-content/uploads/2006/03/USB-IO1-1024x541.gif 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The PIC is connected to the computer through a <a href="https://en.wikipedia.org/wiki/USB">USB</a> port and is bus-powered.</p>
<p><strong>Source and Firmware</strong></p>
<p>The PIC must initially programmed with the &#8216;SAC_tinybld18F2550usb _20MHz_115200_48MHz&#8217; 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> with &#8217;12h 34h 56h 78h 90h&#8217; in the &#8216;List of codes to send first:&#8217; in the &#8216;Options&#8217; menu. Please feel free to <a href="http://semifluid.com/contact-me/">contact me</a> if you have any problems.<br />
&#8211; <a href="http://semifluid.com/wp-content/uploads/2006/03/SAC_tinybld18F2550usb_20MHz_115200_48MHz.hex">SAC_tinybld18F2550usb_20MHz_115200_48MHz.hex</a><br />
&#8211; <a href="http://semifluid.com/wp-content/uploads/2006/03/18F2550-USB-HID-CRC-Oscilloscope.c">18F2550 USB HID CRC Oscilloscope.c</a> (<a href="http://semifluid.com/wp-content/uploads/2006/03/18F2550-USB-HID-CRC-Oscilloscope.c">hex</a>)<br />
&#8211; <a href="http://semifluid.com/wp-content/uploads/2006/03/usb_desc_hid-8-byte.h">usb_desc_hid 8-byte.h</a><br />
&#8211; Visual Basic example oscilloscope software with DFT: <a href="http://semifluid.com/wp-content/uploads/2006/03/PIC18F2550-USB-HID-Oscilloscope-DR1r1-VB-Example.zip">PIC18F2550 USB HID Oscilloscope DR1r1 VB Example.zip</a></p>
<p><strong>Example Oscilloscope Images</strong></p>
<table  class=" table table-hover" border="0" align="center">
<tbody>
<tr>
<td><a href="http://semifluid.com/wp-content/uploads/2006/03/60Hz-from-finger.gif"><img loading="lazy" decoding="async" class="alignnone size-thumbnail wp-image-741" title="60Hz-from-finger" src="http://semifluid.com/wp-content/uploads/2006/03/60Hz-from-finger-150x150.gif" alt="" width="150" height="150" /></a></td>
<td><a href="http://semifluid.com/wp-content/uploads/2006/03/High-Speed.gif"><img loading="lazy" decoding="async" class="alignnone size-thumbnail wp-image-744" title="High-Speed" src="http://semifluid.com/wp-content/uploads/2006/03/High-Speed-150x150.gif" alt="" width="150" height="150" /></a></td>
</tr>
<tr>
<td><a href="http://semifluid.com/wp-content/uploads/2006/03/Square-Wave.gif"><img loading="lazy" decoding="async" class="alignnone size-thumbnail wp-image-749" title="Square-Wave" src="http://semifluid.com/wp-content/uploads/2006/03/Square-Wave-150x150.gif" alt="" width="150" height="150" /></a></td>
<td><a href="http://semifluid.com/wp-content/uploads/2006/03/Square-Wave-through-Cap.gif"><img loading="lazy" decoding="async" class="alignnone size-thumbnail wp-image-750" title="Square-Wave-through-Cap" src="http://semifluid.com/wp-content/uploads/2006/03/Square-Wave-through-Cap-150x150.gif" alt="" width="150" height="150" /></a></td>
</tr>
</tbody>
</table>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>PIC18LF2550 Wireless Servo Controller Under Color Tracking Control Videos</title>
		<link>/2006/02/28/pic18lf2550-wireless-servo-controller-under-color-tracking-control-videos/</link>
		
		<dc:creator><![CDATA[Steven A. Cholewiak]]></dc:creator>
		<pubDate>Tue, 28 Feb 2006 17:00:45 +0000</pubDate>
				<category><![CDATA[C Projects]]></category>
		<category><![CDATA[PIC Projects]]></category>
		<category><![CDATA[PIC18F2550]]></category>
		<category><![CDATA[RF]]></category>
		<guid isPermaLink="false">http://semifluid.com/blog/?p=27</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[<p><center><br />
<iframe loading="lazy" title="PIC18F2550 Wireless Servo Controller Color Tracker Software" width="648" height="486" src="https://www.youtube.com/embed/6yk5wQYHD4E?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><center><br />
<iframe loading="lazy" title="PIC18F2550 Wireless Servo Controller Color Tracker Tracking" width="648" height="486" src="https://www.youtube.com/embed/OsKgk0J6hEY?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>
	</channel>
</rss>
