<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: 05 Inputs and Outputs</title>
	<atom:link href="http://www.engscope.com/pic24-tutorial/5-inputs-and-outputs/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.engscope.com</link>
	<description>An Engineer&#039;s Life</description>
	<lastBuildDate>Sat, 04 Feb 2012 14:03:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Tou</title>
		<link>http://www.engscope.com/pic24-tutorial/5-inputs-and-outputs/comment-page-1/#comment-42225</link>
		<dc:creator>Tou</dc:creator>
		<pubDate>Wed, 02 Nov 2011 07:32:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.engscope.com/pic24-tutorial/5-inputs-and-outputs/#comment-42225</guid>
		<description>By far this section has connected a lot of the dots together for me.

Thanks.</description>
		<content:encoded><![CDATA[<p>By far this section has connected a lot of the dots together for me.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gerhard</title>
		<link>http://www.engscope.com/pic24-tutorial/5-inputs-and-outputs/comment-page-1/#comment-40404</link>
		<dc:creator>Gerhard</dc:creator>
		<pubDate>Mon, 03 Oct 2011 17:43:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.engscope.com/pic24-tutorial/5-inputs-and-outputs/#comment-40404</guid>
		<description>Thankyou!!</description>
		<content:encoded><![CDATA[<p>Thankyou!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jliu83</title>
		<link>http://www.engscope.com/pic24-tutorial/5-inputs-and-outputs/comment-page-1/#comment-40307</link>
		<dc:creator>jliu83</dc:creator>
		<pubDate>Sun, 02 Oct 2011 09:34:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.engscope.com/pic24-tutorial/5-inputs-and-outputs/#comment-40307</guid>
		<description>@Gerhard.  The way to use the struct for RPORx is to use the RPORxbits symbol.  So in your example, it would be RPOR6bits.RP12R = 0x12.  

However, there are several things in terms of logic that doesn&#039;t quite add up (code should compile).  You are using the pins in analog mode, however, you are also using the same pins as an output compare.  I don&#039;t know which function will take precedence, but it is not good practice.  I believe the output compare function is a digital function and so your AD1PCFGL should be set to 0xFFFF.

Regards,
-J</description>
		<content:encoded><![CDATA[<p>@Gerhard.  The way to use the struct for RPORx is to use the RPORxbits symbol.  So in your example, it would be RPOR6bits.RP12R = 0&#215;12.  </p>
<p>However, there are several things in terms of logic that doesn&#8217;t quite add up (code should compile).  You are using the pins in analog mode, however, you are also using the same pins as an output compare.  I don&#8217;t know which function will take precedence, but it is not good practice.  I believe the output compare function is a digital function and so your AD1PCFGL should be set to 0xFFFF.</p>
<p>Regards,<br />
-J</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gerhard</title>
		<link>http://www.engscope.com/pic24-tutorial/5-inputs-and-outputs/comment-page-1/#comment-40303</link>
		<dc:creator>Gerhard</dc:creator>
		<pubDate>Sun, 02 Oct 2011 09:13:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.engscope.com/pic24-tutorial/5-inputs-and-outputs/#comment-40303</guid>
		<description>Thanks for comming back so quickly. Here is more code:

//main loop

int main(void)
{
	//Set up Clock

	OSCCON = 0x0894;	//Set FRC at 8 MHZ
	OSCTUN = 0x0000;	//fine tune to 8 MHZ
	CLKDIV = 0x0003;	//no  division

	


	//Set up I/O pin

	AD1PCFGL = 0x0000; 		// Set all pins as analog AN0 to AN12 
	TRISB = 0xEFFF;		 	// Set all Port B pins as inputs except pin RB12 as output

	//Set up PPS (Peripheral Pin Select)for ADC
	
  	//RPOR6.RP12R = 18;		// Set Pin 23 RP 12 as output compare 1

	//Set up PWM

	//Loop forever
   while(1)
   {
   }
}</description>
		<content:encoded><![CDATA[<p>Thanks for comming back so quickly. Here is more code:</p>
<p>//main loop</p>
<p>int main(void)<br />
{<br />
	//Set up Clock</p>
<p>	OSCCON = 0&#215;0894;	//Set FRC at 8 MHZ<br />
	OSCTUN = 0&#215;0000;	//fine tune to 8 MHZ<br />
	CLKDIV = 0&#215;0003;	//no  division</p>
<p>	//Set up I/O pin</p>
<p>	AD1PCFGL = 0&#215;0000; 		// Set all pins as analog AN0 to AN12<br />
	TRISB = 0xEFFF;		 	// Set all Port B pins as inputs except pin RB12 as output</p>
<p>	//Set up PPS (Peripheral Pin Select)for ADC</p>
<p>  	//RPOR6.RP12R = 18;		// Set Pin 23 RP 12 as output compare 1</p>
<p>	//Set up PWM</p>
<p>	//Loop forever<br />
   while(1)<br />
   {<br />
   }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jliu83</title>
		<link>http://www.engscope.com/pic24-tutorial/5-inputs-and-outputs/comment-page-1/#comment-40281</link>
		<dc:creator>jliu83</dc:creator>
		<pubDate>Sun, 02 Oct 2011 01:05:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.engscope.com/pic24-tutorial/5-inputs-and-outputs/#comment-40281</guid>
		<description>@Gerhard.  Can I see some more code showing how that line of code is used?  Did you include the p24FJ64GA102.h file?

-J</description>
		<content:encoded><![CDATA[<p>@Gerhard.  Can I see some more code showing how that line of code is used?  Did you include the p24FJ64GA102.h file?</p>
<p>-J</p>
]]></content:encoded>
	</item>
</channel>
</rss>

