<?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>topic Help i2c protocol in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-i2c-protocol/m-p/161065#M9747</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, does anyone know how to set up a communication routine i2c register but without using the microcontroller without the SDA end SCL pins, only with common pins&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Aug 2011 02:55:04 GMT</pubDate>
    <dc:creator>Eliezer</dc:creator>
    <dc:date>2011-08-23T02:55:04Z</dc:date>
    <item>
      <title>Help i2c protocol</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-i2c-protocol/m-p/161065#M9747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, does anyone know how to set up a communication routine i2c register but without using the microcontroller without the SDA end SCL pins, only with common pins&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 02:55:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-i2c-protocol/m-p/161065#M9747</guid>
      <dc:creator>Eliezer</dc:creator>
      <dc:date>2011-08-23T02:55:04Z</dc:date>
    </item>
    <item>
      <title>Re: Help i2c protocol</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-i2c-protocol/m-p/161066#M9748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="http://forums.freescale.com/../user/viewprofilepage/user-id/25241" rel="nofollow" target="_self"&gt;&lt;SPAN&gt;Eliezer&lt;/SPAN&gt;&lt;/A&gt;﻿,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you asking for code to "bit-bang" the I2C protocol?&amp;nbsp; If so, do you need C or assembly language? Are you using an HC08 or S08?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I you are using assembly language on an 08, I've implemented I2C as a bunch of macros (originally for the HC05). It uses a lot of in-line code to try to be fast, but it is still rather slow. Bit-timing may be an issue, as you may need to pad some macros with NOPs on the faster S08s.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 06:43:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-i2c-protocol/m-p/161066#M9748</guid>
      <dc:creator>rocco</dc:creator>
      <dc:date>2011-08-23T06:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help i2c protocol</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-i2c-protocol/m-p/161067#M9749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: arial, sans-serif; font-size: 16px; line-height: normal; background-color: #f5f5f5;"&gt;Hello Rocco.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: arial, sans-serif; font-size: 16px; background-color: #f5f5f5;"&gt;&lt;SPAN style="line-height: normal;"&gt;Yes, I need a code in C for the I2C protocol. I am using KA8 the RS08 family, but I canbe what you&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: arial, sans-serif; font-size: 16px; background-color: #f5f5f5;"&gt;&lt;SPAN style="line-height: normal;"&gt;have, already helps me a lot.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: arial, sans-serif; font-size: 16px; background-color: #f5f5f5;"&gt;&lt;SPAN style="line-height: normal;"&gt;Grateful.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 21:13:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-i2c-protocol/m-p/161067#M9749</guid>
      <dc:creator>Eliezer</dc:creator>
      <dc:date>2011-08-23T21:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: Help i2c protocol</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-i2c-protocol/m-p/161068#M9750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eliezer,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The KA8 is neither an S08 or an HC08, but an RS08, so the assembly language code may not work (I have never used an RS08, as I consider them brain-damaged.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But here is my I2C macro file anyway. IYou use it by stringing I2C commands together, such as this routine from an HC08 project:&lt;/P&gt;&lt;PRE&gt;;
;
; Read all just the motor limit parameters from the EEPROM,
; from the page pointed to by 'ParameterPage'. The parameters
; we need to read are 'MinPosition' and 'MaxPosition'.
;
ParamLoadLimits:
 EE_READ ParameterPage,#(MinPosition-EEP_Start),EER_ERR2
    ;node page, byte in EEPROM, error exit
;
 EE_BYTE_IN  ;get a data byte from EEPROM
 EE_ACK   ;ACK it to continue
 sta MinPosition ;store the data byte
;
 EE_BYTE_IN  ;get a data byte from EEPROM
 EE_ACK   ;ACK it to continue
 sta MinPosition+1 ;store the data byte
;
 EE_BYTE_IN  ;get a data byte from EEPROM
 EE_ACK   ;ACK it to continue
 sta MinPosition+2 ;store the data byte
;
 EE_BYTE_IN  ;get a data byte from EEPROM
 EE_ACK   ;ACK it to continue
 sta MaxPosition ;store the data byte
;
 EE_BYTE_IN  ;get a data byte from EEPROM
 EE_ACK   ;ACK it to continue
 sta MaxPosition+1 ;store the data byte
;
 EE_BYTE_IN  ;get a data byte from EEPROM
 EE_NAK   ;NAK it to make it stop
 sta MaxPosition+2 ;store the data byte
;
; done reading bytes
;
 EE_STOP   ;and issue the stop sequence.
;
 jsr SetLimits ;update the DSP on the situation
 clc   ;clear carry
 rts   ;return happy with carry clear
;
;
; EEPROM error routine for a Read of limit parameters.
;
EER_ERR2:
 EE_STOP   ;drop the EEPROM
 ErrLog E_EEPRMread ;"EEPROM Read Error"
 sec   ;set carry
 rts   ;return empty handed with carry set&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:06:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-i2c-protocol/m-p/161068#M9750</guid>
      <dc:creator>rocco</dc:creator>
      <dc:date>2020-10-29T09:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Help i2c protocol</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-i2c-protocol/m-p/161069#M9751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And here is the macro file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2011 01:31:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-i2c-protocol/m-p/161069#M9751</guid>
      <dc:creator>rocco</dc:creator>
      <dc:date>2011-08-24T01:31:48Z</dc:date>
    </item>
  </channel>
</rss>

