<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>8-bit Microcontrollers中的主题 Re: lcd interface with MC9S08PA16</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302183#M20632</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ian,&lt;/P&gt;&lt;P&gt;That would make it a lot more simpler but how do make sure that the&lt;/P&gt;&lt;P&gt;array is allocated to flash directly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avdit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Jun 2014 15:08:49 GMT</pubDate>
    <dc:creator>avditkohli</dc:creator>
    <dc:date>2014-06-24T15:08:49Z</dc:date>
    <item>
      <title>lcd interface with MC9S08PA16</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302157#M20606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;i am trying to interface LCD hd44780 or similar to a microcontroller MC9S08PA16 but seem to get errors in LCD_CTRL_PORT, SFRPAGE, SFRPAGE_SAVE lines along with a few others. Please bare with me as i am new to freescale and code warrior. I have attached the main file if you wish to take a look.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Avdit&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337734"&gt;main.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2014 07:03:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302157#M20606</guid>
      <dc:creator>avditkohli</dc:creator>
      <dc:date>2014-05-21T07:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: lcd interface with MC9S08PA16</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302158#M20607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Avdit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your file, there is :&lt;/P&gt;&lt;P&gt;#define LCD_DAT_PORT P6 //LCD IS IN 8 BIT&lt;/P&gt;&lt;P&gt;#define LCD_CTRL_PORT P7 //3 control pins on P7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is P6 and P7? Is this defined in the code?&lt;/P&gt;&lt;P&gt;It should be one of the port data registers where LCD control pins are connected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Arpita&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 06:29:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302158#M20607</guid>
      <dc:creator>arpitaagarwal-b</dc:creator>
      <dc:date>2014-05-28T06:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: lcd interface with MC9S08PA16</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302159#M20608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;     Thanks for getting back to me. I solved that problem and have been&lt;/P&gt;&lt;P&gt;able to work my LCD to a certain extent. The only problem i am having is&lt;/P&gt;&lt;P&gt;that my output on the LCD is different every time I debug. For example if I&lt;/P&gt;&lt;P&gt;want to print "Logger" at times it'll print "L", '_', "Logg", "Logge" on&lt;/P&gt;&lt;P&gt;the same code. I have doubts on my delay/latch function. I have included my&lt;/P&gt;&lt;P&gt;code as an attachment&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avdit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Wed, May 28, 2014 at 11:59 AM, Arpita Agarwal &amp;lt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 11:05:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302159#M20608</guid>
      <dc:creator>avditkohli</dc:creator>
      <dc:date>2014-05-28T11:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: lcd interface with MC9S08PA16</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302160#M20609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Avdit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From looking at your code I think you haven't added the required delays in the LCD set up code nor after you write each character to the LCD. It might also be necessary to wait x milliseconds after the LCD is powered up before initialising it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One needs a delay of 47us after each character write. The E signal needs to be 1us wide (from memory).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be best to check the 44780 data sheet for exact timings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 13:33:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302160#M20609</guid>
      <dc:creator>iansmusical</dc:creator>
      <dc:date>2014-05-28T13:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: lcd interface with MC9S08PA16</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302161#M20610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;    Are the delays needed to be exactly as mentioned on the datasheet or&lt;/P&gt;&lt;P&gt;will a value greater than the specified one work as well? With my bus clock&lt;/P&gt;&lt;P&gt;frequency at 8MHz isnt the delay used sufficient. I did modify my program&lt;/P&gt;&lt;P&gt;to work with two kinds of delay. Do have a look&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avdit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Wed, May 28, 2014 at 7:04 PM, Ian Legg &amp;lt;admin@community.freescale.com&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2014 05:26:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302161#M20610</guid>
      <dc:creator>avditkohli</dc:creator>
      <dc:date>2014-05-29T05:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: lcd interface with MC9S08PA16</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302162#M20611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Avdit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The delays must be at least the data sheet specified values and usually a little longer to allow for tolerances. There is no upper limit for the delays other than I think the E signal because it is effectively a clock. So, for example, after writing a character to the display one would usually wait 47us (or check the busy flag) but there is no reason why one couldn't wait 1 second, it just depends how fast one needs to communicate with the display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Having looked at your code it might be personal preference but you might be better using the RTC peripheral to generate time delays as opposed to software loops? You'd then have known length delays that are not dependant on the bus clock frequency etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I can see there are no delays (47us+) after you write each character of your display message or suitable delays after the commandwrite(0x30) sequence. Again check the data sheet as I think there needs to be 4.5ms delays or similar between those commands?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2014 12:21:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302162#M20611</guid>
      <dc:creator>iansmusical</dc:creator>
      <dc:date>2014-05-29T12:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: lcd interface with MC9S08PA16</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302163#M20612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   I got the data to hold on the LCD by waiting using the busy flag but&lt;/P&gt;&lt;P&gt;that happened only once and since there has been no display on the LCD. I&lt;/P&gt;&lt;P&gt;have included my file. Do take a look, it is mostly self explanatory. The&lt;/P&gt;&lt;P&gt;delays can't be a problem now. Maybe its my check_busy_flag function but i&lt;/P&gt;&lt;P&gt;am not sure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avdit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Thu, May 29, 2014 at 10:56 AM, Avdit Singh Kohli &amp;lt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jun 2014 11:13:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302163#M20612</guid>
      <dc:creator>avditkohli</dc:creator>
      <dc:date>2014-06-02T11:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: lcd interface with MC9S08PA16</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302164#M20613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Avdit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pleased you are making progress :-)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't think you need the delays in lcd_set_write_instruction() and lcd_set_write_data() because one is only setting port pins and it's only after the E signal that waits or checking the busy flag is necessary. Remembering that the E signal is what clocks information into the display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your busy flag check function is ok but you probably don't need to set the port as output, just input so as to read the busy flag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You also can't check the busy flag in the display initialisation code until after a certain point. The diagram below might help:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="LCD.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/44134i86AE5E7C7FCE42F9/image-size/large?v=v2&amp;amp;px=999" role="button" title="LCD.jpg" alt="LCD.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Just remind me what lcd_write_byte(0x80) does in your while loop? I was thinking your were writing to display ram that might not be visible!?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jun 2014 07:31:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302164#M20613</guid>
      <dc:creator>iansmusical</dc:creator>
      <dc:date>2014-06-03T07:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: lcd interface with MC9S08PA16</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302165#M20614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ian,&lt;/P&gt;&lt;P&gt;     Thanks for all your help. I understood and made the changes you&lt;/P&gt;&lt;P&gt;suggested. The 0x80 allows access to the first letter on the first line of&lt;/P&gt;&lt;P&gt;the lcd. Basically i wanted to make sure that the data is written at the&lt;/P&gt;&lt;P&gt;right location. Do let me know if you think otherwise!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Avdit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Tue, Jun 3, 2014 at 1:02 PM, Ian Legg &amp;lt;admin@community.freescale.com&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jun 2014 05:52:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302165#M20614</guid>
      <dc:creator>avditkohli</dc:creator>
      <dc:date>2014-06-07T05:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: lcd interface with MC9S08PA16</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302166#M20615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ian,&lt;/P&gt;&lt;P&gt;   The program works just fine now. You will not believe it but the LCD&lt;/P&gt;&lt;P&gt;module I was using required a voltage supply of 5V and while my supply was&lt;/P&gt;&lt;P&gt;3.3V it worked in a twisted manner or not at all. The datasheet mentioned&lt;/P&gt;&lt;P&gt;3.3V but on consulting the manufacturing did the necessity of using 5V&lt;/P&gt;&lt;P&gt;emerge.&lt;/P&gt;&lt;P&gt;   Thanks for all your help. I am beginning my code for temperature sensing&lt;/P&gt;&lt;P&gt;now. Will let you know if I come up against any problems! :smileyhappy:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avdit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Tue, Jun 3, 2014 at 1:02 PM, Ian Legg &amp;lt;admin@community.freescale.com&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jun 2014 10:35:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302166#M20615</guid>
      <dc:creator>avditkohli</dc:creator>
      <dc:date>2014-06-07T10:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: lcd interface with MC9S08PA16</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302167#M20616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Avdit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You're welcome and pleased to hear it is all working now :-) I'd forgot 0x80 was the first position on line 1 but equally I don't normally use that command because out of reset the display location should already be set there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'll find that most LCDs require 5v even though there has been a shift to 3.3v. There is no reason why LCD logic can't be 3.3v but driving the LCD glass is the problem and the negative supply for the contrast, although that latter can be fixed with an addition chip (sometimes present on the LCD module). I did see an article for running a 5v LCD at 3.3v but with reduced contrast. Of course it depends on the chipset and what it sees a logic 1 at etc. The other solution is to use a level converter/shifter between the MCU and LCD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2014 07:51:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302167#M20616</guid>
      <dc:creator>iansmusical</dc:creator>
      <dc:date>2014-06-10T07:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: lcd interface with MC9S08PA16</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302168#M20617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Ian,&lt;/P&gt;&lt;P&gt;I had a few questions regarding operation of adc in mcs08pa4.&lt;/P&gt;&lt;P&gt;1. if my analog input is less than 256 will my output format of 8-bit be&lt;/P&gt;&lt;P&gt;sufficient?&lt;/P&gt;&lt;P&gt;2. how will the adc give values that are in fractions. suppose 0.14V?&lt;/P&gt;&lt;P&gt;3. Just to clarify, the 8,10,12 bit resolution is really the number of&lt;/P&gt;&lt;P&gt;samples?&lt;/P&gt;&lt;P&gt;Also my adc program does not seem to work although I followed almost all&lt;/P&gt;&lt;P&gt;instructions from the freescale adc tutorial. I would be highly obliged if&lt;/P&gt;&lt;P&gt;you took a look .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Avdit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Tue, Jun 10, 2014 at 1:22 PM, Ian Legg &amp;lt;admin@community.freescale.com&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2014 17:29:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302168#M20617</guid>
      <dc:creator>avditkohli</dc:creator>
      <dc:date>2014-06-12T17:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: lcd interface with MC9S08PA16</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302169#M20618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Avdit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are answers to your queries:&lt;/P&gt;&lt;P&gt;1. Analog input refers to the voltage you have applied on the pin like 1V or 3V. Maximum voltage can be the MCU supply voltage, ie, either 3.3V or 5V. 256 is the decimal number.&lt;/P&gt;&lt;P&gt;2. suppose your supply is 3.3V, resolution is 8bits, then 3.3V --&amp;gt; 255, 0.14V --&amp;gt; (0.14/3.3)*255 = ~10. So your ADC value will be around 10.&lt;/P&gt;&lt;P&gt;3. this is the number of bits for the adc result. like if 8bit, then maximum voltage will corresponds to 255(2^8-1), if 10bits, it will be 1023 (2^10-1) and so on..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding code:&lt;/P&gt;&lt;P&gt;It seems you continuously want to read ADC. In this case, you can enable continuous conversion: &lt;/P&gt;&lt;P&gt;ADC_SC1_ADCO = 1; /*Continuous conversion enable*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While reading the result:&lt;/P&gt;&lt;P&gt;while(!ADC_SC1_COCO); &lt;/P&gt;&lt;P&gt;&amp;nbsp; result = ADC_RL;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should work. If it doesn't, let me know where your code is getting hanged.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Arpita Agarwal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2014 05:07:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302169#M20618</guid>
      <dc:creator>arpitaagarwal-b</dc:creator>
      <dc:date>2014-06-17T05:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: lcd interface with MC9S08PA16</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302170#M20619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arpita,&lt;/P&gt;&lt;P&gt;    Thanks for your help. I changed the ADCO bit in order to enable&lt;/P&gt;&lt;P&gt;continuous conversion. I am using pin no.19 i.e. ADC1 so what should be&lt;/P&gt;&lt;P&gt;value I send to ADC_SC1? Only when I am sending 0b00100010 do i get any&lt;/P&gt;&lt;P&gt;value in my result but logically shouldn't i send 0b0010001. Anyways, that&lt;/P&gt;&lt;P&gt;value remains constant even when I change the incoming to-be-measured&lt;/P&gt;&lt;P&gt;voltage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Avdit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2014 11:11:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302170#M20619</guid>
      <dc:creator>avditkohli</dc:creator>
      <dc:date>2014-06-17T11:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: lcd interface with MC9S08PA16</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302171#M20620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Arpita,&lt;/P&gt;&lt;P&gt;    I got the program to work. Turns out, the hardware analog input was&lt;/P&gt;&lt;P&gt;configured correct. Also I wanted to ask you how can I use a float variable&lt;/P&gt;&lt;P&gt;with the uC I am using MCS08PA4 cause it displays an error eveytime I try&lt;/P&gt;&lt;P&gt;and use 'float'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avdit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Tue, Jun 17, 2014 at 4:40 PM, Avdit Singh Kohli &amp;lt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2014 09:16:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302171#M20620</guid>
      <dc:creator>avditkohli</dc:creator>
      <dc:date>2014-06-18T09:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: lcd interface with MC9S08PA16</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302172#M20621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Avdit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look here: &lt;A href="http://mcuoneclipse.com/2013/05/08/addingremoving-floating-point-format-for-s08-projects/" title="http://mcuoneclipse.com/2013/05/08/addingremoving-floating-point-format-for-s08-projects/"&gt;Adding/Removing Floating Point Format for S08 Projects | MCU on Eclipse&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course remembering that adding floating point will increase your runtime and may in fact be counter productive!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2014 09:34:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302172#M20621</guid>
      <dc:creator>iansmusical</dc:creator>
      <dc:date>2014-06-18T09:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: lcd interface with MC9S08PA16</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302173#M20622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Avdit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good to hear that your program is working now :smileyhappy:&lt;/P&gt;&lt;P&gt;As mentioned by Ian, do consider the advantages of adding "float" to your code because it will increase the size and execution time of your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Arpita&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2014 09:47:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302173#M20622</guid>
      <dc:creator>arpitaagarwal-b</dc:creator>
      <dc:date>2014-06-18T09:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: lcd interface with MC9S08PA16</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302174#M20623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  Quick question: I am trying to convert my binary output to BCD. How do I&lt;/P&gt;&lt;P&gt;transfer the MSB of my output to the LSB of a variable that I am using?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Avdit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Wed, Jun 18, 2014 at 3:18 PM, Arpita Agarwal &amp;lt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2014 13:46:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302174#M20623</guid>
      <dc:creator>avditkohli</dc:creator>
      <dc:date>2014-06-18T13:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: lcd interface with MC9S08PA16</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302175#M20624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can transfer MSB of any variable using right shift operand (&amp;gt;&amp;gt;).&lt;/P&gt;&lt;P&gt;The statement will be:&lt;/P&gt;&lt;P&gt;out=in&amp;gt;&amp;gt;no_of_bits_to_be_shifted;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is a signed variable, proper masking of signed bit will be required.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jun 2014 04:08:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302175#M20624</guid>
      <dc:creator>arpitaagarwal-b</dc:creator>
      <dc:date>2014-06-19T04:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: lcd interface with MC9S08PA16</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302176#M20625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   I think you got my question wrong, Sorry! Suppose x=0b&lt;STRONG&gt;1&lt;/STRONG&gt;010 and y=0b010&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;, i wish to transfer the MSB of 'x' to LSB of 'y' to make y=0b1011&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Avdit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Thu, Jun 19, 2014 at 9:39 AM, Arpita Agarwal &amp;lt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jun 2014 06:28:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-interface-with-MC9S08PA16/m-p/302176#M20625</guid>
      <dc:creator>avditkohli</dc:creator>
      <dc:date>2014-06-19T06:28:03Z</dc:date>
    </item>
  </channel>
</rss>

