<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to use A/D pins (27,28,29,30)as GPIO in lpc2124</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/34862/how-to-use-a-d-pins-27-28-29-30-as-gpio-in-lpc2124</link><description> 
 
Can anyone tell me how i use adc pins as GPIO in lpc2124 

 
Thanks in advance. 

 
 
 </description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: How to use A/D pins (27,28,29,30)as GPIO in lpc2124</title><link>https://community.arm.com/thread/140988?ContentTypeID=1</link><pubDate>Fri, 30 Dec 2016 11:24:27 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:d8caf70d-ff5e-45c5-98fe-77e8c77e5551</guid><dc:creator>Bhura Malik</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thankyou sir...&lt;br /&gt;
Yes these pins working now I&amp;#39;m ignore pinsel register so I faced this
problem but now these pins are work in correct way .&lt;/p&gt;

&lt;p&gt;
You are correct sir I am not read manual properly, so I am stuck
at that point&lt;/p&gt;

&lt;p&gt;
Thank you ...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use A/D pins (27,28,29,30)as GPIO in lpc2124</title><link>https://community.arm.com/thread/137369?ContentTypeID=1</link><pubDate>Fri, 30 Dec 2016 11:13:27 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9e1d640e-3cf0-4200-8e66-2b67edd50aa1</guid><dc:creator>edPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Why do you so seriously dislike looking at the user manual of the
processor?&lt;/p&gt;

&lt;p&gt;
The documentation clearly indicates that the PINSEL1 register have
the bit values set to 10 for P0.27, P0.28, P0.29 and P0.30.&lt;/p&gt;

&lt;p&gt;
And it also very clearly indicates that you need the bit values 00
to get the individual pins to work as GPIO.&lt;/p&gt;

&lt;p&gt;
Haven&amp;#39;t you spent time looking at page 110 and 111 of this
document?&lt;br /&gt;
&lt;a href="http://www.keil.com/dd/docs/datashts/philips/user_manual_lpc2114_2124_2212_2214.pdf"&gt;
&lt;a href="http://www.keil.com/dd/docs/datashts/philips/user_manual_lpc2114_2124_2212_2214.pdf"&gt;www.keil.com/.../user_manual_lpc2114_2124_2212_2214.pdf&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
The information in the manual very clearly indicate that your
initial assign of PINSEL1 can not work. And it also very clearly
indicate that your program can not work if you completely ignore
PINSEL1.&lt;/p&gt;

&lt;p&gt;
You really can&amp;#39;t get your program to work by ignoring the
following information:&lt;/p&gt;

&lt;pre&gt;
The direction control bit in the IO0DIR register is effective only when the GPIO function
is selected for a pin. For other functions direction is controlled automatically.
&lt;/pre&gt;

&lt;p&gt;
As already explained in my first post, your P0.27 doesn&amp;#39;t work
because you haven&amp;#39;t correctly configured the relevant bits in
PINSEL1. And the manual does show the reset values for this register
in the last column of the table.&lt;/p&gt;

&lt;p&gt;
So in short: No manual reading means no progress. Ignore the
processor documentation and you will continue to be stuck.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use A/D pins (27,28,29,30)as GPIO in lpc2124</title><link>https://community.arm.com/thread/129310?ContentTypeID=1</link><pubDate>Fri, 30 Dec 2016 10:32:05 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:75162226-4ecc-4309-8636-21c2eb1c74c6</guid><dc:creator>Bhura Malik</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thankyou so much sir given me your precious time&lt;/p&gt;

&lt;p&gt;
If I use IODIR0 = 0xF0000000; without using PINSEL1 then direction
of these pins are not set can you tell me how i use these four pins
27 28 29 30 as GPio&lt;br /&gt;
Thankyou&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use A/D pins (27,28,29,30)as GPIO in lpc2124</title><link>https://community.arm.com/thread/120937?ContentTypeID=1</link><pubDate>Fri, 30 Dec 2016 09:33:03 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:924a4a69-dba5-4a3b-8be8-10862a1c7794</guid><dc:creator>edPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Just an addentum:&lt;/p&gt;

&lt;pre&gt;
PINSEL1 = (1&amp;lt;&amp;lt;22)|(1&amp;lt;&amp;lt;23);
&lt;/pre&gt;

&lt;p&gt;
This isn&amp;#39;t a good way to update the PINSELx registers. Note that
you are setting two bits for P0.27. But since you perform a 32-bit
assign, you are also affecting the 15 other pins configured by this
register. It&amp;#39;s much better to be explicit and modify the register by
setting the bits you need set and clearing the bits you need cleared
- while leaving all the other bits untouched.&lt;/p&gt;

&lt;p&gt;
If you do a 32-bit assign like you do, then you need to read
through the documentation for each and every of the 32 bits just to
make sure you don&amp;#39;t get a side effect you don&amp;#39;t want. And you then
need to add some note in the source code making readers of the code
know that you really have verified each and every bit. And to let the
reader know the full outcome you expected from the assign so they can
double-check.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use A/D pins (27,28,29,30)as GPIO in lpc2124</title><link>https://community.arm.com/thread/108996?ContentTypeID=1</link><pubDate>Fri, 30 Dec 2016 07:09:53 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:05d28bff-4b83-4ab0-95b3-4d00ec4cc575</guid><dc:creator>edPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
&amp;quot;I am using PINSEL1 = (1&amp;lt;&amp;lt;22)|(1&amp;lt;&amp;lt;23); to make these
pin GPIO ,pin 28 29 30 working properly but pin 27 is not working
...any suggestions?&amp;quot;&lt;/p&gt;

&lt;p&gt;
Yes - read the user manual for the chip.&lt;/p&gt;

&lt;p&gt;
1) PINSEL1 bit 22 and 23 will _only_ affect P0.27. Not P0.28,
P0.29 or P0.30.&lt;/p&gt;

&lt;p&gt;
2) You are setting the two bits. That most definitely doesn&amp;#39;t
change the pin to GPIO. The user manual (which you have read?)
concludes that when you set these two bits, you make P0.27 into a
match pin for for timer 0.&lt;/p&gt;

&lt;p&gt;
So - you need to clear the bits to get GPIO functionality. And
there are two bits to clear for each of the four pins you want to
make into GPIO. But I guess you know that since you quickly figured
out that the processor user manual would hold the answers to your
questions of how to configure the processor...&lt;/p&gt;

&lt;p&gt;
By the way - NXP tends to have really great user manuals for their
processors.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use A/D pins (27,28,29,30)as GPIO in lpc2124</title><link>https://community.arm.com/thread/83462?ContentTypeID=1</link><pubDate>Fri, 30 Dec 2016 05:03:35 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:0b96b41a-8585-43ac-9dc1-684a102ebce8</guid><dc:creator>Bhura Malik</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;b&gt;I am using PINSEL1 = (1&amp;lt;&amp;lt;22)|(1&amp;lt;&amp;lt;23); to make these
pin GPIO ,pin 28 29 30 working properly but pin 27 is not working
...any suggestions&lt;br /&gt;
Thank you&lt;/b&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use A/D pins (27,28,29,30)as GPIO in lpc2124</title><link>https://community.arm.com/thread/69744?ContentTypeID=1</link><pubDate>Fri, 30 Dec 2016 04:53:23 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:96ef6589-17f1-4cf0-a878-ba0bf7d29105</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
That would be in the &lt;b&gt;&lt;i&gt;Manufacturer&amp;#39;s&lt;/i&gt; Documentation&lt;/b&gt;
for the particular chip in question.&lt;/p&gt;

&lt;p&gt;

&lt;a href="http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/lpc-arm7-arm9-mcus/lpc-arm7-mcus/lpc2100-200-300-400"&gt;www.nxp.com/.../lpc2100-200-300-400&lt;/a&gt;:MC_71580&lt;/p&gt;

&lt;p&gt;
&lt;a href="https://www.lpcware.com/"&gt;https://www.lpcware.com/&lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>