<?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>dx9s.net &#187; PIC News</title>
	<atom:link href="http://dx9s.net/blog/category/pic/feed/" rel="self" type="application/rss+xml" />
	<link>http://dx9s.net</link>
	<description>Projects from dx9s</description>
	<lastBuildDate>Tue, 27 Mar 2012 01:51:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>MPLAB X and 18F26K22</title>
		<link>http://dx9s.net/blog/2011/05/22/mplab-x-and-18f26k22/</link>
		<comments>http://dx9s.net/blog/2011/05/22/mplab-x-and-18f26k22/#comments</comments>
		<pubDate>Mon, 23 May 2011 00:17:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PIC News]]></category>

		<guid isPermaLink="false">http://dx9s.net/?p=382</guid>
		<description><![CDATA[The MPLABC18 compiler that is available for download for Linux under MPLAB X is based on 3.36 &#8230; I need 3.37 which includes more complete support for the PIC 18F26K22 &#8230; the 3.36 has a define for it inside the p18cxxx.h but NO define for it in the pconfig.h .. when I copied the &#8220;h&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>The MPLABC18 compiler that is available for download for Linux under MPLAB X is based on 3.36 &#8230; I need 3.37 which includes more complete support for the PIC 18F26K22 &#8230; the 3.36 has a define for it inside the p18cxxx.h  but NO define for it in the pconfig.h  .. when I copied the &#8220;h&#8221; and &#8220;lib&#8221; folder from a working 3.37 install on my legacy MPLAB 8 (under Windows) .. the compiler actually finds the prototype for things like putrs1USART (first serial port on the 26K22).</p>
<p>**BUT** all is not swell!  It gets further, but no cigar!</p>
<p>Just need to get onto the forums for the MPLAB X folks and mention.. AHEM &#8230; 18F26K22  ?!? 3.37 (or newer) please?!</p>
<p>&#8211;Doug</p>
]]></content:encoded>
			<wfw:commentRss>http://dx9s.net/blog/2011/05/22/mplab-x-and-18f26k22/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OSCTUNE</title>
		<link>http://dx9s.net/blog/2011/03/06/osctune/</link>
		<comments>http://dx9s.net/blog/2011/03/06/osctune/#comments</comments>
		<pubDate>Sun, 06 Mar 2011 03:00:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PIC News]]></category>

		<guid isPermaLink="false">http://dx9s.net/?p=96</guid>
		<description><![CDATA[I was wondering why my code was 4% faster on the new MCU (4% is within the tolerances for LTTO/LTX, but not within what I was expecting).. come to fine out&#8230; 5 bits was the old tuning resolution on the 18F2685 and they increased that to 6 bits on the 26K22.. and I was forcing [...]]]></description>
			<content:encoded><![CDATA[<p>I was wondering why my code was 4% faster on the new MCU (4% is within the tolerances for LTTO/LTX, but not within what I was expecting).. come to fine out&#8230; 5 bits was the old tuning resolution on the 18F2685 and they increased that to 6 bits on the 26K22.. and I was forcing the MSB to zero when it should have been one causing it to be wrong (and significantly, hence the MSB being wrong).</p>
<p>Mind you all modern PICs are internally calibrated to within 1% tolerances (internal clock) at the factory before shipping to customer and have some temperature compensation as well built in. This calibration is not able to be re-done, except for fine tuning via OSCTUNE. I&#8217;ve made the following changes as well during the port:</p>
<pre>tune&amp;=31; // mask off upper bits
OSCTUNE = tune;</pre>
<p>to:</p>
<pre>tune&amp;=63; // mask off upper bits
OSCTUNE = tune;</pre>
<p>I store minor calibrations in EE and read into memory and set the fine tuner (something I do when programming). Usually only -1 or -2 as these devices (2685 and now 26K22) like to run about 1/2% faster than they should&#8230; (mind you an error of 4% and you&#8217;ll STILL have taggers joining and debriefing fine &#8212; just me being picky). </p>
<p>&#8211;Doug</p>
]]></content:encoded>
			<wfw:commentRss>http://dx9s.net/blog/2011/03/06/osctune/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lazer Tag HQ CPU port done</title>
		<link>http://dx9s.net/blog/2011/03/06/lazer-tag-hq-cpu-port-done/</link>
		<comments>http://dx9s.net/blog/2011/03/06/lazer-tag-hq-cpu-port-done/#comments</comments>
		<pubDate>Sun, 06 Mar 2011 01:42:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Lazer Tag HQ]]></category>
		<category><![CDATA[PIC News]]></category>

		<guid isPermaLink="false">http://dx9s.net/?p=87</guid>
		<description><![CDATA[with a lazy two hours involved in porting between the two MCU (including download and installing the latest MPLAB IDE and C compiler) &#8230; and about 10 lines of code changed. Analog disable is a little different on the K22 series, instead of: // no analog ADCON1=255; // all analog input disabled // Vref internal [...]]]></description>
			<content:encoded><![CDATA[<p>with a lazy two hours involved in porting between the two MCU (including download and installing the latest MPLAB IDE and C compiler) &#8230; and about 10 lines of code changed.</p>
<p>Analog disable is a little different on the K22 series, instead of:</p>
<pre>// no analog
ADCON1=255; // all analog input disabled
// Vref internal only
ADCON1bits.VCFG0=0;
ADCON1bits.VCFG1=0;</pre>
<p>changed to:</p>
<pre>// no analog
ANSELA=0;
ANSELB=0;
ANSELC=0;
ADCON1=0;
ADCON0bits.ADON=0;</pre>
<p>and then every place where I has <strong>xxxxUSART</strong> (like <em>OpenUSART</em>) I simple changed to <strong>xxxx1USART</strong> !!</p>
<p>Also the clock required slight changing, from:</p>
<pre>OSCCONbits.IRCF0=1;</pre>
<p>to:</p>
<pre>OSCCONbits.IRCF0=0; // this was 1 on 8Mhz device.. now 0 on 16Mhz device</pre>
]]></content:encoded>
			<wfw:commentRss>http://dx9s.net/blog/2011/03/06/lazer-tag-hq-cpu-port-done/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>18F2685 -&gt; 18F26K22</title>
		<link>http://dx9s.net/blog/2011/03/05/18f2685-18f26k22/</link>
		<comments>http://dx9s.net/blog/2011/03/05/18f2685-18f26k22/#comments</comments>
		<pubDate>Sat, 05 Mar 2011 22:46:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PIC News]]></category>

		<guid isPermaLink="false">http://dx9s.net/?p=81</guid>
		<description><![CDATA[Conversion of the code went fast (less than an hour total) but hasn&#8217;t been tested (at all). Core differences between the two models 2685 has more memory 96KB  / 26K22 has 64KB (but using about 7.5KB) 2685 has CAN (high speed network often found in newer cars) 26K22 doesn&#8217;t &#8212; development MCUs tend to have [...]]]></description>
			<content:encoded><![CDATA[<p>Conversion of the code went fast (less than an hour total) but hasn&#8217;t been tested (at all).</p>
<p>Core differences between the two models</p>
<ol>
<li>2685 has more memory 96KB  / 26K22 has 64KB (but using about 7.5KB)</li>
<li>2685 has CAN (high speed network often found in newer cars) 26K22 doesn&#8217;t &#8212; development MCUs tend to have more extras than final production MCUs</li>
<li>2685 has one UART and one MSSP / 26K22 has two UARTS (serial ports) and two MSSP (for SPI or I2C) &#8212; a bonus but not used in THIS project (future ones will use two SPI devices)</li>
<li>2685 MAX clock is 40MHZ / 26K22 MAX clock is 64MHZ &#8212; don&#8217;t need the speed, actually turn down the clock to match same speed in dev MCU</li>
<li>2685 has ADC functions  / 26K22 has more ADC functions (including DAC output) &#8212; not usable any ADC/DAC</li>
<li>2685 is a bit more costly / 26K22 is about 1/2 the cost per unit</li>
</ol>
<p>Had to update the MPLAB IDE and C compiler and also discovered a new development platform from Microchip called <a title="MPLAB X" href="http://ww1.microchip.com/downloads/mplab/X_Beta/index.html" target="_blank">MPLAB X</a> which is written entirely in Java and Microchip will support this NEW development IDE on OSX and Linux (as well as Windows).</p>
<p>Talk about putting a smile on my face &#8212; supposedly converting projects is fairly easy from an MPLAB IDE 8.x project (which is the major version I am using)&#8230; Needless to say, I hope I can kiss  my  Windows(tm) VM goodbye soon! Not that I don&#8217;t like the IDE, it&#8217;s pretty good and step debugging is nice. I hope all that plus MORE is available under MPLAB X.</p>
<p>I am hoping it is more like Eclipse (which has seriously awesome context awareness when writing code, I like Eclipse &#8212; which is what I wrote my Linux GUI code in).</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://dx9s.net/blog/2011/03/05/18f2685-18f26k22/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PCBs ordered&#8230; MCU code porting underway</title>
		<link>http://dx9s.net/blog/2011/03/04/pcb-n-mcus/</link>
		<comments>http://dx9s.net/blog/2011/03/04/pcb-n-mcus/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 00:22:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Lazer Tag HQ]]></category>
		<category><![CDATA[PIC News]]></category>

		<guid isPermaLink="false">http://dx9s.net/?p=69</guid>
		<description><![CDATA[If I am to get the first round done within the next few months, I need boards made. I need to port the code from one MCU to a newer (lower cost) one now, it should take one day as the newer CPU isn&#8217;t that much different that my reference MCU.]]></description>
			<content:encoded><![CDATA[<p>If I am to get the first round done within the next few months, I need boards made. I need to port the code from one MCU to a newer (lower cost) one now, it should take one day as the newer CPU isn&#8217;t that much different that my reference MCU.</p>
]]></content:encoded>
			<wfw:commentRss>http://dx9s.net/blog/2011/03/04/pcb-n-mcus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

