You are on page 1of 28

  microcontroller board technical manual  1

microcontroller board
technical manual

Innovative Experiment Co.,Ltd


2   microcontroller board technical manual

chapter 1
Technical features
The POP-32i is a microcontroller board based on STM32F103CBT6 the 32-bit
microcontroller from STMicroelectronics (www.st.com). It has two built-in USB ports for
data communication, upload and debugging.The POP-32i uses hardware and software
from an open source microcontroller project called Arduino (www. .arduino.cc) Let's
continue to improve. A large number of hardware interface C language libraries are
provided. Makes it easy to write programs to operate various devices without having
to study into the details of the microcontroller.

Figure 1-1 shows the POP-32i board layout. All components of the POP-32i board
are summarized as follows:

Figure 1-1 The POP-32i board layout


  microcontroller board technical manual  3

 Main microcontroller is STM32F103CBT6. It has 128KB of flash memory, can be


reprogrammed 10,000 times, has 20KB of RAM data memory, and a 8MHz clock from a
ceramic resonator. Operates with PLL 9x up to 72MHz clock.

 11 of 3-pin JST connectors for connecting externial devices and peripherals.

 2 of LED indicators for low battery monitor and USB port connection status

 There is a RESET button

 There are 2 of USB-C port connectors.

1. On below postion is used for data communication with the computer


(COM)

2. On top position is installed with the SWD (Serial Wire Debugger) module
(pink board) for debugging and uploading code (DEBUG)

 There is a terminal block for connecting the external power supply. Accepts 6
to 9V power supply. There is an on-off switch to turn on the power supply.

 Operate with a maximum of 2 cells of lithium polymer battery 7.4V to 8.4V after
fully charged.

 There is a 3.3V regulator circuit to supply the voltage for the microcontroller,
OLED display and the main input/output port.

 9 of the Digital and Analog input/output port, namely A0 to A8 (corresponding


to pin PA0 to PA7 and PB0). Supports the external interrupt signal.

2 of I2C bus connector ; SDA and SCL are connected together by using
connector type PH4 arranged as GROVE type connector.

 There is the UART serial data communication port; PB7 (RxD) and PB6 (TxD).

 4-channels of DC motor driver cicrcuit with LED indicators. The motor connectors
are 2-pin IDC connector and 2-pin screw terminal block per channel. It supports 3 to 12V
DC motors. Output currect is 1.5A per channel with 2A current limit circuit.

 6-channels of Servo motor output; SERVO1


(PB10), SERVO2 (PB3), SERVO3 (PC15),
SERVO4 (PC14), SERVO5 (PA15) and SERVO6 (PB11).

 There is a piezo speaker for driving sound. By connecting to the port pin PB5.

1.5-inch OLED display module with a resolution of 128 x 64 dots, showing


characters number line graphics and color backgrounds. Displays in normal size
characters (5 x 7 dots) with 21 characters 8 lines (21 x 8) and communicates via I2C bus.
4   microcontroller board technical manual

 There are 3 of ready-to-use push-button switches.

1. OK (yellow button) is connected with a variable resistor (KNOB) which is


connected to the port pin PB1, making it possible to read digital and analog signals in
the same port pin.

2. SW-A (orange button) is connected to the PC13 pin with a pull-up resistor.
and connect with blue LED to show logic status.

3. SW-B (white button) is connected to the PB2 pin with a pull-up resistor.
and connect with green LED to show logic status.

There is a KNOB adjustable resistor circuit to be used to test the analog-to-digital



conversion circuit on board. By connecting to the port pin PB1 and connecting with
the OK button.
 microcontroller board technical manual  5

chapter 2
Arduino IDE installation
The development of programs for the POP32i board here uses the C/C++
programming language using an open platform called Arduino. The main software is
the Arduino IDE that handles the whole process with a single program. Since there is the
C/C++ code generating part, there are standard libraries, C/C++ compilers or compilers,
linkers and the uploading part of the code to write into the program memory of the
microcontroller. In this chapter presents the steps to install the Arduino IDE program until
the initial test.

2.1 Installing Arduino IDE Software on Windows


Operating System
2.1.1 Installing the Arduino IDE and USB drivers
There are steps as follows:

(1) Connect your computer to the Internet. Then open a web browser to the
Arduino website at https://www.arduino.cc. Then click on SOFTWARE as shown in Figure
2-1.

Figure 2-1 Arduino official website, www.arduino.cc


6 microcontroller board technical manual

Figure 2-2 Choose the installation file of Arduino IDE version 1.8.x for older
computer
(2) Scroll down to the bottom and find Legacy IDE, select Windows Win 7 and
Newer to download the Arduino IDE version 1.8.X software installation file as shown in
Figure 2-2 for older computers. If it is a newer computer that is installed with Windows 64-
bit operating system and uses an SSD hard disk, it is recommended to install version 2.0.x
or higher as shown in Figure 2-3.

Figure 2-3 Choose the installation file of Arduino IDE version 2.0.x
 microcontroller board technical manual  7

Figure 2-4 The license software Figure 2-5 The component selection
agreement window of Arduino IDE window for installation of Arduino IDE
(3) Then a window will appear, choose to download or select to support the
development of the program. Click the JUST DOWNLOAD button to download the setup
file.

(4) Double click on the Arduino IDE software installation file. A window will appear
for starting to install the Arduino IDE program as shown in Figure 2-4.

(5) Then a window for selecting program components to be installed will appear
as shown in Figure 2-5. Click the Next button.

(6) A window to select the folder for program installation as shown in Figure 2-6
appears. Click the Install button to begin installing the Arduino IDE program.

(7) Then wait until the program installation is complete, as shown in Figure 2-7, click
Close button.

Figure 2-6 The installation folder Figure 2-7 The Arduino IDE setup
selection windows completed window
8 microcontroller board technical manual

2.1.2 Installing hardware and libraries for using the POP32i


board
When the Arduino IDE program is installed successfully. The next step is Getting
programs in the Arduino IDE to work with the POP32i board by adding hardware
information and installing libraries for developing programs with C/C++ language to
the Arduino IDE, including enabling the program uploading tool of the Arduino IDE to
upload code to the POP32i board. There are steps as follows:

(1) Open program Arduino IDE. The main window of Arduino IDE will appear as
shown in Figure 2-8.

(2) Select menu File > Preferences… as in Figure 2-9.

(3) The Preferences window appears as shown in Figure 2-10. Make the settings as
follows.

(3.1) Click on the item Verify code after upload to remove the check mark.

(3.2) Click on the item Check for updates on startup to remove the check mark.

(3.3) In Additional Boards Manager URLs list: Set to :

https://github.com/INEXdev/ArduinoSTM32/raw/main/package_inex_stm32_index.json

Then click the OK button to confirm the settings.

Figure 2-8 The main window of Arduino IDE


 microcontroller board technical manual  9

Figure 2-9 Open the Preferences window of the Arduino IDE

Figure 2-10 Setting the Preferences window for preparing to install hardware
information of the POP-32i board via Board manager feature of Arduino IDE
10  microcontroller board technical manual

(4) Select Menu Tools > Board:xxx > Boards Manager… as in Figure 2-11.

(5) The Boards Manager window appears as shown in Figure 2-12. Type INEX to
search. It will find a list of hardware information installer named INEX_STM32 which
includes board information. Then click Install button to install.

(6) Enter the library installation process. Wait until the installation is complete. Then
close the Arduino IDE program.

รูปที2-13
่ แสดงการเลือกบอรด
Figure 2-11 How to choose the menu Tools>Board:xxx>Boards Manager…

Figure 2-12 The Boards Manager setting for installation library and hardware
information of the INEX_STM32
 microcontroller board technical manual  11

2.1.3 Install STM32 Cube Programmer software


The POP32i board is used to program or write data into the program memory of
the STM32F103CBT6 microcontroller by the Serial Wire Debugger method or SWD. This
makes it very fast to upload code from the Arduino IDE to POP32i in seconds.

The sof tware required to process this SWD is STMicroelectronics’ STM32


CubeProgrammer. Let’s start with the preparation of the software. There are steps as
follows:

(1) Connect your computer to the Internet. Then open the web browser program.
to go to the website of STMicroelectronics follow the following link

https://www.st.com/en/development-tools/stm32cubprog.html

(2) Web page of the program STM32CubeProgrammer As shown in Figure 2-13,


select the icon to enter the system due to downloading the program STM32
CubeProgrammer Sign-in is required or applied as member of STMicroelectronics before
it can be downloaded and used

(3) If you have previously registered with the website www.st.com, enter your
email and password and click the Login button to log in. Then skip to step (9). In case of
using for the first time, click the Create Account button as shown in Figure 2-14.

(4) You will go to the registration page as shown in Figure 2-15. Fill out the form,
provide information for registration then click the Register button.

Figure 2-13 STM32CubeProgrammer webpage


12  microcontroller board technical manual

Figure 2-14 Sign in to the webpage

Figure 2-15 Registration form of the www.st.com website


 microcontroller board technical manual  13

Figure 2-16 The example of registration acknowleadge email from


www.st.com. Click on the Validate now to activate the registration.
(5) The system will send an email to the registrant. It may take some time (maybe up
to 15 minutes) to not receive an email response. Registrants are requested to click the
Feedback button on the right-hand side of the website to report registration problems.

(6) If there is no error, the registrant will receive an email as shown in Figure 2-16.
Click the Validate now button to confirm the registration and open a user account for
the website. STMicroelectronics (www.st.com)

(7) The system will bring you to the registration page as shown in Figure 2-17. Set a
password and click the Submit button to confirm the registration is complete.

Figure 2-17 Setting password for registration of the www.st.com


14  microcontroller board technical manual

Figure 2-18 After login is completed, enter to STMicroelectronics website for


getting technical info and latest softwear tools

(8) Once successfully logged in will automatically return to the homepage.

Note that under the icon, there will be the word Hi followed by the user’s
name as in Figure 2-18.

(9) Next, go to the web page of STM32CubeProgrammer at https://www.st.com/


en/development-tools/stm32cubeprog.html again and scroll down the web page until
you find the Get Software entry, select STM32CubePrg-W64 by Get Last to select the latest
version. It will start downloading immediately. Save as a .zip file.

(10) Extract the .zip file and go into the extracted folder. Double-click the
SetupSTM32 CubeProgrammer_win64.exe file to enter the installation of the STM32 Cube
Programmer program.

(11) There are 9 sub-steps as follows:

[11.1] Welcome window to install


STM32CubeProgrammer, click Next button.
 microcontroller board technical manual  15

[11.2] Enter the information window,


click the Next button.

[11.3] ST’s license agreement prompt


window, select I accept the terms of this
license agreement. and then click the Next
button.

[11.4] ST Privacy Policy and ST Terms


of Use notification window, select I have
read and understood the ST Privacy Policy
and ST Terms of Use and click the Next
button.

[11.5] Select the path or location to


install the STM32CubeProgrammer program
is appeared, then click the Next button.
16  microcontroller board technical manual

[11.6] Enter the Components


window to install the program. STM32
CubeProgrammer. Click the Next button to
enter the program installation. Wait until the
installation is complete.

[11.7] During the installation, a driver


installation window appears. Click Accept
All. When the installation is completed, click
the Next button.

[11.8] After the program installation


is completed, you will see a window. Set
the Shortcuts of the STM32Cube Program-
mer program, click on the Next button.
 microcontroller board technical manual  17

[11.9] The last step is to display the


installation notification window. STM32
CubeProgrammer is finished, click the
Done button.

2.1.4 Test upload program to the board


The next step is to test upload the program to the POP32i board. To confirm that
Installing hardware information and board libraries to the Arduino IDE program is correct
and ready to use.

(1) Connect the USB cable to the upper USB port of the SWD Module (it is pink
color module) on the board as shown in Figure 2-19 to connect the POP32i board to the
computer

Figure 2-19 Connect the POP32i board with computer for uploading code
18  microcontroller board technical manual

Figure 2-20 shows how to choose the POP-32 for both POP-32 and POP-32i
(2) Supply power to the POP32i board and turn on the POWER switch

(3) At the main program window of Arduino IDE, select Menu Tools > Board:xxx >
INEX STM32 > POP-32 as shown in Figure 2-20.

(4) Choose a method for uploading code by selecting Menu Tools > Upload
method > STM32Cube Programmer (SWD) as shown in Figure 2-21.

(5) Type the code according to the Program 2-1 for testing the operation. Then
click the Upload button.

Figure 2-21 Shows how to choose the uploading method as STM32 Cube
Programmer for POP32i board
 microcontroller board technical manual  19

#include <POP32.h>
void setup()
{
oled.text(0,0,”Hello POP-32");
oled.show();
}
void loop()
{}

Program 2-1 The testing code for displaying the message on the POP32i
board’s OLED screen

Figure 2-22 Uploading code to the POP32i board successful and the POP32i
board will run immediatly

(6) When the program upload is over. At the status window of the program will
inform the status of the compilation, program upload process and the status of uploading
the program as shown in Figure 2-22, then the board will work immediately.

The POP32i board displays the message Hello POP-32 on the OLED
display.
20  microcontroller board technical manual

2.2 Installing Arduino IDE software on MAC OSX


operating system
2.2.1 Installing the Arduino IDE
There are steps as follows:

(1) Connect the MAC computer to the Internet network. Then open a web browser
to the Arduino website at https://www.arduino.cc. Then click on SOFTWARE as shown in
Figure 2-23.

Figure 2-23 The official website of Arduino on MAC computer’s web browser

Figure 2-24 Shows the installation file of Arduino IDE download web page
 microcontroller board technical manual  21

Figure 2-25 Shows the JUST DOWNLOAD button for downloading Arduino
IDE software

(2) Then a window will appear as shown in Figure 2-25. Click JUST DOWNLOAD
button to download the installation file. You will get a .zip file.

(3) Double-click the .zip file to extract it, then an Arduino application will be created
as shown in Figure 2-26.

(4) Suggest to moves the Arduino application to the Applications section of the
MAC computer as in Figure 2-27, then run the Arduino IDE.

Figure 2-26 Arduino IDE


application for running on
MAC computer
22  microcontroller board technical manual

Figure 2-27 Shows an Arduino application that has been moved to the
Applications section of MAC OSX computer

2.2.2 Installing hardware and library for using the POP32i


board
When the Arduino IDE program is installed successfully. The next step is Getting
programs in the Arduino IDE to work with the POP32i board by adding hardware
information and installing library for developing programs with C/C++ language to the
Arduino IDE, including enabling the program uploading tool of the Arduino IDE to upload
code to the POP32i board.

There are steps as follows:

(1) Open up the Arduino IDE program. At the very first time after installing the
program in case the Activation confirmation window appears as shown in Figure 2-28,
click the Open button.

(2) The main window of the Arduino IDE program will appear ready to use as in
Figure 2-29.

Figure 2-28 shows the confirmation


window for activating the Arduino IDE
program for the first time after install-
ation.
 microcontroller board technical manual  23

Figure 2-29 Shows the main window of the Arduino IDE program.

Figure 2-30 Shows the Preferences menu selection of the Arduino IDE
program on MAC OSX computer
24  microcontroller board technical manual

Figure 2-31 Shows settings in the Preferences window to prepare for installing
data of Board POP32i.

(3) While the Arduino IDE program is active, at the top menu bar, click menu
Arduino > Preferences… as shown in Figure 2-30.

(4) The Preferences window will appear as shown in Figure 2-31, make the following
settings.

(4.1) Click on the box Verify code after upload to remove the check mark.

(4.2) Click on the box Check for updates on startup to remove the check
mark.

(4.3) In Additional Boards Manager URLs list : Set value to

https://github.com/INEXdev/ArduinoSTM32/raw/main/package_inex_ stm32_index.json

(4.4) Click the OK button to confirm the settings.

(5) Select menu Tools > Board:xxx > Boards Manager… as in Figure 2-32.

(6) The Boards Manager window will appear as shown in Figure 2-33. Type a search
with INEX. It will find a list of hardware information installer named INEX_STM32 which
includes board information. Then click the Install button to install.
 microcontroller board technical manual  25

Figure 2-32 Shows openning the Boards Manager…

Figure 2-33 Shows the Boards Manager window for installing INEX_STM32
library and hardware information.
26  microcontroller board technical manual

Figure 2-34 shows the library installation in the INEX_STM32 group.


(7) Then enter the library installation process according to Figure 2-34. Wait until
the installation is complete. The next step is to test upload the program to the POP32i
board to confirm that Installing hardware information and board library to the Arduino
IDE program is correct and ready to use.

(8) Connect the USB cable to connect the POP32i board with the computer in
the same way as Figure 2-19.

(9) Supply power to the POP32i board and turn on the POWER switch.

(10) At the top menu bar of Arduino IDE, select menu Tools > Board:xxx > INEX
STEM32 > POP-32 as shown in Figure 2-35.

Figure 2-35 Shows the selection of the POP-32 board, which can be used
with both POP32 and POP32i boards.
 microcontroller board technical manual  27

Figure 2-36 Shows the upload method selection for the Arduino IDE to the
POP-32i board.

(11) Choose a method for uploading code by selecting menu Tools > Upload
method > STM32Cube Programmer (SWD) as shown in Figure 2-36.

(12) At the main window of the Arduino IDE program, type the code according
to the program 2-1 for testing the display of text on the OLED screen, then click the
Upload button.

(13) When the program upload is over, the board will run immediately.

The OLED display of the board shows the message Hello POP-32.
28  microcontroller board technical manual

You might also like