Page 174 - ARM Based Microcontroller Projects Using MBED
P. 174
160 8. INTERMEDIATE LEVEL PROJECTS
8.8 PC SERIAL INTERFACE
The Nucleo-F411RE development board is connected to a PC through its mini USB port.
The development board receives its power from the PC, also user programs are uploaded
to the development board through the USB interface. The USB interface can also be used
to communicate with the PC and exchange data. This feature is useful for several reasons:
• ThePCactslikealargereliabledisplaywithakeyboard.Asaresult,theoutputoftheprograms
developed on the Nucleo board can be displayed on the PC screen. This can be very useful
during the program development. For example, the output of a temperature sensor can
be displayed on the PC screen while a temperature controller system is being developed.
• The developed programs can be debugged easily by placing messages at various points
inside the programs. This speeds up the development cycle and helps to remove any
errors from the program.
• The PC keyboard can be used to send messages to the development board. Additionally,
data can be received from the PC keyboard for testing purposes. Again, these can be
very useful during the development of complex programs.
A terminal emulation program is required on the PC in order to communicate with the
development board. There are several freely available terminal emulation software on the
PC, such as HyperTerm, Tera Term, Putty, etc. In this book, we shall be using the Putty ter-
minal emulation software.
8.8.1 Using the Putty
Putty is a popular terminal emulator program that can be downloaded from the following
site free of charge:
https://www.putty.org
Activate Putty by clicking on it (Putty.exe) after it has been downloaded. Putty can be used
for Raw, Telnet, SSH, Rlogin, or Serial interface. Here, we shall be using the Serial option. Be-
fore using the Putty, we have to know the serial port number used to communicate with the
Nucleo board. This can be found as follows (for Windows 7):
• Plug-in your Nucleo-F411RE development board to the USB port of your PC
• Click Start and then Control Panel and then click on System
• Click on Device Manager and then on Ports
• You should see the port number listed as a Virtual COM Port as shown in Fig. 8.20. In this
example, the port number is COM51
• Close the Device Manager tabs
Now that we know the serial port number we can start using the Putty. The steps are given
below (Fig. 8.21):
• Activate Putty
• Select Serial and enter COM51 for the Serial line, and 9600 for the Speed as shown in
Fig. 8.22. By default, the Nucleo-F411RE serial port settings are: speed is set to 9600, data
bits to 8, no parity, and 1 stop bit
• Click Open to open the Putty screen