<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Electronics on BadproG</title>
    <link>https://www.badprog.com/electronics/</link>
    <description>Recent content in Electronics on BadproG</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Wed, 10 Jun 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://www.badprog.com/electronics/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Electronics - FreeRTOS - Scheduler, task and queue on STM32F3Discovery</title>
      <link>https://www.badprog.com/electronics-freertos-scheduler-task-and-queue-on-stm32f3discovery/</link>
      <pubDate>Wed, 10 Jun 2026 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-freertos-scheduler-task-and-queue-on-stm32f3discovery/</guid>
      <description>&lt;p&gt;When it comes to dividing the time to share tasks, a simple &lt;strong&gt;microcontroller&lt;/strong&gt; sometimes needs a friend.&lt;/p&gt;
&lt;p&gt;This friend is called &lt;strong&gt;FreeRTOS&lt;/strong&gt; and will help our dear &lt;strong&gt;STM32&lt;/strong&gt; to dispatch &lt;strong&gt;tasks&lt;/strong&gt; as if each one was written for the &lt;strong&gt;CPU&lt;/strong&gt; entirely.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s see this.&lt;/p&gt;
&lt;h2 id=&#34;shopping-list&#34;&gt;Shopping list&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The &lt;strong&gt;Github&lt;/strong&gt; for the current tutorial with full files and code:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/badprog/badprog-electronics-freertos-scheduler-task-and-queue-on-stm32f3discovery&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://github.com/badprog/badprog-electronics-freertos-scheduler-task-and-queue-on-stm32f3discovery&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;IDE:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;VSCode&lt;/li&gt;
&lt;li&gt;DevContainer extension&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Board:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;STM32F3Discovery&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LSM303DLHC&lt;/strong&gt; accelerometer (U3, small black chip on the right, above the pins)&lt;/li&gt;
&lt;li&gt;Datasheet: &lt;a href=&#34;https://www.st.com/resource/en/reference_manual/rm0316-stm32f303xbcde-stm32f303x68-stm32f328x8-stm32f358xc-stm32f398xe-advanced-armbased-mcus-stmicroelectronics.pdf&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://www.st.com/resource/en/reference_manual/rm0316-stm32f303xbcde-stm32f303x68-stm32f328x8-stm32f358xc-stm32f398xe-advanced-armbased-mcus-stmicroelectronics.pdf&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Logic Analyzer for &lt;strong&gt;I2C&lt;/strong&gt; and &lt;strong&gt;UART&lt;/strong&gt; bus communication&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - FreeRTOS - Semaphore and mutex on STM32F3Discovery with I2C and UART</title>
      <link>https://www.badprog.com/electronics-freertos-semaphore-and-mutex-on-stm32f3discovery-with-i2c-and-uart/</link>
      <pubDate>Wed, 10 Jun 2026 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-freertos-semaphore-and-mutex-on-stm32f3discovery-with-i2c-and-uart/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Tasks&lt;/strong&gt; are great, &lt;strong&gt;queues&lt;/strong&gt; as well.&lt;/p&gt;
&lt;p&gt;But as soon as several &lt;strong&gt;tasks&lt;/strong&gt; want to use the same &lt;strong&gt;resource&lt;/strong&gt; at the same time, things get messy fast.&lt;/p&gt;
&lt;p&gt;This tutorial introduces 2 synchronisation mechanisms that keep everything in order: The &lt;strong&gt;mutex&lt;/strong&gt; and the &lt;strong&gt;binary semaphore&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s get started.&lt;/p&gt;
&lt;h2 id=&#34;shopping-list&#34;&gt;Shopping list&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The &lt;strong&gt;Github&lt;/strong&gt; for the current tutorial with full files and code:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/badprog/badprog-electronics-freertos-semaphore-and-mutex-on-stm32f3discovery-with-i2c-and-uart&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://github.com/badprog/badprog-electronics-freertos-semaphore-and-mutex-on-stm32f3discovery-with-i2c-and-uart&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;IDE:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;VSCode&lt;/li&gt;
&lt;li&gt;DevContainer extension&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Board:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;STM32F3Discovery&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LSM303DLHC&lt;/strong&gt; accelerometer  (U3, small black chip on the right, above the pins)&lt;/li&gt;
&lt;li&gt;Datasheet: &lt;a href=&#34;https://www.st.com/resource/en/reference_manual/rm0316-stm32f303xbcde-stm32f303x68-stm32f328x8-stm32f358xc-stm32f398xe-advanced-armbased-mcus-stmicroelectronics.pdf&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://www.st.com/resource/en/reference_manual/rm0316-stm32f303xbcde-stm32f303x68-stm32f328x8-stm32f358xc-stm32f398xe-advanced-armbased-mcus-stmicroelectronics.pdf&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Logic Analyzer for &lt;strong&gt;I2C&lt;/strong&gt; and &lt;strong&gt;UART&lt;/strong&gt; bus communication&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - FreeRTOS - SPI, I2C, UART with stack watermark and IWDG watchdog on STM32F3Discovery</title>
      <link>https://www.badprog.com/electronics-freertos-spi-i2c-uart-with-stack-watermark-and-iwdg-watchdog-on-stm32f3discovery/</link>
      <pubDate>Wed, 10 Jun 2026 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-freertos-spi-i2c-uart-with-stack-watermark-and-iwdg-watchdog-on-stm32f3discovery/</guid>
      <description>&lt;p&gt;Two &lt;strong&gt;sensors&lt;/strong&gt;, two &lt;strong&gt;buses&lt;/strong&gt;, six &lt;strong&gt;tasks&lt;/strong&gt;, one &lt;strong&gt;watchdog&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This tutorial makes a firmware production-ready: Strict periodic scheduling, stack size validation, and hardware-level crash recovery.&lt;/p&gt;
&lt;p&gt;Ready? Let&amp;rsquo;s go.&lt;/p&gt;
&lt;h2 id=&#34;shopping-list&#34;&gt;Shopping list&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The &lt;strong&gt;Github&lt;/strong&gt; for the current tutorial with full files and code:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/badprog/badprog-electronics-freertos-spi-i2c-uart-with-stack-watermark-and-iwdg-watchdog-on-stm32f3discovery&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://github.com/badprog/badprog-electronics-freertos-spi-i2c-uart-with-stack-watermark-and-iwdg-watchdog-on-stm32f3discovery&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;IDE:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;VSCode&lt;/li&gt;
&lt;li&gt;DevContainer extension&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Board:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;STM32F3Discovery&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LSM303DLHC&lt;/strong&gt; accelerometer (U3, small black chip on the right, above the pins)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;L3GD20&lt;/strong&gt; 3-axis MEMS &lt;strong&gt;gyroscope&lt;/strong&gt; (U5, small chip near center)&lt;/li&gt;
&lt;li&gt;Datasheet: &lt;a href=&#34;https://www.st.com/resource/en/reference_manual/rm0316-stm32f303xbcde-stm32f303x68-stm32f328x8-stm32f358xc-stm32f398xe-advanced-armbased-mcus-stmicroelectronics.pdf&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://www.st.com/resource/en/reference_manual/rm0316-stm32f303xbcde-stm32f303x68-stm32f328x8-stm32f358xc-stm32f398xe-advanced-armbased-mcus-stmicroelectronics.pdf&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Logic Analyzer for &lt;strong&gt;I2C&lt;/strong&gt;, &lt;strong&gt;SPI&lt;/strong&gt; and &lt;strong&gt;UART&lt;/strong&gt; bus communication&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - FreeRTOS - Timer, task notification and event group on STM32F3Discovery with I2C and UART</title>
      <link>https://www.badprog.com/electronics-freertos-timer-task-notification-and-event-group-on-stm32f3discovery-with-i2c-and-uart/</link>
      <pubDate>Wed, 10 Jun 2026 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-freertos-timer-task-notification-and-event-group-on-stm32f3discovery-with-i2c-and-uart/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Mutexes&lt;/strong&gt; protect, &lt;strong&gt;semaphores&lt;/strong&gt; signal.&lt;/p&gt;
&lt;p&gt;But in some situations you need a bit more: A callback that fires on its own schedule, a direct line between an &lt;strong&gt;ISR&lt;/strong&gt; and a &lt;strong&gt;task&lt;/strong&gt;, and a way to say &amp;ldquo;do not start until everything is ready.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;This tutorial introduces 3 FreeRTOS mechanisms that round out the toolkit: &lt;strong&gt;software timers,&lt;/strong&gt; &lt;strong&gt;task notifications&lt;/strong&gt;, and &lt;strong&gt;event groups&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s get started.&lt;/p&gt;
&lt;h2 id=&#34;shopping-list&#34;&gt;Shopping list&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The &lt;strong&gt;Github&lt;/strong&gt; for the current tutorial with full files and code:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - STM32 - I2C communication between STM32F3Discovery and LSM303DLHC accelerometer</title>
      <link>https://www.badprog.com/electronics-stm32-i2c-communication-between-stm32f3discovery-and-lsm303dlhc-accelerometer/</link>
      <pubDate>Tue, 09 Jun 2026 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-stm32-i2c-communication-between-stm32f3discovery-and-lsm303dlhc-accelerometer/</guid>
      <description>&lt;p&gt;Every smartphone is nowadays provided with an accelerometer.&lt;/p&gt;
&lt;p&gt;In this tutorial we are going to see how to retrieve X, Y and Z values from the &lt;strong&gt;LSM303DLHC&lt;/strong&gt; accelerometer on the &lt;strong&gt;STM32F3Discovery&lt;/strong&gt; board.&lt;/p&gt;
&lt;p&gt;And to achieve this goal we&amp;rsquo;ll use &lt;strong&gt;I2C&lt;/strong&gt; bus communication.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s get started.&lt;/p&gt;
&lt;h2 id=&#34;shopping-list&#34;&gt;Shopping list&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;Github&lt;/strong&gt; for the current tutorial with full files and code:
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/badprog/badprog-electronics-stm32-i2c-communication-between-stm32f3discovery-and-lsm303dlhc-accelerometer&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://github.com/badprog/badprog-electronics-stm32-i2c-communication-between-stm32f3discovery-and-lsm303dlhc-accelerometer&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;IDE:
&lt;ul&gt;
&lt;li&gt;VSCode&lt;/li&gt;
&lt;li&gt;DevContainer extension&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Board:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;STM32F3Discovery&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LSM303DLHC&lt;/strong&gt; &lt;strong&gt;accelerometer&lt;/strong&gt; (U3, small black chip on the right, above the pins)&lt;/li&gt;
&lt;li&gt;Datasheet:
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.st.com/resource/en/reference_manual/rm0316-stm32f303xbcde-stm32f303x68-stm32f328x8-stm32f358xc-stm32f398xe-advanced-armbased-mcus-stmicroelectronics.pdf&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://www.st.com/resource/en/reference_manual/rm0316-stm32f303xbcde-stm32f303x68-stm32f328x8-stm32f358xc-stm32f398xe-advanced-armbased-mcus-stmicroelectronics.pdf&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Logic Analyzer for I2C communication&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;first-things-first&#34;&gt;First things first&lt;/h2&gt;
&lt;p&gt;The &lt;strong&gt;LSM303DLHC&lt;/strong&gt; accelerometer sits on &lt;strong&gt;I2C1&lt;/strong&gt; register at address &lt;strong&gt;0x19&lt;/strong&gt;, connected to &lt;strong&gt;PB6&lt;/strong&gt; (&lt;strong&gt;SCL&lt;/strong&gt;) and &lt;strong&gt;PB7&lt;/strong&gt; (&lt;strong&gt;SDA&lt;/strong&gt;).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - STM32 - Reading gyroscope data with SPI on STM32F3Discovery</title>
      <link>https://www.badprog.com/electronics-stm32-reading-gyroscope-data-with-spi-on-stm32f3discovery/</link>
      <pubDate>Fri, 05 Jun 2026 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-stm32-reading-gyroscope-data-with-spi-on-stm32f3discovery/</guid>
      <description>&lt;p&gt;So far we have blinked &lt;strong&gt;LEDs&lt;/strong&gt;, rotated them with a &lt;strong&gt;timer&lt;/strong&gt;, caught a button &lt;strong&gt;interrupt&lt;/strong&gt;, and sent text over &lt;strong&gt;UART&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Time to talk to an external chip.&lt;/p&gt;
&lt;p&gt;In this tutorial we are going to read angular velocity on X, Y, Z axes from the &lt;strong&gt;L3GD20 gyroscope&lt;/strong&gt; soldered on the &lt;strong&gt;STM32F3Discovery&lt;/strong&gt; board.&lt;/p&gt;
&lt;p&gt;We&amp;rsquo;ll use the &lt;strong&gt;SPI1&lt;/strong&gt; peripheral in bare metal C in order to decode a live transaction on a &lt;strong&gt;logic analyzer&lt;/strong&gt; but also directly from the &lt;strong&gt;OpenOCD&lt;/strong&gt; console.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - STM32 - UART printf debugging with FTDI on STM32F3Discovery</title>
      <link>https://www.badprog.com/electronics-stm32-uart-printf-debugging-with-ftdi-on-stm32f3discovery/</link>
      <pubDate>Thu, 04 Jun 2026 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-stm32-uart-printf-debugging-with-ftdi-on-stm32f3discovery/</guid>
      <description>&lt;p&gt;At some point, blinking LEDs are not enough to understand what your code is actually doing.&lt;/p&gt;
&lt;p&gt;You need to print things.&lt;/p&gt;
&lt;p&gt;This tutorial shows how to redirect &lt;strong&gt;printf()&lt;/strong&gt; to a serial port on the &lt;strong&gt;STM32F3Discovery&lt;/strong&gt; with a &lt;strong&gt;FTDI TTL&lt;/strong&gt; adapter.&lt;/p&gt;
&lt;h2 id=&#34;shopping-list&#34;&gt;Shopping list&lt;/h2&gt;
&lt;p&gt;The Github for the current tutorial with full files and code:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/badprog/badprog-electronics-stm32-uart-printf-debugging-with-ftdi-on-stm32f3discovery&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://github.com/badprog/badprog-electronics-stm32-uart-printf-debugging-with-ftdi-on-stm32f3discovery&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;IDE:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;VSCode&lt;/li&gt;
&lt;li&gt;DevContainer extension&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Board:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;STM32F3Discovery&lt;/li&gt;
&lt;li&gt;Datasheet: &lt;a href=&#34;https://www.st.com/resource/en/reference_manual/rm0316-stm32f303xbcde-stm32f303x68-stm32f328x8-stm32f358xc-stm32f398xe-advanced-armbased-mcus-stmicroelectronics.pdf&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://www.st.com/resource/en/reference_manual/rm0316-stm32f303xbcde-stm32f303x68-stm32f328x8-stm32f358xc-stm32f398xe-advanced-armbased-mcus-stmicroelectronics.pdf&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Hardware for serial communication:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;FTDI TTL-232R-3V3&lt;/strong&gt; adapter (USB to TTL serial, 3.3V)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;why-use-an-ftdi-cable&#34;&gt;Why use an FTDI cable?&lt;/h2&gt;
&lt;p&gt;There are 3 ways to get &lt;strong&gt;serial&lt;/strong&gt; output from the &lt;strong&gt;STM32F3Discovery&lt;/strong&gt;:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - STM32 - STM32F3Discovery LED ring rotation with TIM2 and NVIC</title>
      <link>https://www.badprog.com/electronics-stm32-stm32f3discovery-led-ring-rotation-with-tim2-and-nvic/</link>
      <pubDate>Wed, 03 Jun 2026 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-stm32-stm32f3discovery-led-ring-rotation-with-tim2-and-nvic/</guid>
      <description>&lt;p&gt;Our Christmas tree is almost ready.&lt;/p&gt;
&lt;p&gt;In our previous tutorial we saw how to blink all LEDs at the same time.&lt;/p&gt;
&lt;p&gt;The lights are blinking but Santa thinks it&amp;rsquo;s too static.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s make them rotate.&lt;/p&gt;
&lt;h2 id=&#34;shopping-list&#34;&gt;Shopping list&lt;/h2&gt;
&lt;p&gt;The previous &lt;strong&gt;tutorial&lt;/strong&gt; for this series:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.badprog.com/electronics-stm32-blinking-all-f3discovery-leds-at-the-same-time&#34;&gt;electronics-stm32-blinking-all-f3discovery-leds-at-the-same-time&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;strong&gt;Github&lt;/strong&gt; for the current tutorial with full files and code:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/badprog/badprog-electronics-stm32-stm32f3discovery-led-ring-rotation-with-tim2-and-nvic&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://github.com/badprog/badprog-electronics-stm32-stm32f3discovery-led-ring-rotation-with-tim2-and-nvic&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;IDE&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;VSCode&lt;/li&gt;
&lt;li&gt;DevContainer extension&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Board&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;STM32F3Discovery&lt;/li&gt;
&lt;li&gt;Datasheet: &lt;a href=&#34;https://www.st.com/resource/en/reference_manual/rm0316-stm32f303xbcde-stm32f303x68-stm32f328x8-stm32f358xc-stm32f398xe-advanced-armbased-mcus-stmicroelectronics.pdf&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://www.st.com/resource/en/reference_manual/rm0316-stm32f303xbcde-stm32f303x68-stm32f328x8-stm32f358xc-stm32f398xe-advanced-armbased-mcus-stmicroelectronics.pdf&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;whats-new-compared-to-the-previous-tutorial&#34;&gt;What&amp;rsquo;s new compared to the previous tutorial&lt;/h2&gt;
&lt;p&gt;In the previous tutorial we used a software delay &lt;strong&gt;delay_ms()&lt;/strong&gt; to blink all 8 LEDs together.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - STM32 - User button as EXTI with the STM32F3Discovery board</title>
      <link>https://www.badprog.com/electronics-stm32-user-button-as-exti-with-the-stm32f3discovery-board/</link>
      <pubDate>Wed, 03 Jun 2026 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-stm32-user-button-as-exti-with-the-stm32f3discovery-board/</guid>
      <description>&lt;p&gt;Santa is impressed by the rotating LEDs but now he wants to control them.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s add a push button with the &lt;strong&gt;EXTI&lt;/strong&gt; (External Interrupt).&lt;/p&gt;
&lt;h2 id=&#34;shopping-list&#34;&gt;Shopping list&lt;/h2&gt;
&lt;p&gt;The previous tutorials for this series:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.badprog.com/electronics-stm32-blinking-all-f3discovery-leds-at-the-same-time&#34;&gt;electronics-stm32-blinking-all-f3discovery-leds-at-the-same-time&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.badprog.com/electronics-stm32-stm32f3discovery-led-ring-rotation-with-tim2-and-nvic&#34;&gt;electronics-stm32-stm32f3discovery-led-ring-rotation-with-tim2-and-nvic&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The Github for the current tutorial with full files and code:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/badprog/badprog-electronics-stm32-user-button-as-exti-with-the-stm32f3discovery-board&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://github.com/badprog/badprog-electronics-stm32-user-button-as-exti-with-the-stm32f3discovery-board&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;IDE:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;VSCode&lt;/li&gt;
&lt;li&gt;DevContainer extension&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Board:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;STM32F3Discovery&lt;/li&gt;
&lt;li&gt;Datasheet: &lt;a href=&#34;https://www.st.com/resource/en/reference_manual/rm0316-stm32f303xbcde-stm32f303x68-stm32f328x8-stm32f358xc-stm32f398xe-advanced-armbased-mcus-stmicroelectronics.pdf&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://www.st.com/resource/en/reference_manual/rm0316-stm32f303xbcde-stm32f303x68-stm32f328x8-stm32f358xc-stm32f398xe-advanced-armbased-mcus-stmicroelectronics.pdf&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;what-this-tutorial-does&#34;&gt;What this tutorial does&lt;/h2&gt;
&lt;p&gt;Pressing the blue user button &lt;strong&gt;PA0&lt;/strong&gt; on the &lt;strong&gt;STM32F3Discovery&lt;/strong&gt; toggles between two LED modes:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - STM32 - Blinking all F3Discovery LEDs at the same time</title>
      <link>https://www.badprog.com/electronics-stm32-blinking-all-f3discovery-leds-at-the-same-time/</link>
      <pubDate>Tue, 02 Jun 2026 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-stm32-blinking-all-f3discovery-leds-at-the-same-time/</guid>
      <description>&lt;p&gt;Christmas is near (only 6 months), so we have to prepare our xmas tree.&lt;/p&gt;
&lt;p&gt;What a better option than using our dear &lt;strong&gt;STM32F3Discovery&lt;/strong&gt; board as a Christmas lights?&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s see this in this tutorial.&lt;/p&gt;
&lt;p&gt;(And yes, Santa Claus is watching you, so be kind.)&lt;/p&gt;
&lt;h2 id=&#34;shopping-list&#34;&gt;Shopping list&lt;/h2&gt;
&lt;p&gt;The &lt;strong&gt;Github&lt;/strong&gt; for this tutorial with full files and code:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/badprog/badprog-electronics-stm32-blinking-all-f3discovery-leds-at-the-same-time&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://github.com/badprog/badprog-electronics-stm32-blinking-all-f3discovery-leds-at-the-same-time&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;IDE:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;VSCode&lt;/li&gt;
&lt;li&gt;DevContainer extension&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Board:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;STM32F3Discovery&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;first-of-all&#34;&gt;First of all&lt;/h2&gt;
&lt;p&gt;With Ubuntu 24.04 trying to install &lt;strong&gt;gcc-arm-none-eabi&lt;/strong&gt; compiler doesn&amp;rsquo;t work as expected.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - STM32 - Setting up PlatformIO in ROS2 DevContainers</title>
      <link>https://www.badprog.com/electronics-stm32-setting-up-platformio-in-ros2-devcontainers/</link>
      <pubDate>Mon, 09 Mar 2026 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-stm32-setting-up-platformio-in-ros2-devcontainers/</guid>
      <description>&lt;p&gt;This guide provides a step-by-step workflow to bridge physical &lt;strong&gt;STM32&lt;/strong&gt; hardware into a virtualized &lt;strong&gt;ROS2&lt;/strong&gt; &lt;strong&gt;DevContainer&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;It leverages &lt;strong&gt;PlatformIO&lt;/strong&gt; and &lt;strong&gt;usbipd&lt;/strong&gt; to enable firmware flashing from a &lt;strong&gt;Docker&lt;/strong&gt; environment.&lt;/p&gt;
&lt;h2 id=&#34;first-of-all&#34;&gt;First of all&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Github&lt;/strong&gt; project for this tutorial:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/badprog/badprog-electronics-stm32-setting-up-platformio-in-ros2-devcontainers&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://github.com/badprog/badprog-electronics-stm32-setting-up-platformio-in-ros2-devcontainers&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Shopping list:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;An electronic board like the &lt;strong&gt;STM32F3Discovery&lt;/strong&gt; board (STM32F303VCT6 microcontroller)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Windows 10&lt;/strong&gt; or &lt;strong&gt;11&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;WSL 2&lt;/strong&gt; (Windows Subsytem for Linux)
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Ubuntu 24.04&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;usbipd-win:&lt;/strong&gt;&lt;a href=&#34;https://github.com/dorssel/usbipd-win/releases&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://github.com/dorssel/usbipd-win/releases&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;Dockerfile&lt;/strong&gt; with&lt;strong&gt;ROS 2&lt;/strong&gt; image (osrf/ros:jazzy-desktop)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;VSCode&lt;/strong&gt; with extensions:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Dev Containers&lt;/strong&gt; (ms-vscode-remote.remote-containers)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Robot Developer Extensions for ROS 2&lt;/strong&gt; (Ranch-Hand-Robotics.rde-ros-2)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PlatformIO IDE&lt;/strong&gt; (platformio.platformio-ide)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;wsl-windows-subsystem-for-linux&#34;&gt;WSL: Windows Subsystem for Linux&lt;/h2&gt;
&lt;p&gt;In order to get &lt;strong&gt;WSL&lt;/strong&gt;, simply open a &lt;strong&gt;PowerShell&lt;/strong&gt; terminal in &lt;strong&gt;Admin&lt;/strong&gt; mode:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - STM32 - GPIO overview with the STM32F3-Discovery board</title>
      <link>https://www.badprog.com/electronics-stm32-gpio-overview-with-the-stm32f3-discovery-board/</link>
      <pubDate>Mon, 11 Apr 2016 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-stm32-gpio-overview-with-the-stm32f3-discovery-board/</guid>
      <description>&lt;p&gt;GPIO is one of the most easy peripheral to understand in a microcontroller.&lt;/p&gt;
&lt;p&gt;But of course it demands a bit of practice to handle it with ease.&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s the purpose of this STM32F303-Discovery board tutorial.&lt;/p&gt;
&lt;p&gt;We are going to blink 4 LEDS in order to get how the basics work.&lt;/p&gt;
&lt;h2 id=&#34;github&#34;&gt;GitHub&lt;/h2&gt;
&lt;p&gt;Retrieve this example with full code on my GitHub:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/badprog/badprog-stm32f303vct6-blinking-led&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://github.com/badprog/badprog-stm32f303vct6-blinking-led&lt;/a&gt;
&lt;/p&gt;
&lt;h2 id=&#34;registers&#34;&gt;Registers&lt;/h2&gt;
&lt;p&gt;In the STM32F303VCT6, there are of course some GPIOs.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - STM32 - Using the push button to switch on the LED6 on the STM32F3-Discovery board</title>
      <link>https://www.badprog.com/electronics-stm32-using-the-push-button-to-switch-on-the-led6-on-the-stm32f3-discovery-board/</link>
      <pubDate>Thu, 24 Mar 2016 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-stm32-using-the-push-button-to-switch-on-the-led6-on-the-stm32f3-discovery-board/</guid>
      <description>&lt;p&gt;This tutorial may be seen as a HelloWorld project.&lt;/p&gt;
&lt;p&gt;Indeed we are going to switch on the LED6 of the STM32F3-Discovery board with the push button.&lt;/p&gt;
&lt;p&gt;The code has been reduced to its minimum in order to get the most important elements in this example.&lt;/p&gt;
&lt;h2 id=&#34;first-of-all&#34;&gt;First of all&lt;/h2&gt;
&lt;p&gt;You can find the whole project on my GitHub:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/badprog/badprog-stm32f303vct6-pushbutton-led&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://github.com/badprog/badprog-stm32f303vct6-pushbutton-led&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The project has been made with Atollic TrueStudio, but the code in the main.c file is the same, if you use another IDE such as Keil uVision, IAR EW and so on.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - Atollic - Code completion and content assist</title>
      <link>https://www.badprog.com/electronics-atollic-code-completion-and-content-assist/</link>
      <pubDate>Tue, 22 Mar 2016 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-atollic-code-completion-and-content-assist/</guid>
      <description>&lt;p&gt;As Atollic is based on the Eclipse IDE, this tutorial is so also available for Eclipse.&lt;/p&gt;
&lt;p&gt;We are going to see how to add the completion to the Atollic TrueStudio IDE.&lt;/p&gt;
&lt;p&gt;Of course, this turorial admits that you have a project where the code completion is missing because you don&amp;rsquo;t have the correct libraries.&lt;/p&gt;
&lt;p&gt;If you have set correctly your project, and still have a completion problem, then I suggest to &lt;strong&gt;close and reopen it&lt;/strong&gt;, it could solve this issue.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - MSP430 - Using timer and interruption to generate a delay of 1 second</title>
      <link>https://www.badprog.com/electronics-msp430-using-timer-and-interruption-to-generate-a-delay-of-1-second/</link>
      <pubDate>Mon, 04 Jan 2016 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-msp430-using-timer-and-interruption-to-generate-a-delay-of-1-second/</guid>
      <description>&lt;p&gt;The first two features to understand in a microcontroller are timers and interruptions.&lt;/p&gt;
&lt;p&gt;Indeed, without a timer nor interruptions, it&amp;rsquo;s quite impossible to have an accurate timing in a program.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s see that in this tutorial and let&amp;rsquo;s generate a &lt;strong&gt;timing of 1 second&lt;/strong&gt; with the &lt;strong&gt;G2553&lt;/strong&gt; microcontroller.&lt;/p&gt;
&lt;h2 id=&#34;first-of-all&#34;&gt;First of all&lt;/h2&gt;
&lt;p&gt;The essential documents needed for any project with a &lt;strong&gt;MSP430&lt;/strong&gt; microcontroller are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;datasheet &amp;ndash;&amp;gt; &lt;a href=&#34;https://www.ti.com/lit/ds/symlink/msp430g2553.pdf&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;http://www.ti.com/lit/ds/symlink/msp430g2553.pdf&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;user guide &amp;ndash;&amp;gt; &lt;a href=&#34;https://www.ti.com/lit/ug/slau144j/slau144j.pdf&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;http://www.ti.com/lit/ug/slau144j/slau144j.pdf&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The main goal of  a timer is to generate a counter and check if a particular number in this counter has been reached.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - STM32 - Setting up the Nucleo board with IAR</title>
      <link>https://www.badprog.com/electronics-stm32-setting-up-the-nucleo-board-with-iar/</link>
      <pubDate>Sat, 15 Nov 2014 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-stm32-setting-up-the-nucleo-board-with-iar/</guid>
      <description>&lt;p&gt;The Nucleo wants to be a concurrent of Arduino. You had probably tested the &lt;a href=&#34;https://developer.mbed.org/handbook/mbed-Compiler&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;mbed.org&lt;/a&gt;
 compiler. But you would like to program a firmware without any online IDE (that comes with some advantages and drawbacks).&lt;/p&gt;
&lt;p&gt;In this tutorial, we&amp;rsquo;ll use the IAR Embedded Workbench for ARM, well known as EWARM, in order to program the STM32 microcontroller (in our case the STM32-&lt;strong&gt;L053R8&lt;/strong&gt;).&lt;/p&gt;
&lt;p&gt;So let&amp;rsquo;s get started.&lt;/p&gt;
&lt;h2 id=&#34;iar-installation&#34;&gt;IAR installation&lt;/h2&gt;
&lt;h3 id=&#34;ide&#34;&gt;IDE&lt;/h3&gt;
&lt;p&gt;First of all we need to download the new IAR ARM version (7.30.1) because older versions are missing some functionalities to use projects provided by STMicroelectronics.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - Verilog -  Turning off 7-segment displays</title>
      <link>https://www.badprog.com/electronics-verilog-turning-off-7-segment-displays/</link>
      <pubDate>Tue, 22 Apr 2014 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-verilog-turning-off-7-segment-displays/</guid>
      <description>&lt;p&gt;A quick code to turn off every single segment onto a FPGA board.&lt;/p&gt;
&lt;p&gt;For this tutorial we use the Altera DE1 board.&lt;/p&gt;
&lt;p&gt;So if you have another one, just replace HEX0, HEX1, HEX2, HEX3 by your assignment.&lt;/p&gt;
&lt;h2 id=&#34;explanation&#34;&gt;Explanation&lt;/h2&gt;
&lt;p&gt;Each number is a pin onto the board.&lt;br&gt;
As there are 4 * 7 segments = 28 segments to light, so 28 pins.&lt;/p&gt;
&lt;p&gt;So, to turn off all segments of a display, it&amp;rsquo;s necessary to use 7&amp;rsquo;b1111111 as value.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - Verilog - Blinking a LED with GPIOs</title>
      <link>https://www.badprog.com/electronics-verilog-blinking-a-led-with-gpios/</link>
      <pubDate>Sat, 19 Apr 2014 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-verilog-blinking-a-led-with-gpios/</guid>
      <description>&lt;p&gt;As you certainly liked this &lt;a href=&#34;https://www.badprog.com/electronics-verilog-blinking-a-led&#34;&gt;Altera DE1 tutorial for blinking a LED on the board&lt;/a&gt;
, you will love this one by doing the same easy thing but with &lt;strong&gt;GPIOs&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m sure you are really excited about that. So let&amp;rsquo;s go.&lt;/p&gt;
&lt;h2 id=&#34;explanation&#34;&gt;Explanation&lt;/h2&gt;
&lt;p&gt;On the DE1 board, there are many GPIOs.&lt;/p&gt;
&lt;p&gt;What is a GPIO? &amp;ndash;&amp;gt; GPIO stands for General Purpose Input Output.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s a group of pins that you can set to &lt;strong&gt;input&lt;/strong&gt; or &lt;strong&gt;output&lt;/strong&gt; individually.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - Quartus II - Creating your first SoPC with Qsys and Nios II software</title>
      <link>https://www.badprog.com/electronics-quartus-ii-creating-your-first-sopc-with-qsys-and-nios-ii-software/</link>
      <pubDate>Sun, 06 Apr 2014 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-quartus-ii-creating-your-first-sopc-with-qsys-and-nios-ii-software/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Qsys&lt;/strong&gt; is the new &lt;strong&gt;Altera SOPC Builder&lt;/strong&gt; tool. So if you are using &lt;strong&gt;Quartus 13.0.x,&lt;/strong&gt; you should have it.&lt;/p&gt;
&lt;p&gt;Then, don&amp;rsquo;t be surprised not having, for example, the simple SOPC Builder tool in your Quartus version.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s just normal because Qsys is the new name of the SOPC Builder and its improvement.&lt;/p&gt;
&lt;p&gt;That said, let&amp;rsquo;s get started with this tutorial and let&amp;rsquo;s create your first &lt;strong&gt;System on Programmable Chip (SoPC)&lt;/strong&gt; or &lt;strong&gt;System on Chip (SoC)&lt;/strong&gt; with Qsys.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - Verilog - Instantiating a module from another module</title>
      <link>https://www.badprog.com/electronics-verilog-instantiating-a-module-from-another-module/</link>
      <pubDate>Sat, 29 Mar 2014 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-verilog-instantiating-a-module-from-another-module/</guid>
      <description>&lt;p&gt;You understood the &lt;a href=&#34;https://www.badprog.com/electronics-verilog-structural-description&#34;&gt;structural description in Verilog&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;You are currently using the Altera DE1 board.&lt;/p&gt;
&lt;p&gt;Fine.&lt;/p&gt;
&lt;p&gt;But you want more because you really want to understand how it works through a real example with your board.&lt;/p&gt;
&lt;p&gt;And not a difficult one of course, a beginner tutorial with an easy example of instantiating a module from another module.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s get started.&lt;/p&gt;
&lt;h2 id=&#34;explanation&#34;&gt;Explanation&lt;/h2&gt;
&lt;p&gt;We are going to create two files: an &lt;strong&gt;abstract&lt;/strong&gt; and an &lt;strong&gt;object&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - Verilog - Structural description</title>
      <link>https://www.badprog.com/electronics-verilog-structural-description/</link>
      <pubDate>Wed, 19 Mar 2014 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-verilog-structural-description/</guid>
      <description>&lt;p&gt;In classic software programming there are a way to split whole code into several parts.&lt;/p&gt;
&lt;p&gt;In Verilog there is also a technic to do the same. One calls that &lt;strong&gt;structural description&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s like in C language, to talk outside the main function, it&amp;rsquo;s necessary to have functions.&lt;/p&gt;
&lt;p&gt;But the difference in this case is that parameters (&lt;strong&gt;ports&lt;/strong&gt;) don&amp;rsquo;t have to be called in the same order as the &lt;strong&gt;module&lt;/strong&gt; requires.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - Quartus II - Using command-line interface (CLI)</title>
      <link>https://www.badprog.com/electronics-quartus-ii-using-command-line-interface-cli/</link>
      <pubDate>Tue, 04 Mar 2014 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-quartus-ii-using-command-line-interface-cli/</guid>
      <description>&lt;p&gt;After &lt;a href=&#34;https://www.badprog.com/electronics-quartus-ii-setting-up-command-line-interface-cli&#34;&gt;installing Quartus II command-line interface for Windows&lt;/a&gt;
 you&amp;rsquo;re ready to play with it.&lt;/p&gt;
&lt;p&gt;The board used in this tutorial is the &lt;strong&gt;DE1&lt;/strong&gt; (EP2C20F484C7) with a Cycl0ne II FPGA.&lt;/p&gt;
&lt;p&gt;The langage will be Verilog.&lt;/p&gt;
&lt;p&gt;First of all&lt;/p&gt;
&lt;p&gt;We&amp;rsquo;re going to create a project from Quartus GUI, write a file in Verilog and just after use the command-line interface (CLI) to make all stuff necessary to have a functional project.&lt;/p&gt;
&lt;h2 id=&#34;creating-a-project&#34;&gt;Creating a project&lt;/h2&gt;
&lt;p&gt;From Quartus &amp;gt; File New Project Wizard:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - Quartus II - Setting up command-line interface (CLI)</title>
      <link>https://www.badprog.com/electronics-quartus-ii-setting-up-command-line-interface-cli/</link>
      <pubDate>Sun, 02 Mar 2014 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-quartus-ii-setting-up-command-line-interface-cli/</guid>
      <description>&lt;p&gt;As I&amp;rsquo;ve noticed some bugs with the &lt;strong&gt;Linux&lt;/strong&gt; version, I&amp;rsquo;ve decided to start using &lt;strong&gt;Altera Quartus II&lt;/strong&gt; for &lt;strong&gt;Windows&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Some examples of bugs: the Altera Simulator doesn&amp;rsquo;t start when you try to launch it or when you want to set the clock with ModelSim, some windows are not well designed and you can&amp;rsquo;t see anything.&lt;/p&gt;
&lt;p&gt;Well, Linux is cool but Windows can be also a good alternative.&lt;/p&gt;
&lt;p&gt;The Quartus II version is the &lt;strong&gt;13.0.sp1&lt;/strong&gt; or simply &lt;strong&gt;13.0.1&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - Quartus II - Using ModelSim-Altera Starter Edition</title>
      <link>https://www.badprog.com/electronics-quartus-ii-using-modelsim-altera-starter-edition/</link>
      <pubDate>Thu, 27 Feb 2014 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-quartus-ii-using-modelsim-altera-starter-edition/</guid>
      <description>&lt;p&gt;After &lt;a href=&#34;https://www.badprog.com/electronics-quartus-ii-installing-modelsim-altera-starter-edition&#34;&gt;installing&lt;/a&gt;
 and having an &lt;a href=&#34;https://www.badprog.com/electronics-quartus-ii-introduction-to-modelsim-altera-starter-edition&#34;&gt;introduction&lt;/a&gt;
 to the ModelSim-Altera Starter Edition, it&amp;rsquo;s time to see a really easy example by coding some lines.&lt;/p&gt;
&lt;p&gt;This code will be a simple counter with an enable input.&lt;/p&gt;
&lt;h2 id=&#34;code&#34;&gt;Code&lt;/h2&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-verilog&#34; data-lang=&#34;verilog&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;// easy counter to test ModelSim
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;module&lt;/span&gt; hello_model_sim (enable, clock, counter);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#75715e&#34;&gt;// declaration
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;input&lt;/span&gt; enable;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;input&lt;/span&gt; clock;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;output&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;reg&lt;/span&gt; [&lt;span style=&#34;color:#ae81ff&#34;&gt;7&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;] counter;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#75715e&#34;&gt;// always
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;always&lt;/span&gt; @(&lt;span style=&#34;color:#66d9ef&#34;&gt;posedge&lt;/span&gt; clock) &lt;span style=&#34;color:#66d9ef&#34;&gt;begin&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; (enable) &lt;span style=&#34;color:#66d9ef&#34;&gt;begin&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            counter &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; counter &lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;&amp;#39;b1&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#66d9ef&#34;&gt;end&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#66d9ef&#34;&gt;else&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;begin&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            counter &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#66d9ef&#34;&gt;end&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;end&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;endmodule&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;modelsim-wave&#34;&gt;ModelSim wave&lt;/h2&gt;
&lt;p&gt;Let&amp;rsquo;s see how this code will generate a waveform.&lt;br&gt;
First of all, let&amp;rsquo;s start a general compilation:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - Quartus II - Introduction to ModelSim-Altera Starter Edition</title>
      <link>https://www.badprog.com/electronics-quartus-ii-introduction-to-modelsim-altera-starter-edition/</link>
      <pubDate>Sun, 23 Feb 2014 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-quartus-ii-introduction-to-modelsim-altera-starter-edition/</guid>
      <description>&lt;p&gt;After &lt;a href=&#34;https://www.badprog.com/electronics-quartus-ii-installing-modelsim-altera-starter-edition&#34;&gt;installing ModelSim-Altera Starter Edition&lt;/a&gt;
, what&amp;rsquo;s better than testing it?&lt;/p&gt;
&lt;p&gt;This is what we&amp;rsquo;re going to see in this ModelSim-Altera Starter Edition introduction.&lt;/p&gt;
&lt;p&gt;To be honest a simulation tool is really complex to handle, so this tutorial will be most an introduction than exhaustive examples.&lt;/p&gt;
&lt;p&gt;You could use it with any HDL such as VHDL, Verilog or SystemVerilog.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s get started.&lt;/p&gt;
&lt;h2 id=&#34;first-of-all&#34;&gt;First of all&lt;/h2&gt;
&lt;p&gt;There are two different types of simulation:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - Quartus II - Installing ModelSim-Altera Starter Edition</title>
      <link>https://www.badprog.com/electronics-quartus-ii-installing-modelsim-altera-starter-edition/</link>
      <pubDate>Sat, 15 Feb 2014 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-quartus-ii-installing-modelsim-altera-starter-edition/</guid>
      <description>&lt;p&gt;Simulation in HDL system is essential.&lt;/p&gt;
&lt;p&gt;One calls that &lt;strong&gt;EDA&lt;/strong&gt; for &lt;strong&gt;Electronic Design Automation&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s like a debugger for a software program.&lt;/p&gt;
&lt;p&gt;In this tutorial, we&amp;rsquo;re going to see how to install &lt;strong&gt;ModelSim-Altera Starter Edition 10.1d&lt;/strong&gt; simulation tool.&lt;/p&gt;
&lt;p&gt;The Quartus II version used in this tutorial is the &lt;strong&gt;13.0.1 Web Edition&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&#34;difference-between-modelsim-and-modelsim-altera&#34;&gt;Difference between ModelSim and ModelSim-Altera&lt;/h2&gt;
&lt;p&gt;To be honest is not so easy to understand what are differences between ModelSim simulation tools.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - Verilog - Blinking a LED</title>
      <link>https://www.badprog.com/electronics-verilog-blinking-a-led/</link>
      <pubDate>Tue, 04 Feb 2014 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-verilog-blinking-a-led/</guid>
      <description>&lt;p&gt;Blinking a LED, a basic step.&lt;/p&gt;
&lt;p&gt;But without this first step, there won&amp;rsquo;t be a second.&lt;/p&gt;
&lt;p&gt;And without second, no third and so on.&lt;/p&gt;
&lt;p&gt;This simple tutorial will explain basics in order to program a blinking system.&lt;/p&gt;
&lt;p&gt;Thus this timer example in Verilog could be seen as an Hello World exercise.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s get started.&lt;/p&gt;
&lt;h2 id=&#34;explanation&#34;&gt;Explanation&lt;/h2&gt;
&lt;p&gt;This tutorial has been made with the Altera DE1 board.&lt;/p&gt;
&lt;p&gt;In Verilog, every program starts by a module.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - SystemVerilog - Numbers, radix and bases</title>
      <link>https://www.badprog.com/electronics-systemverilog-numbers-radix-and-bases/</link>
      <pubDate>Sun, 02 Feb 2014 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-systemverilog-numbers-radix-and-bases/</guid>
      <description>&lt;p&gt;Every language needs to handle numbers.&lt;/p&gt;
&lt;p&gt;With Verilog we&amp;rsquo;re going to see that numbers need to have an explicit &lt;strong&gt;base system&lt;/strong&gt; to avoid errors.&lt;/p&gt;
&lt;p&gt;Each base system has a &lt;strong&gt;radix&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This radix is the number of unique digits making up a base system.&lt;/p&gt;
&lt;p&gt;For example the radix of the &lt;strong&gt;hexadecimal&lt;/strong&gt; system is &lt;strong&gt;16&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;So all digits of the hexadecimal base are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - VHDL - Hello World tutorial for beginners</title>
      <link>https://www.badprog.com/electronics-vhdl-hello-world-tutorial-for-beginners/</link>
      <pubDate>Sun, 10 Nov 2013 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-vhdl-hello-world-tutorial-for-beginners/</guid>
      <description>&lt;p&gt;VHDL is one of the most famous design hardware description languages.&lt;/p&gt;
&lt;p&gt;If you are interested to know how to switch on your first LED in VHDL, let&amp;rsquo;s get started!&lt;/p&gt;
&lt;p&gt;For this tutorial we are going to use the Altera DE1 FPGA board.&lt;br&gt;
And we&amp;rsquo;ll switch on LED 0 and 1, to understand how it works.&lt;/p&gt;
&lt;h2 id=&#34;how-it-works&#34;&gt;How it works&lt;/h2&gt;
&lt;p&gt;First of all, we have to tells which library and packages to use.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - Eagle - Basics to set up and create schematics</title>
      <link>https://www.badprog.com/electronics-eagle-basics-to-set-up-and-create-schematics/</link>
      <pubDate>Wed, 14 Aug 2013 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-eagle-basics-to-set-up-and-create-schematics/</guid>
      <description>&lt;p&gt;It may be possible that one day you said to yourself: &amp;ldquo;I would like to design my own schematics for my electronic integrated circuits&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;But you didn&amp;rsquo;t know how to start.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s see this by learning basics in this Eagle design tutorial.&lt;/p&gt;
&lt;h2 id=&#34;first-of-all&#34;&gt;First of all&lt;/h2&gt;
&lt;p&gt;Let’s start by downloading the Eagle software on the official CAD website at the following URL:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.cadsoftusa.com/download-eagle/?language=en&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;http://www.cadsoftusa.com/download-eagle/?language=en&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Then install it, for our tutorial we’ll use the directory:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - MSP430 - Using P1OUT and P2OUT registers of the LaunchPad to manipulate LEDs with bit shifting</title>
      <link>https://www.badprog.com/electronics-msp430-using-p1out-and-p2out-registers-of-the-launchpad-to-manipulate-leds-with-bit/</link>
      <pubDate>Sun, 12 May 2013 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-msp430-using-p1out-and-p2out-registers-of-the-launchpad-to-manipulate-leds-with-bit/</guid>
      <description>&lt;p&gt;After &lt;a href=&#34;https://www.badprog.com/electronics-msp430-using-p1out-pins-and-leds-to-count-in-binary&#34;&gt;creating a software to count in binary&lt;/a&gt;
, let&amp;rsquo;s see how bit shifting works.&lt;/p&gt;
&lt;p&gt;In this tutorial we are going to see how to turn on and off a single LED each time we will be using the left bit shifting.&lt;/p&gt;
&lt;p&gt;But what is interesting, in this video example, it&amp;rsquo;s that we will be manipulate GPIOs with P1OUT and P2OUT registers.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s get started.&lt;/p&gt;
&lt;h2 id=&#34;what-do-we-need&#34;&gt;What do we need?&lt;/h2&gt;
&lt;p&gt;In order to have exactly the same example as in the video, let&amp;rsquo;s see which electronic stuff we need:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - MSP430 - Using P1OUT pins and LEDs to count in binary</title>
      <link>https://www.badprog.com/electronics-msp430-using-p1out-pins-and-leds-to-count-in-binary/</link>
      <pubDate>Fri, 10 May 2013 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-msp430-using-p1out-pins-and-leds-to-count-in-binary/</guid>
      <description>&lt;p&gt;Maybe you&amp;rsquo;ve always dreamed to understand how to count in binary.&lt;/p&gt;
&lt;p&gt;What do you think about learning it with a MSP430 LaunchPad and LEDs?&lt;/p&gt;
&lt;p&gt;If you are still interested, that&amp;rsquo;s what we are going to see with this tutorial and a video.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s get started.&lt;/p&gt;
&lt;h2 id=&#34;what-do-we-need&#34;&gt;What do we need?&lt;/h2&gt;
&lt;p&gt;If you would like to reproduce exactly this example, let&amp;rsquo;s see which electronic stuff we need:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;1 MSP430 LaunchPad with a M430G2553 microcontroller;&lt;/li&gt;
&lt;li&gt;9 LEDs (1 green, 4 red and 4 orange);&lt;/li&gt;
&lt;li&gt;9 resistors of 330 ohm;&lt;/li&gt;
&lt;li&gt;4 breadboards;&lt;/li&gt;
&lt;li&gt;28 wires (10 red, 4 tiny and 4 long orange, 8 yellow, 2 black);&lt;/li&gt;
&lt;li&gt;1 USB mini cable.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Of course, it&amp;rsquo;s possible to do the same with less parts.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - MSP430 - Switching on a LED with a breadboard</title>
      <link>https://www.badprog.com/electronics-msp430-switching-on-a-led-with-a-breadboard/</link>
      <pubDate>Wed, 01 May 2013 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-msp430-switching-on-a-led-with-a-breadboard/</guid>
      <description>&lt;p&gt;In this MSP430 tutorial we will see how to use the LaunchPad to switch on a LED with a breadboard.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s an easy tutorial for beginners. Simple, easy and useful.&lt;/p&gt;
&lt;p&gt;You can watch the result of the tutorial directly with the video below:&lt;/p&gt;
&lt;h2 id=&#34;what-we-need-to-achieve-this-tutorial&#34;&gt;What we need to achieve this tutorial&lt;/h2&gt;
&lt;p&gt;For our example, we need:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;one MSP430 LaunchPad board&lt;/li&gt;
&lt;li&gt;one or two breadboards&lt;/li&gt;
&lt;li&gt;two wires&lt;/li&gt;
&lt;li&gt;one resistor (150 ohms)&lt;/li&gt;
&lt;li&gt;one LED&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We could do this tutorial without any resistor, but it&amp;rsquo;s a good practice to use one and it always reduce the current through the LED.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - IAR Systems - Setting up the IAR Embedded Workbench for the STM32L-DISCOVERY board</title>
      <link>https://www.badprog.com/electronics-iar-systems-setting-up-the-iar-embedded-workbench-for-the-stm32l-discovery-board/</link>
      <pubDate>Tue, 23 Apr 2013 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-iar-systems-setting-up-the-iar-embedded-workbench-for-the-stm32l-discovery-board/</guid>
      <description>&lt;p&gt;It&amp;rsquo;s not essentially easy to set up the IAR Embedded Workbench for a new project.&lt;/p&gt;
&lt;p&gt;All boards are different and all microcontrollers too.&lt;/p&gt;
&lt;p&gt;In our case we will be using the STM32L152RBT6 one.&lt;/p&gt;
&lt;p&gt;So, if you didn&amp;rsquo;t use neither IAR nor the STM32L-DISCOVERY board, it would be a bit complicated to begin playing with your new toys.&lt;/p&gt;
&lt;p&gt;Fortunately everything has a solution.&lt;/p&gt;
&lt;p&gt;So, let&amp;rsquo;s get started with this new tutorial!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - MSP430 - Managing P1DIR and P1OUT registers to blink the red and green LEDs</title>
      <link>https://www.badprog.com/electronics-msp430-managing-p1dir-and-p1out-registers-to-blink-the-red-and-green-leds/</link>
      <pubDate>Sun, 21 Apr 2013 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-msp430-managing-p1dir-and-p1out-registers-to-blink-the-red-and-green-leds/</guid>
      <description>&lt;p&gt;This tutorial has to be seen as the most easy code that is possible to do with a &lt;strong&gt;MSP430 LaunchPad&lt;/strong&gt; and then totally adapted for beginners.&lt;/p&gt;
&lt;p&gt;Indeed, we are going to blink together the red and the green LEDs by explaining what we are doing with the famous P1DIR and P1OUT registers.&lt;/p&gt;
&lt;p&gt;Ready?&lt;br&gt;
So, let&amp;rsquo;s do it!&lt;/p&gt;
&lt;h2 id=&#34;explanation&#34;&gt;Explanation&lt;/h2&gt;
&lt;h3 id=&#34;good-to-know&#34;&gt;Good to know&lt;/h3&gt;
&lt;p&gt;In the MSP430 Launchpad there are a few microcontrollers possible to use.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - MSP430 - Restoring the default software</title>
      <link>https://www.badprog.com/electronics-msp430-restoring-the-default-software/</link>
      <pubDate>Sun, 14 Apr 2013 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-msp430-restoring-the-default-software/</guid>
      <description>&lt;p&gt;Once you&amp;rsquo;ve received your MSP430 board, you couldn&amp;rsquo;t stop playing with it, clicking on every button, downloading all software you could find.&lt;/p&gt;
&lt;p&gt;But at a moment, you said to yourself: &amp;ldquo;Eh, how can I do to restore the default software?&amp;rdquo;&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s what we&amp;rsquo;re going to see in this tutorial to restore the demo default software.&lt;/p&gt;
&lt;h2 id=&#34;with-iar-embedded-workbench-ide&#34;&gt;With IAR Embedded Workbench IDE&lt;/h2&gt;
&lt;p&gt;Go where you installed your IAR IDE.&lt;/p&gt;
&lt;p&gt;For example, let&amp;rsquo;s assume this location:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - MSP430 - Using the temperature demo GUI</title>
      <link>https://www.badprog.com/electronics-msp430-using-the-temperature-demo-gui/</link>
      <pubDate>Sun, 14 Apr 2013 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-msp430-using-the-temperature-demo-gui/</guid>
      <description>&lt;p&gt;Without changing anything, it&amp;rsquo;s possible to check the current temperature with the MSP430 board and the default software.&lt;/p&gt;
&lt;p&gt;Indeed, Texas Instruments provides a tool to display the temperature on your computer&amp;rsquo;s screen.&lt;/p&gt;
&lt;p&gt;So, let&amp;rsquo;s go and display temperature with the Graphical User Interface (GUI).&lt;/p&gt;
&lt;h2 id=&#34;installation&#34;&gt;Installation&lt;/h2&gt;
&lt;p&gt;First of all, we need the Temperature Demo GUI.&lt;/p&gt;
&lt;p&gt;Two ways are possible.&lt;/p&gt;
&lt;h3 id=&#34;from-the-tis-official-website&#34;&gt;From the TI&amp;rsquo;s official website&lt;/h3&gt;
&lt;p&gt;You could download it directly from the TI&amp;rsquo;s website:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - IAR Systems - Enabling the download binary file option to the board</title>
      <link>https://www.badprog.com/electronics-iar-systems-enabling-the-download-binary-file-option-to-the-board/</link>
      <pubDate>Sat, 13 Apr 2013 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-iar-systems-enabling-the-download-binary-file-option-to-the-board/</guid>
      <description>&lt;p&gt;Maybe you tried to compile a project. All was OK.&lt;/p&gt;
&lt;p&gt;But when you wanted to download the binary into the board, nothing happened.&lt;/p&gt;
&lt;p&gt;What&amp;rsquo;s going on?!&lt;/p&gt;
&lt;p&gt;The debugger has to be configured!&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s see this in this tutorial to enable the downloading of binary files.&lt;/p&gt;
&lt;h2 id=&#34;explanation&#34;&gt;Explanation&lt;/h2&gt;
&lt;p&gt;The debugger is not necessarily well configured.&lt;br&gt;
So we have to do it.&lt;/p&gt;
&lt;p&gt;For that, click &amp;gt; Project &amp;gt; Option &amp;gt; Debugger &amp;gt; Setup &amp;gt; Driver &amp;gt; Select &lt;strong&gt;your debugger&lt;/strong&gt; (instead of Simulator).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - IAR Systems - Errors using the Embedded Workbench IDE</title>
      <link>https://www.badprog.com/electronics-iar-systems-errors-using-the-embedded-workbench-ide/</link>
      <pubDate>Sat, 13 Apr 2013 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-iar-systems-errors-using-the-embedded-workbench-ide/</guid>
      <description>&lt;p&gt;Using the IAR Embedded Workbench can be really helpful.&lt;/p&gt;
&lt;p&gt;But what happens when come errors during development?&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s try to solve problems encounter with this IDE.&lt;/p&gt;
&lt;h2 id=&#34;chosen-derivative-f20x1_g2x0x_g2x1x-and-actual-hardware-msp430g2xx3-do-not-match&#34;&gt;Chosen derivative (F20X1_G2X0X_G2X1X) and actual hardware (MSP430G2XX3) do not match&lt;/h2&gt;
&lt;p&gt;This kind of error appers when the IDE is not already setup with the correct microcontroller.&lt;/p&gt;
&lt;p&gt;In our case, we would like to use the &lt;strong&gt;MSP430G2553&lt;/strong&gt; microcontroller board in order to compile a project.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - STM32 - Using the ADC peripheral with a potentiometer</title>
      <link>https://www.badprog.com/electronics-stm32-using-the-adc-peripheral-with-a-potentiometer/</link>
      <pubDate>Fri, 12 Apr 2013 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-stm32-using-the-adc-peripheral-with-a-potentiometer/</guid>
      <description>&lt;p&gt;ADC is one on the most famous peripheral on a microcontroller.&lt;br&gt;
In this tutorial we will see that it&amp;rsquo;s possible to retrieve data from a potentiometer and send them in an array.&lt;/p&gt;
&lt;p&gt;You are certainly wondering how to use a such thing on a STM32?&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s a good question.&lt;/p&gt;
&lt;p&gt;To see this, let&amp;rsquo;s use the &lt;strong&gt;STM32F103ZE-SK&lt;/strong&gt; board, and guess what?&lt;br&gt;
There is already a potentiometer on it!&lt;/p&gt;
&lt;p&gt;What a wonderful world (that&amp;rsquo;s what Louis Armstrong would have said) isn&amp;rsquo;t it?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - Keil - Creating a project by copying a default example</title>
      <link>https://www.badprog.com/electronics-keil-creating-a-project-by-copying-a-default-example/</link>
      <pubDate>Mon, 01 Apr 2013 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-keil-creating-a-project-by-copying-a-default-example/</guid>
      <description>&lt;p&gt;You are likely playing with your MDK-ARM uVision4 IDE with default examples provided by the ST firmware.&lt;/p&gt;
&lt;p&gt;But each time you try to change something you see a message saying that the project is read only.&lt;/p&gt;
&lt;p&gt;Therefor in this tutorial we will create our own project by copying an example provided in order to customize it.&lt;/p&gt;
&lt;p&gt;All the tutorial will use the &lt;strong&gt;STM32F3-DISCOVERY board&lt;/strong&gt; but it should of course work with other boards.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - IAR Systems - Installing IAR Embedded Workbench and activate a license</title>
      <link>https://www.badprog.com/electronics-iar-systems-installing-iar-embedded-workbench-and-activate-a-license/</link>
      <pubDate>Sat, 30 Mar 2013 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-iar-systems-installing-iar-embedded-workbench-and-activate-a-license/</guid>
      <description>&lt;p&gt;If you already had some difficulties to install the IAR Embedded Workbench, let me explain how to get a time limited or a code size limited license.&lt;/p&gt;
&lt;p&gt;This tutorial will help you to remove this kind of error when trying build a project without a license:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fatal Error[LMS001]: No license found. Use the IAR License Manager to resolve the problem.[LicenseCheck:2.13.8.154, RMS:3.4.2.0085, Feature:ARM.EW.COMPILER, Version:1.00]&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Not so hard, but setting up IDEs is sometimes not so easy.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - Keil - Errors using uVision4 MDK-Lite</title>
      <link>https://www.badprog.com/electronics-keil-errors-using-uvision4-mdk-lite/</link>
      <pubDate>Sat, 30 Mar 2013 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-keil-errors-using-uvision4-mdk-lite/</guid>
      <description>&lt;p&gt;In this tutorial we will see errors discovered by playing with the IDE uVision4 MDK-Lite.&lt;/p&gt;
&lt;p&gt;Of course detailed errors and solutions are provided and will be added if more errors would be found.&lt;/p&gt;
&lt;p&gt;Simple and easy, so let&amp;rsquo;s get started.&lt;/p&gt;
&lt;h2 id=&#34;unknow-target-connected&#34;&gt;Unknow target connected&lt;/h2&gt;
&lt;p&gt;If, when you tried to download code to flash memory, you encountered this error:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-c&#34; data-lang=&#34;c&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Unknow target connected
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;from the Debugger - Cortex-M Error popup.&lt;/p&gt;
&lt;p&gt;And just after a new popup saying:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - STM32 - Installation on Windows</title>
      <link>https://www.badprog.com/electronics-stm32-installation-on-windows/</link>
      <pubDate>Sat, 30 Mar 2013 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-stm32-installation-on-windows/</guid>
      <description>&lt;p&gt;Before going mad, by installing a STM32 board on your Windows OS, let&amp;rsquo;s see how to install it with a simple way.&lt;/p&gt;
&lt;p&gt;If you asked yourself what was going on, don&amp;rsquo;t worry, you are not alone in this case.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s see how to resolve this problem with this tutorial.&lt;/p&gt;
&lt;h2 id=&#34;how-it-works&#34;&gt;How it works&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;: here&amp;rsquo;s maybe the weird but working solution if you&amp;rsquo;ve more than one USB connection.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Plug&lt;/strong&gt; your device into your &lt;strong&gt;first&lt;/strong&gt; USB connector;&lt;/li&gt;
&lt;li&gt;Install the &lt;strong&gt;driver&lt;/strong&gt;;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Remove&lt;/strong&gt; your device from your &lt;strong&gt;first&lt;/strong&gt; USB connector;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Plug&lt;/strong&gt; your device into your &lt;strong&gt;second&lt;/strong&gt; USB connector;&lt;/li&gt;
&lt;li&gt;Oh miracle it works!&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;mdash;&amp;mdash;&amp;mdash;&amp;ndash; come back to others solutions.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - STM32 - Initializing and enabling default LEDs, LCD screen and buzzer with STM32F103ZE-SK</title>
      <link>https://www.badprog.com/electronics-stm32-initializing-and-enabling-default-leds-lcd-screen-and-buzzer-with-stm32f103ze-sk/</link>
      <pubDate>Tue, 05 Mar 2013 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-stm32-initializing-and-enabling-default-leds-lcd-screen-and-buzzer-with-stm32f103ze-sk/</guid>
      <description>&lt;p&gt;In a previously &lt;a href=&#34;https://www.badprog.com/electronics-stm32-initializing-and-enabling-all-pins-at-the-same-time-on-the-stm32f103ze-sk-board&#34;&gt;STM32F103ZE-SK&amp;rsquo;s tutorial&lt;/a&gt;
 we created a program to initialize and enable all GPIOs on the board.&lt;br&gt;
This time, we will just initialize and enable default &lt;strong&gt;LEDs&lt;/strong&gt; of the board, the &lt;strong&gt;LCD&lt;/strong&gt; screen and the &lt;strong&gt;buzzer&lt;/strong&gt;.&lt;br&gt;
Making them blinking.&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s why we disable the &lt;strong&gt;GPIO D, E and G&lt;/strong&gt;.&lt;br&gt;
Indeed, there is no peripheral of LED, LCD or buzzer types on those ports.&lt;/p&gt;
&lt;p&gt;So the code is the same, except that the &lt;strong&gt;badprogInitOnlyBoardDefault()&lt;/strong&gt; function is replaced with &lt;strong&gt;badprogInitAllGPIO()&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - STM32 - Initializing and enabling all pins at the same time on the STM32F103ZE-SK board</title>
      <link>https://www.badprog.com/electronics-stm32-initializing-and-enabling-all-pins-at-the-same-time-on-the-stm32f103ze-sk-board/</link>
      <pubDate>Mon, 04 Mar 2013 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-stm32-initializing-and-enabling-all-pins-at-the-same-time-on-the-stm32f103ze-sk-board/</guid>
      <description>&lt;p&gt;You probably won&amp;rsquo;t use directly this code, but it&amp;rsquo;s always interesting to know how to initialize all pins and activate them.&lt;br&gt;
So let&amp;rsquo;s see how to do this, in this STM32F103ZE-SK tutorial.&lt;/p&gt;
&lt;p&gt;We are of course free to plug or weld LEDs on some ports in order to see then blink.&lt;/p&gt;
&lt;h2 id=&#34;explanation&#34;&gt;Explanation&lt;/h2&gt;
&lt;p&gt;In the example below, an array of GPIOs is created in order to handle them easily in the code.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Electronics - STM32 - Using the User button to play with the LCD screen and the STM32F103ZE-SK board</title>
      <link>https://www.badprog.com/electronics-stm32-using-the-user-button-to-play-with-the-lcd-screen-and-the-stm32f103ze-sk-board/</link>
      <pubDate>Sun, 03 Mar 2013 00:00:00 +0000</pubDate>
      <guid>https://www.badprog.com/electronics-stm32-using-the-user-button-to-play-with-the-lcd-screen-and-the-stm32f103ze-sk-board/</guid>
      <description>&lt;p&gt;In this &lt;strong&gt;STM32F103ZE-SK&lt;/strong&gt; tutorial we are going to see how to use the &lt;strong&gt;User button&lt;/strong&gt; of the board by turning on and off the &lt;strong&gt;LCD screen&lt;/strong&gt;.&lt;br&gt;
The &lt;strong&gt;LCD screen&lt;/strong&gt; is on the &lt;strong&gt;GPIO B&lt;/strong&gt; peripheral and on the &lt;strong&gt;GPIO_Pin_5&lt;/strong&gt; port.&lt;br&gt;
The &lt;strong&gt;User button&lt;/strong&gt; is on the &lt;strong&gt;GPIO G&lt;/strong&gt; and on the &lt;strong&gt;GPIO_Pin_8&lt;/strong&gt; port.&lt;/p&gt;
&lt;h2 id=&#34;explanation&#34;&gt;Explanation&lt;/h2&gt;
&lt;p&gt;We have:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;PB5 -&amp;gt; LCD&lt;/li&gt;
&lt;li&gt;PG8 -&amp;gt; User button&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;strong&gt;lightToMe()&lt;/strong&gt; function initializes both GPIO B and G, being respectively the LCD&lt;br&gt;
screen and the User button.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
