element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Embedded and Microcontrollers
  • Technologies
  • More
Embedded and Microcontrollers
Blog How to Work with MSPM0 Microcontrollers... and Build a Peripheral Expander / Processor Companion!
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Embedded and Microcontrollers to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: shabaz
  • Date Created: 11 Jun 2026 10:35 PM Date Created
  • Views 476 views
  • Likes 14 likes
  • Comments 15 comments
  • MSPM0L1105
  • i2c
  • MSPM0
  • easyL1105
  • texas_instruments
  • texas instruments
  • MiniL1105
  • ti
Related
Recommended

How to Work with MSPM0 Microcontrollers... and Build a Peripheral Expander / Processor Companion!

shabaz
shabaz
11 Jun 2026

The MSPM0 microcontrollers are very low-cost, and friendly to use (lots of documentation and examples).  For a project, I was using an ESP32, but I ran out of UARTs! 

Ordinarily I would have considered purchasing I2C to UART chips, but I'm not entirely sure how necessary the interface will be, and I'd rather not stock up on such specialist parts and then later realize they are surplus to requirements!

Instead, I decided to convert an MSPM0 chip into such a device (it's called a mspm0_i2c_periph_expander on GitHub). And added a few more features while I was at it.

The result is an I2C-controlled part which I can drop into some projects if I need a simple UART, or up to three channels of 12-bit ADC, or when I'm interfacing to PWM or frequency-output sensors, or if I want to measure AC voltage or current. It's simple and fast to program.

image

This isn't an original idea; the Beaglebone People use an MSPM0 on one of their boards, in a similar way (but not with UART). I used the older MSP430 microcontroller series as an I2C peripheral occasionally too.

Here's a five-minute video explaining how to get going with the MSPM0, and a demonstration of the features in the mspm0_i2c_periph_expander.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

Testbed setup

Red = MSPM0 breakout board (miniL1105, documented here)

Green = Pi Pico acting as a (+) E-Z USB to I2C Adapter and UART Bridge - element14 Community

Blue = NXP MCU-Link Debug Probe

Oscilloscope: PicoScope 2000 series with PicoScope 7 software

Waveform Gen: Owon DGE1030 (although the PicoScope has one built-in too)

image

Summary

It's possible to convert an MSPM0 microcontroller into an I2C-controlled peripheral, to add extra features to the main processor in projects. If possible, it's worth considering emulating real devices so that existing drivers can be used, without reinventing the wheel too much. However, in my case, due to time limitations, this wasn't a hard requirement (and I don't plan to use this with Linux device drivers).

A couple of comments; Firstly, please note the code is still quite fresh, it's worth thoroughly testing it for your needs first, if you plan to use it. 

Secondly, the GitHub page doesn't list precise steps on installing the environment to build software for the MSPM0. I figured that is already documented extensively by now, in the many blogs from Jan and myself, as well as the official TI documentation and so on (and I was short on time, hence the short video rather than a full blog). I didn't get time to test the build process on other platforms; I just used Windows 11.

What features would you add? Personally, I'm thinking of adding either tone/alert generation, or, perhaps a text LCD controller; or maybe keep it more general-purpose with say GPIO expander capability like PCF8574, but I don't have a need for any of these yet, so that may be some while.

Thanks for reading / watching!

  • Sign in to reply
  • shabaz
    shabaz 1 day ago

    I've been slowly (it's hot, hard to work!) improving this, there's now a small feature enhancement; for the ADC function, there is now an output pin called SAMP_TRIG_OUT which goes high whenever any of the three ADC inputs are being sampled. 

    image

    It's useful for NTC thermistor measurements (either used directly as shown here, or via a buffer/MOSFET):

    image

    This saves energy, and also reduces thermistor self-heating. Temperature measurements are more accurate as a result. (Github repo updated).

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps 17 days ago in reply to Jan Cumps

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps 17 days ago in reply to shabaz

    The MSPM0 devices have 1 or more OpAmp on silicon. The L1105 has a generic amp, the L1306 has a programmable gain amp.

    For both devices, they can be internally chained to the ADC, and can serve as buffer, or DC offset generator to get the signal mid-range of the ADC...

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz 17 days ago in reply to shabaz

    I've updated the code on GitHub with some improvements.

    Thanks to a nice pointer from Jan Cumps  to check out this (+) 14 bit ADC oversample example for the EasyL1105 MSPM0 board - element14 Community I'm now getting 14-bit resolution.

    The frequency measurement seems to reliably detect 50/60Hz at around 10 mVp-p upward. The AC RMS seems very accurate too; I'm relying on the 3.3V from the testbed, which is generated from the Pi Pico, so it's just an informal test.

    10mVp-p sine wave input (not measured out of the sig-gen, so I don't expect that to be very accurate either):

    image

    50mVp-p sine wave input:

    image

    This will work great with a current transformer ((+) Monitoring Mains Current: Experimenting with the SCT013 Current Clamp - element14 Community). I've already tried that, and it can reliably measure the current from a LED desk-lamp (Sylvania 8W lamp) for instance.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz 20 days ago in reply to shabaz

    I gave it a shot, the results seem OK but I need to verify with some other signals. (I applied a 1 kHz sine wave, 2Vp-p 1.65V offset signal). 

    The algorithm samples at 4ksps, for one second, all the while accumulating the sums of the ADC measurements, and also simultaneously the sum of the square of the ADC measurement. After the acquisition, the offset and RMS are calculated. The frequency measurement is experimental, I'm still working on it.

    To use this function, its best to examine the Python file in the test_harness folder, but in brief the steps are:

    I2C_write(0x20, ACMEAS_START_REG)  # 0x20 is the I2C device address, ACMEAS_START_REG is 0x50
    <wait at least one second>
    I2C_write(0x20, ACMEAS_RESULT_REG)  # 0x51 is the register ACMEAS_RESULT_REG
    I2C_read(0x20, 8)  # read 8 bytes, which are four 16-bit integers (first three are in ADC counts, last is freq in Hz) 

    image

    This is the circuit (red arrow indicates where to apply the signal-to-be-measured):

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube