Skip to content

Embedded Programming with the EFM32PG12 μC

Latest
Compare
Choose a tag to compare
@kaykbot kaykbot released this 01 Aug 22:29
· 2 commits to main since this release
deae5c0

IMPORTANT DISCLAIMER: Please read the please please please read me file before viewing this project's code.

I heavily discourage copying this code for any reasons, particularly if you are using it for a class. Using it for guidance or inspiration for developing your own code is perfectly fine, but using this code as your own is not only unprofessional, but also performs a massive disservice to you and your education.

Working on this project taught very important project and code development skills, practice for programming hardware, and extremely invaluable debugging skills, among other important skills. Struggling through this project, even if you don't complete it for class on time, will absolutely be extremely rewarding.

Again: Copying this code and passing it as your own won't hurt me, but it'd definitely hurt you tons and screw you over, as well as severely violate your school's honor code.

Don't do it.

I am uploading this project after almost losing it to my dying laptop on which I developed this code in for class Fall of 2020 (dreaded mid-COVID semester) for Embedded Programming. This projects makes use of three very neat pieces of hardware:

  1. Silicon (Si-li-CON, not cone) Labs EFM32PG12 Low Energy Microcontroller: this μ-Controller is extremely versatile with a bunch of functionalities. It is capable of wireless functionality through a coin cell battery slot to power it without a wired connection to a laptop or a powered source. For more information, the Datasheet and the Reference Manual to find out all about this neat little device.

  2. Si7021 I2C Temperature and Humidity Sensor: The Si7021 is the onboard Temperature and Humidity Sensor on the EFM32PG12 μC, and is capable of measuring temperature up to 85°C with a max error margin of ±0.4 °C, as well as humidity measurements too ( I did not do that part of the project - maybe in the future). I will direct you to the Reference Manual

  3. HM10 Bluetooth Module: Putting the Reference Manual in front here. The HM10 is a simple Bluetooth device this project uses to output the temperature data gathered from the Si7021 through the EFM32's i2C communication interface. While I programmed the project to communicate with my phone, it can be use to program much much more.

This project makes use of the i2C, Low-Energy UART (LEUART), Low-Energy Timer (LETIMER), GPIO, and CMU peripherals, all of which (or at least, most) you will program yourself. This was all written in SiLab's Simplicity Studios IDE, though the language is in C, so any IDE that supports C will work perfectly fine. The most important part of this project is the general process of setting up the peripherals. Knowing how to do that means you'll

Please use this project within reason. Maybe there are better ways to write this project than I did. Maybe some methods by which I programmed this project is a bit inefficient or too convoluted, and you can see a much simpler way to so the same thing this project does, if not more. Maybe you can implement into your own code something you saw her that you like. This project is here for educational purposes

For additional reading that I'd highly recommend, Making Embedded Systems by Elecia White is the book I used to help develop this. Test Driven Development is a very important programming skill that will greatly help make your coding projects more efficient and easy to debug.

With all that said, thank you for reading, and happy programming!!

P.S. I have no clue this is what goes into the text box of a release. Beginner Github mistakes