Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
learn:courses:unit-4-2:start [2017/03/21 23:03] – Marthalearn:courses:unit-4-2:start [2022/10/04 11:38] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Unit 4 Part 2: Communications - Asynchronous Serial Protocols ====== ====== Unit 4 Part 2: Communications - Asynchronous Serial Protocols ======
-=== Unit 4 Part 2 Labs === +[[{}/learn/courses/unit-4-1/start|Back to Unit 4 Part 1]]
-  * [[https://reference.digilentinc.com/learn/courses/unit-4-lab4c/start|Lab 4c]] +
-  * [[https://reference.digilentinc.com/learn/courses/unit-4-lab4d/start|Lab 4d]]+
  
 +  * [[/learn/courses/unit-4-lab4a/start|Lab 4a]]
 +  * [[/learn/courses/unit-4-lab4b/start|Lab 4b]]
 +  * [[/learn/courses/unit-4-lab4c/start|Lab 4c]]
 +  * [[/learn/courses/unit-4-lab4d/start|Lab 4d]]
 === Download This Document === === Download This Document ===
-  * {{ :learn:courses:unit-4-2:unit_4_part_2.pdf |Unit 4 Part 2 PDF}}+{{ :learn:courses:unit-4-2:unit_4_part_2.pdf |Unit 4 Part 2 PDF}}
  
 ===== 1. Introduction ===== ===== 1. Introduction =====
Line 14: Line 16:
  
 ===== 2. Objectives: ===== ===== 2. Objectives: =====
-  * Program the PIC32MX370 to use the Universal Asynchronous Receiver Transmitter ([[https://en.wikipedia.org/wiki/Universal_asynchronous_receiver/transmitter|UART]]) serial communications to display data on a computer using a terminal emulation program. +  - Program the PIC32MX370 to use the Universal Asynchronous Receiver Transmitter ([[https://en.wikipedia.org/wiki/Universal_asynchronous_receiver/transmitter|UART]]) serial communications to display data on a computer using a terminal emulation program. 
-  * Control the stepper motor speed and direction of rotation using commands entered from a [[https://en.wikipedia.org/wiki/Terminal_emulator|terminal emulation]] program. +  - Control the stepper motor speed and direction of rotation using commands entered from a [[https://en.wikipedia.org/wiki/Terminal_emulator|terminal emulation]] program. 
-  * Display serial communications on the LCD and PC terminal.+  - Display serial communications on the LCD and PC terminal.
  
 ---- ----
  
 ===== 3. Basic Knowledge: ===== ===== 3. Basic Knowledge: =====
-  * How to map PIC32MX370 I/O pins to special function registers. +  - How to map PIC32MX370 I/O pins to special function registers. 
-  * How to initialize special functions using the PLIB functions. +  - How to initialize special functions using the PLIB functions. 
  
 ---- ----
Line 29: Line 31:
 ===== 4. Unit Equipment List ===== ===== 4. Unit Equipment List =====
 ==== 4.1. Hardware ==== ==== 4.1. Hardware ====
-  * [[http://store.digilentinc.com/basys-mx3-pic32mx-trainer-board-recommended-for-embedded-systems-courses/|Basys MX3 trainer board]] +  - [[https://digilent.com/shop/basys-mx3-pic32mx-trainer-board-for-embedded-systems-courses/|Basys MX3 trainer board]] 
-  * 2 [[http://store.digilentinc.com/usb-a-to-micro-b-cable/|Micro USB cables]] +  - 2 [[https://digilent.com/shop/usb-a-to-micro-b-cable/|Micro USB cables]] 
-  * Workstation computer running Windows 10 or higher, MAC OS, or Linux +  - Workstation computer running Windows 10 or higher, MAC OS, or Linux 
-  * 4-wire stepper motor (Lab 4b only) +  - [[https://digilent.com/shop/stepper-motor/|4-wire stepper motor]] (Lab 4b only) 
-  * [[http://store.digilentinc.com/5v-2-5a-switching-power-supply/|5V, 2.5A DC power supply]] (Lab 4b only)+  - [[https://digilent.com/shop/5v-4a-switching-power-supply/|5V, 4A DC power supply]] (Lab 4b only)
  
 In addition, we suggest the following instruments: In addition, we suggest the following instruments:
-  * [[http://store.digilentinc.com/analog-discovery-2-100msps-usb-oscilloscope-logic-analyzer-and-variable-power-supply/|Digilent Analog Discovery 2]]+  - [[https://digilent.com/shop/analog-discovery-2-100ms-s-usb-oscilloscope-logic-analyzer-and-variable-power-supply/|Digilent Analog Discovery 2]]
  
 ==== 4.2. Software ==== ==== 4.2. Software ====
 The following programs must be installed on your development work station: The following programs must be installed on your development work station:
-  * [[http://www.microchip.com/mplab/mplab-x-ide|Microchip MPLAB X® v3.35 or higher]] +  - [[http://www.microchip.com/mplab/mplab-x-ide|Microchip MPLAB X® v3.35 or higher]] 
-  * [[http://www.microchip.com/SWLibraryWeb/product.aspx?product=PIC32%20Peripheral%20Library|PLIB Peripheral Library]] +  - [[http://www.microchip.com/SWLibraryWeb/product.aspx?product=PIC32%20Peripheral%20Library|PLIB Peripheral Library]] 
-  * [[http://www.microchip.com/xcdemo/xcpluspromo.aspx|XC32 Cross Compiler] +  - [[http://www.microchip.com/xcdemo/xcpluspromo.aspx|XC32 Cross Compiler] 
-  * [[http://store.digilentinc.com/waveforms-2015-download-only/|WaveForms 2015]] +  - [[https://digilent.com/shop/software/digilent-waveforms/|WaveForms]] 
-  * [[http://www.putty.org/|PuTTY Terminal Emulator]]+  - [[http://www.putty.org/|PuTTY Terminal Emulator]]
  
 ---- ----
  
 ===== 5. Project Takeaways ===== ===== 5. Project Takeaways =====
-  * Understanding of the basics of telecommunications. +  - Understanding of the basics of telecommunications. 
-  * Understanding of requirements and implementations of asynchronous communications.  +  - Understanding of requirements and implementations of asynchronous communications.  
-  * Application of asynchronous communications+  - Application of asynchronous communications
     * Knowledge of a PC terminal emulation program.     * Knowledge of a PC terminal emulation program.
     * How to develop a library of PIC32 software to provide bi-directional communications of single characters and strings of characters.      * How to develop a library of PIC32 software to provide bi-directional communications of single characters and strings of characters. 
     * How to use the UART for diagnostics and as a [[https://www.techopedia.com/definition/12829/human-machine-interface-hmi|human-machine interface]] (HMI).     * How to use the UART for diagnostics and as a [[https://www.techopedia.com/definition/12829/human-machine-interface-hmi|human-machine interface]] (HMI).
-  * How to recognize the handshaking methods used in a communications protocol. +  - How to recognize the handshaking methods used in a communications protocol. 
-  * How to setup the Analog Discovery 2 to display UART waveforms.+  - How to setup the Analog Discovery 2 to display UART waveforms.
  
  
Line 71: Line 73:
 Figure 6.1 shows a typical asynchronous transmission of two 8-bit data bytes. We see that the idle state of the transmit signal is a logic one, or a high voltage level. A START bit is signified by a high to low transition and remains low for one symbol time. The START bit is followed by eight data bits with the least significant bit being sent first. A logic zero is sent when the signal is a low voltage level for one symbol time. Similarly, a logic one is sent when the signal is a high voltage level for one symbol time. After the transmitting of the data there may be an optional parity bit. The [[http://www.cse.wustl.edu/~jain/cis677-96/ftp/e_6com2.pdf|parity bit]] is used for error detection and can be set for even parity or odd parity. For even parity, the parity bit is set high if the number of ones in the preceding eight data bits are odd, thus making the total number of 1’s in the data plus parity bit even. Conversely, for odd parity, the parity bit is set high if the number of ones in the 8 data is even. The data byte is terminated with one or more successive stop bits. Stop bits are always a logic 1 or high voltage level. If the signal remains high for longer than one symbol period, the stop bit can be thought of as the stop or idle period and the communications signal may remain in the idle condition an arbitrarily long period of time.   Figure 6.1 shows a typical asynchronous transmission of two 8-bit data bytes. We see that the idle state of the transmit signal is a logic one, or a high voltage level. A START bit is signified by a high to low transition and remains low for one symbol time. The START bit is followed by eight data bits with the least significant bit being sent first. A logic zero is sent when the signal is a low voltage level for one symbol time. Similarly, a logic one is sent when the signal is a high voltage level for one symbol time. After the transmitting of the data there may be an optional parity bit. The [[http://www.cse.wustl.edu/~jain/cis677-96/ftp/e_6com2.pdf|parity bit]] is used for error detection and can be set for even parity or odd parity. For even parity, the parity bit is set high if the number of ones in the preceding eight data bits are odd, thus making the total number of 1’s in the data plus parity bit even. Conversely, for odd parity, the parity bit is set high if the number of ones in the 8 data is even. The data byte is terminated with one or more successive stop bits. Stop bits are always a logic 1 or high voltage level. If the signal remains high for longer than one symbol period, the stop bit can be thought of as the stop or idle period and the communications signal may remain in the idle condition an arbitrarily long period of time.  
  
-{{ :learn:courses:unit-4-2:part2-fig-6-1.png?nolink&400 |Figure 6.1. Example of 115 kB asynchronous serial data stream with odd parity.}}+{{ :learn:courses:unit-4-2:part2-fig-6-1.png?nolink&700 |Figure 6.1. Example of 115 kB asynchronous serial data stream with odd parity.}}
 //Figure 6.1. Example of 115 kB asynchronous serial data stream with odd parity.// //Figure 6.1. Example of 115 kB asynchronous serial data stream with odd parity.//
  
Line 156: Line 158:
  
 ===== Appendix A: Unit 4 Part 2 Parts Configuration ===== ===== Appendix A: Unit 4 Part 2 Parts Configuration =====
-{{ :learn:courses:unit-4-2:part2-fig-a-1.png?nolink&400 |Figure A.1. PIC32 to FT232RQR IC schematic diagram.}}+{{ :learn:courses:unit-4-2:part2-fig-a-1.png?nolink&700 |Figure A.1. PIC32 to FT232RQR IC schematic diagram.}}
 //Figure A.1. PIC32 to FT232RQR IC schematic diagram.// //Figure A.1. PIC32 to FT232RQR IC schematic diagram.//
  
Line 255: Line 257:
  
 ---- ----
 +[[{}/learn/courses/unit-4-1/start|Back to Unit 4 Part 1]] 
 +[[{}/learn/courses/unit-4-lab4a/start|Go to Lab 4a]] 
 +[[{}/learn/courses/unit-4-lab4b/start|Go to Lab 4b]] 
 +[[{}/learn/courses/unit-4-lab4c/start|Go to Lab 4c]] 
 +[[{}/learn/courses/unit-4-lab4d/start|Go to Lab 4d]] 
 +[[{}/learn/courses/unit-5/start|Go to Unit 5]]
  
 {{tag>reference learn microprocessor courses basys-mx3}} {{tag>reference learn microprocessor courses basys-mx3}}