• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Low Power RF & Wireless Connectivity » Low Power RF Proprietary Software & SimpliciTI Forum » cc2540 and I2C interface
Share
Low Power RF & Wireless Connectivity
  • Forums
  • Announcements
  • Files
  • E2E Wiki
Options
  • Subscribe via RSS

Forums

cc2540 and I2C interface

This question is not answered
Seldomlight
Posted by Seldomlight
on Nov 07 2010 09:57 AM
Prodigy40 points

Hi everybody,

 

i just started working with the DevKit cc2540. My project is to connect a device for EKG-mesurements. Now I have some questions relating to interfaces and devices:

1. I read the User Guide cc25xx SoC, and saw that I2C interfaces are not supported. Is there a way to get this feature?

2. Is there a reliable device that you can suggest for EKG-mesurements?

 

Many thanks in advance for your efforts!

 

Greetings

SeldomLight


i2c interface I/O
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Jim Noxon
    Posted by Jim Noxon
    on Nov 10 2010 12:44 PM
    Genius14940 points

    SeldomLight,

    There is no way to get an I2C interface as a hardware peripheral on the CC2540 but you can implement an I2C interface in software.  There are numerous examples available, simply google "8051 I2C source code" and you will find plenty to choose from.  Note that implementing the master side of the interface is much simpler than implementing the slave side.  This is because the master is in control of the timing (for the most part) and thus you don't have to worry as much about latencies due to interrupts etc.  If you are implementing the slave side, you may need to be able to disable all interrupts for the duration of the communication transaction on the I2C bus in order to keep up with the master.

    A similar part, the CC2533, does have a hardware I2C peripheral block in it but it doesn't have the ADC or USB in it.

    As far as the EKG monitor, take a look at this demonstration platform http://focus.ti.com/general/docs/litabsmultiplefilelist.tsp?literatureNumber=slaa280a, and you can see it in action here http://e2e.ti.com/videos/m/microcontroller/97492.aspx.

    Regards,

    Jim

     

    If this post has answered your question, even if not the way you wanted, please indicate so by clicking the     Verify Answer     button on this post.
    Please start a new thread if your question is not closely aligned with the original post in this thread as it makes searches more effective.
    If responding to a post please click the     Reply     button on the post you are responding to rather than merely defaulting to the bottom post.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Seldomlight
    Posted by Seldomlight
    on Nov 22 2010 02:19 AM
    Prodigy40 points

    Hi Jim,

    thank you for your fast reply! That helped me a lot!

    I wish you a nice time.

    Seldomlight

     

     

     

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Brown59592
    Posted by Brown59592
    on Nov 29 2010 03:42 AM
    Expert1050 points

    Hi

    If I2C is not implemented for the CC2540 why the HAL Driver API.pdf from the CC2540 devkit mention those functions:

    HalI2CInit ()

    HalI2CReceive ()

    HalI2CSend ()

    (chapter 11. I2C Service, page 26)

    The hal_drivers.c indeed has all the other functions mentioned in the pdf except the I2C functions.

    Is there any future plan to have that functionality or the documentation is wrong?

    regards,

    B.

     

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jim Noxon
    Posted by Jim Noxon
    on Nov 30 2010 00:53 AM
    Genius14940 points

    Csenteri,

    I am not aware of any plans to provide a hardware I2C peripheral on the CC2540.  Your question as to why the header file contains API's for it is answered by recognizing the library is defined seperately from the parts on which it is utilized.

    In this case, the library defines an API or interface specification.  Regardless of whether or not the interface is actually implemented is independent of the definition.  In this case, this library contains the definition of how to call an I2C interface with defined expectation of what will happen should that interface be implemented.  In an extreme form, one could implement an I2C interface entirely by bit banging some I/O lines and be able to maintian the defined interface expected from the library.  This is what gives a library it usefulness, the common definition for multiple platforms.  The underlying implementation may vary vastly but it still can work as long as the interface is implemented.

    Unfortunately, sometimes libraries are defined to encompass many capabilities but only expecting the capabilities the underlying hardware can support with the other capabilities being left unimplemented.  The CC2540 is part of a new family of parts witch include the CC253x parts as well.  This can be seen when one recognizes the same users guide is reference for all 4 parts.  Onlyl the CC2533 implements the hardware I2C interface so the library used for this family of parts also included a specification which supported the hardware implementation of the CC2533 I2C peripheral.  Actually the library you are refering to handles more than just these 4 parts.

    Thus, the library cannot be interpreted as a part specification nor can it be used as a roadmap for up and coming architectures.  The only guarantee of the library is the interface, and for parts that do not support a portion of the library, those portions many times go unimplemented.

    Regards,

    Jim

     

    If this post has answered your question, even if not the way you wanted, please indicate so by clicking the     Verify Answer     button on this post.
    Please start a new thread if your question is not closely aligned with the original post in this thread as it makes searches more effective.
    If responding to a post please click the     Reply     button on the post you are responding to rather than merely defaulting to the bottom post.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jack Peng
    Posted by Jack Peng
    on Jul 06 2011 07:58 AM
    Prodigy40 points

    Dear Jim,

    I'm using CC2533, but I dont get the API function on I2C.

    could you give me the cc2533 soure and header files of I2C  to me?

    my email: mywaypeng@126.com

    Best regards,

    Jack

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jim Noxon
    Posted by Jim Noxon
    on Jul 06 2011 15:00 PM
    Genius14940 points

    The I2C code for the CC2533 can be found in the RemoTI library stack located here http://focus.ti.com/docs/toolsw/folders/print/remoti.html

    After installing it you can find the code in the following directory

    C:\Texas Instruments\RemoTI-CC253xDK-1.2\Components\hal\target\CC2530EB_NPI

    if installed in the default location.

    Jim Noxon

    If this post has answered your question, even if not the way you wanted, please indicate so by clicking the     Verify Answer     button on this post.
    Please start a new thread if your question is not closely aligned with the original post in this thread as it makes searches more effective.
    If responding to a post please click the     Reply     button on the post you are responding to rather than merely defaulting to the bottom post.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jack Peng
    Posted by Jack Peng
    on Jul 06 2011 20:36 PM
    Prodigy40 points

    Dear Jim,

    Thank you very much for you information.

    I have found the source code in the directory.

    It's GPIO simulate to IIC interface. but CC2533 has hardware IIC.

    is there sample code for CC2533 hardware IIC?

    Best regards,

    Jack

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jim Noxon
    Posted by Jim Noxon
    on Jul 06 2011 20:57 PM
    Genius14940 points

    I was unaware this code was a bit banging code.  Kind of makes sense since the CC2530 target directory doesn't have an I2C hardware peripheral block.  My apologies, I don't know of any other code to offer you.

    Jim Noxon

    If this post has answered your question, even if not the way you wanted, please indicate so by clicking the     Verify Answer     button on this post.
    Please start a new thread if your question is not closely aligned with the original post in this thread as it makes searches more effective.
    If responding to a post please click the     Reply     button on the post you are responding to rather than merely defaulting to the bottom post.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jim Noxon
    Posted by Jim Noxon
    on Jul 06 2011 20:57 PM
    Genius14940 points

    I was unaware this code was a bit banging code.  Kind of makes sense since the CC2530 target directory doesn't have an I2C hardware peripheral block.  My apologies, I don't know of any other code to offer you.

    Jim Noxon

    If this post has answered your question, even if not the way you wanted, please indicate so by clicking the     Verify Answer     button on this post.
    Please start a new thread if your question is not closely aligned with the original post in this thread as it makes searches more effective.
    If responding to a post please click the     Reply     button on the post you are responding to rather than merely defaulting to the bottom post.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jack Peng
    Posted by Jack Peng
    on Jul 06 2011 21:22 PM
    Prodigy40 points

    Dear Jim,

    Thank you all the same, it help me a lot too!!

    May be I would program CC2533 hardware IIC by myself.

    I think hardware IIC would be fast then simulate one.

    Best regards,

    Jack

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jim Noxon
    Posted by Jim Noxon
    on Jul 07 2011 14:36 PM
    Genius14940 points

    I agree, a hardware peripheral would be better than software alone.  Software only solutions will eat up unnecessary CPU bandwidth but if that's all you can do... well, you know what I mean.

    Jim Noxon

    If this post has answered your question, even if not the way you wanted, please indicate so by clicking the     Verify Answer     button on this post.
    Please start a new thread if your question is not closely aligned with the original post in this thread as it makes searches more effective.
    If responding to a post please click the     Reply     button on the post you are responding to rather than merely defaulting to the bottom post.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • GammaPoint
    Posted by GammaPoint
    on Jun 02 2012 21:58 PM
    Prodigy215 points

    Hi Jim:

    What kind of sensors can be attached to the CC2540 Key Fob (part of the CC2540 mini dev kit)? I believe the sensors need to be attached to the TEST pin 6 & 7.  

    From above the sensors can't have I2C interface. So what kind of interface I should look for when searching for sensors?

    Regards,

    Amit

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use