<?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: I2C how to get started (AP8)</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/I2C-how-to-get-started-AP8/m-p/131921#M2866</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hey thanks for your reply. I had the pull up resistor only on SDA but it stays high all the time. I placed another in SCL, now it works but SDA wont change, same result with the code generated by processor expert. I also replaced both IC's (uController and I2C) but no difference. Any ideas?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Oct 2006 23:41:17 GMT</pubDate>
    <dc:creator>peblink</dc:creator>
    <dc:date>2006-10-06T23:41:17Z</dc:date>
    <item>
      <title>I2C how to get started (AP8)</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/I2C-how-to-get-started-AP8/m-p/131919#M2864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi everyone!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Im new to uC's and more to I2C and after reading datasheets and forum messages I stil cant get it runnig. Im using CW5 and I want to use the I2C module . In main I´ve initialized the MMI2C as follows (this came from a reply to another topic)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;MMCR1 = 0x80;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MMCR2 = 0x30; /* Enable I2C master mode, interrupts enabled */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MMFDR = 0x02; /* Freq = 50kHz with 4MHz Xtal*/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MMSR = 0x00;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and then I call I2C_Tx_start() and I2C_Tx_stop() in a while loop. I dont really agree with the code and also tried other options but they wont work either. I want to transmit data to a 24FC512 eeprom using this code (based on MC68HC908AP64 datasheet, page 242)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;void I2C_Tx_start (void){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MMSR_MMTXBE=0; /* start condition code&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MMCR2_MMRW=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MMCR2_MMAST=1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;MMADR = 0xA0; /* Dev. address 00 */&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;MMSR_MMTXBE = 1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MMSR_MMTXIF = 1; /* acknowledge */&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;MMDTR = 0XAA; /* dummy data to memory */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;void I2C_Tx_stop(void){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MMSR_MMTXBE = 1; /* acknowledge */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MMSR_MMTXIF = 1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;MMCR2_MMNAKIF=1; /* stop*/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MMCR2_MMAST=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MMSR_MMTXBE = 1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SCL is low all the time and SDA always high. I believe the problem is in the initialization. The device address is 00 (using A2,A1,A0 = 0) Could someone please give feedback on this problem? Thanks in advance&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Sep 2006 03:03:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/I2C-how-to-get-started-AP8/m-p/131919#M2864</guid>
      <dc:creator>peblink</dc:creator>
      <dc:date>2006-09-30T03:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: I2C how to get started (AP8)</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/I2C-how-to-get-started-AP8/m-p/131920#M2865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Processor Expert produces code to use I2C whichI have used successfully.&amp;nbsp; If this bean is not included in your license get hold of a temporary license and you will be able to view the code.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If this is not the problem have you used pull up resistors on SCL and SDA?&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Oct 2006 22:17:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/I2C-how-to-get-started-AP8/m-p/131920#M2865</guid>
      <dc:creator>chapster</dc:creator>
      <dc:date>2006-10-05T22:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: I2C how to get started (AP8)</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/I2C-how-to-get-started-AP8/m-p/131921#M2866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hey thanks for your reply. I had the pull up resistor only on SDA but it stays high all the time. I placed another in SCL, now it works but SDA wont change, same result with the code generated by processor expert. I also replaced both IC's (uController and I2C) but no difference. Any ideas?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Oct 2006 23:41:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/I2C-how-to-get-started-AP8/m-p/131921#M2866</guid>
      <dc:creator>peblink</dc:creator>
      <dc:date>2006-10-06T23:41:17Z</dc:date>
    </item>
  </channel>
</rss>

