<?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>S12 / MagniV MicrocontrollersのトピックRe: I2C reading second Part</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/I2C-reading/m-p/126425#M533</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;1. Is needed the I2C module works only in Interrupt mode?&lt;DIV&gt;2. in polling mode, exists a flag bit that lets me work in this mode?&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;Since there is not extra byte buffering in the IIC hardware, then the ISR is necessary if you cannot poll fast enough before the next byte arrives. So a slower bitrate could possibly make the polled mode possible.&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Mar 2006 06:27:30 GMT</pubDate>
    <dc:creator>imajeff</dc:creator>
    <dc:date>2006-03-21T06:27:30Z</dc:date>
    <item>
      <title>I2C reading</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/I2C-reading/m-p/126419#M527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;DIV&gt;Hello everyone!!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I'm working with HCS12NE64 micrcontroller on a SE2PROM application. the writing routine works with out problem, but the reading. I have modified the Clock speed several times without success; once I catch the incoming data in IBDR, I store it in an array, but the data isn't that really is. I work over HCs12 CodeWarrior and I am programming in C. I can't find a bit that solves the Rx truoble.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks for your cooperation.&lt;/DIV&gt;&lt;DIV&gt;Giovanni Garcia&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2006 04:45:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/I2C-reading/m-p/126419#M527</guid>
      <dc:creator>Hagen</dc:creator>
      <dc:date>2006-02-17T04:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: I2C reading</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/I2C-reading/m-p/126420#M528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Comic Sans MS"&gt;Hi Hagen,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Comic Sans MS"&gt;For you and others, may be the attached Excel spreadsheet will be useful. It allows you to calculate the I²C parameters on S12.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Comic Sans MS"&gt;Please keep us posted if it helped you...&lt;BR /&gt;Alvin.&lt;/FONT&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2006 20:46:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/I2C-reading/m-p/126420#M528</guid>
      <dc:creator>Nabla69</dc:creator>
      <dc:date>2006-02-17T20:46:40Z</dc:date>
    </item>
    <item>
      <title>I2C reading second Part</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/I2C-reading/m-p/126421#M529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Before I received the reply for my message, I changed the SCLK frequency and works. The&amp;nbsp;troubble is:&lt;/DIV&gt;&lt;DIV&gt;I need to read from the slave device, a serial E2PROM memory (24LC256); it's seems the microcontroller can't hold on the information from memory because the micro read the IBDR but inmediatly change to the next data and can't store on memory. I tried testing with many bit flags: TCF, IBB, and IBIF, without success, sometimes it can recognize those bits&amp;nbsp;and go to the next instruction, sometimes doesn't. In additon, I work my I2C read routine in polling mode but Interruption mode. Something peculiar, sometimes the SRW bit is set and I don't have the micro as Slave, just Master. Why happens this?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;here go a part of the code in C:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;/******************************************************************/&lt;/DIV&gt;&lt;DIV&gt;/* c. Re-Enviar Señal de START */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IIC_Start(leer);&lt;/DIV&gt;&lt;DIV&gt;/* d. Tomar los datos que lee en BDR y pasarlos a Buffer de Rx Data_I2C */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(i=0;i&amp;lt;=*Tam_buf_I2C;i++){&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;while(!b_TestBit(IBSR_IBIF,IBSR));&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* mientra bus está ocupado */&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;dummy_I2C = IBDR;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;Data_I2C[i]= dummy_I2C;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //dummy_I2C;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;b_SetBit(IBSR_IBIF,IBSR);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;b_ClearBit(3,IBCR);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // envia un ACK y termina&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IIC_Stop();&lt;/DIV&gt;&lt;DIV&gt;/* Deshabilitar Modulo I2C para evitar Flag de BusyBus inexistentes*/&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IBCR &amp;amp;= 0x7F;&lt;BR /&gt;&lt;DIV&gt;/******************************************************************/&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;IICStart(leer) is a function that re-send the START signal and then the Slave address with last bit Set (R=1).&lt;/DIV&gt;&lt;DIV&gt;After that I wait for incoming data, reading the IBDR; in debugging mode works, that is, with BreakPoints in Code Warrior's Realtime Debugger. With out break points the micro only watches 0xFF, 0x00 even 0x01. I thougth the problem is Clock Speed, so I changed to 75KHz without success.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;1. Is needed the I2C module works only in Interrupt mode?&lt;/DIV&gt;&lt;DIV&gt;2. in polling mode, exists a flag bit that lets me work in this mode?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks for your Help!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Giovanni Garcia&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2006 21:10:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/I2C-reading/m-p/126421#M529</guid>
      <dc:creator>Hagen</dc:creator>
      <dc:date>2006-02-17T21:10:07Z</dc:date>
    </item>
    <item>
      <title>I2C reading again</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/I2C-reading/m-p/126422#M530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;It's me again, Hagen.&lt;/DIV&gt;&lt;DIV&gt;if somebody can help me, my MSN contact is&lt;/DIV&gt;&lt;DIV&gt;&lt;A href="mailto:jedi_hyoga@hotmail.com" rel="nofollow" target="_blank"&gt;jedi_hyoga@hotmail.com&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks!&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2006 21:11:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/I2C-reading/m-p/126422#M530</guid>
      <dc:creator>Hagen</dc:creator>
      <dc:date>2006-02-17T21:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: I2C reading</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/I2C-reading/m-p/126423#M531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Thank you for your solution Hagen.&lt;BR /&gt;I followed AN2318/D and now have working the I2C24WC32 in Debug mode with breakpoint set after writing each 32 byte page.&lt;BR /&gt;&lt;BR /&gt;With Normal execution at speed it will not run correct. Something different is happening. How to trace execution at full speed.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Feb 2006 16:27:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/I2C-reading/m-p/126423#M531</guid>
      <dc:creator>samiran_cj</dc:creator>
      <dc:date>2006-02-26T16:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: I2C reading</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/I2C-reading/m-p/126424#M532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;I used the information in CAT24WC32-64 datasheet to send addresses and data. The section on Acknowledge Polling indicates the EEProm takes time to do the writes.Never got any Acks though. I had to use a delay timer instead of a breakpoint at the end of each packet write.&amp;nbsp;I dont really understand&amp;nbsp;how but anyway it works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Mar 2006 18:01:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/I2C-reading/m-p/126424#M532</guid>
      <dc:creator>samiran_cj</dc:creator>
      <dc:date>2006-03-17T18:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: I2C reading second Part</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/I2C-reading/m-p/126425#M533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;1. Is needed the I2C module works only in Interrupt mode?&lt;DIV&gt;2. in polling mode, exists a flag bit that lets me work in this mode?&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;Since there is not extra byte buffering in the IIC hardware, then the ISR is necessary if you cannot poll fast enough before the next byte arrives. So a slower bitrate could possibly make the polled mode possible.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2006 06:27:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/I2C-reading/m-p/126425#M533</guid>
      <dc:creator>imajeff</dc:creator>
      <dc:date>2006-03-21T06:27:30Z</dc:date>
    </item>
    <item>
      <title>I2C reading and witing is complete!!</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/I2C-reading/m-p/126426#M534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Yes, I verified and works my hardware using the interrupt mode as is explain in the Freescale's "AN2318 - Using the I2C Bus" document. Now I can read and write in a SE2PROM memory. However, you must be carefull with overwriting pages, because the memory over rolls the page and write where was wrote.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks and enjoy the Freescale Microcontrollers, they're the best!&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#ff0000"&gt;Hagen&lt;/FONT&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Mar 2006 21:44:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/I2C-reading/m-p/126426#M534</guid>
      <dc:creator>Hagen</dc:creator>
      <dc:date>2006-03-24T21:44:38Z</dc:date>
    </item>
  </channel>
</rss>

