{"id":83,"date":"2012-12-25T15:27:08","date_gmt":"2012-12-25T22:27:08","guid":{"rendered":"https:\/\/www.uniteng.com\/?p=83"},"modified":"2021-01-05T14:47:07","modified_gmt":"2021-01-05T06:47:07","slug":"part-1-using-serial-port-on-universal-expansion-board","status":"publish","type":"post","link":"https:\/\/www.uniteng.com\/index.php\/2012\/12\/25\/part-1-using-serial-port-on-universal-expansion-board\/","title":{"rendered":"Part 1: Using Serial Port on Universal Expansion Board"},"content":{"rendered":"<h2><strong>Prerequisites:<\/strong><\/h2>\n<ul type=\"disc\">\n<li><a title=\"RaspberryPi Universal Expansion Board\" href=\"http:\/\/projects.archive.uniteng.com\/digital-system-projects\/raspberrypiuniversalexpansionboard\" target=\"_blank\" rel=\"noopener\">RaspberryPi Universal Expansion Board<\/a><\/li>\n<\/ul>\n<ul type=\"disc\">\n<li><a title=\"MAX 3232 Pmod Board (Page 5)\" href=\"https:\/\/sites.google.com\/site\/eecsprojects\/home\/digital-system-projects\/raspberrypiuniversalexpansionboard\/de2pmod.pdf?attredirects=0&#038;d=1\" target=\"_blank\" rel=\"noopener\">MAX 3232 Pmod Board (Page 5)<\/a><\/li>\n<\/ul>\n<h2><strong>Using Serial Port with MAX 3232 Pmod Board<\/strong><\/h2>\n<p>Our goal is connecting the STM32 MCU (STM32F103RBT6) to the Computer&#8217;s Serial Port via the onboard CPLD(EPM240T100C5) and the MAX 3232 Pmod Board. In the beginning, the MAX 3232 Pmod Board should be attached to the Universal Expansion Board as the picture shown below:<\/p>\n<p><a href=\"https:\/\/www.uniteng.com\/index.php\/2012\/12\/25\/part-1-using-serial-port-on-universal-expansion-board\/12-25-2012-1-11-36-pm\/\" rel=\"attachment wp-att-84\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-84\" alt=\"UEB RS232 to Computer\" src=\"https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/12-25-2012-1-11-36-PM.png\" width=\"1024\" height=\"726\" srcset=\"https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/12-25-2012-1-11-36-PM.png 1024w, https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/12-25-2012-1-11-36-PM-300x212.png 300w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<ol>\n<li value=\"1\"><strong>STM32 Configuration<\/strong><\/li>\n<\/ol>\n<p style=\"padding-left: 30px;\">The Firmware <a href=\"https:\/\/sites.google.com\/site\/eecsprojects\/home\/digital-system-projects\/raspberrypiuniversalexpansionboard\/STM32Project_FW3.5-UEB-RS232Test.zip?attredirects=0&amp;d=1\">STM32Project_FW3.5-UEB-RS232Test.zip<\/a> need to be flashed into the MCU. The Firmware will host a Command Shell on UART1.<\/p>\n<ol>\n<li value=\"2\"><strong>CPLD Configuration<\/strong><\/li>\n<\/ol>\n<p style=\"padding-left: 30px;\">This part is pretty easy since we only need to map the UART1 to the MAX 3232 Pmod using the CPLD. The following Verilog code can implement the idea:<\/p>\n<p><code><br \/>\nmodule RS232(RXD_in,TXD_in,RXD_out,TXD_out);<\/p>\n<p>input RXD_in, TXD_in;<br \/>\noutput RXD_out,TXD_out;<\/p>\n<p>assign RXD_out = RXD_in;<br \/>\nassign TXD_out = TXD_in;<\/p>\n<p>endmodule<br \/>\n<\/code><\/p>\n<p>Navigate to Quartus\u00a0 -&gt; Assignments -&gt; Pin Planner. The IO need to be configured as following picture.<\/p>\n<p><a href=\"https:\/\/www.uniteng.com\/index.php\/2012\/12\/25\/part-1-using-serial-port-on-universal-expansion-board\/ueb-rs232-computer-cpld\/\" rel=\"attachment wp-att-89\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-89\" alt=\"UEB RS232 Computer CPLD\" src=\"https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/UEB-RS232-Computer-CPLD.png\" width=\"651\" height=\"104\" srcset=\"https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/UEB-RS232-Computer-CPLD.png 651w, https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/UEB-RS232-Computer-CPLD-300x47.png 300w\" sizes=\"auto, (max-width: 651px) 100vw, 651px\" \/><\/a><\/p>\n<p style=\"padding-left: 30px;\">We can flash the design into the CPLD right now.<\/p>\n<ol>\n<li value=\"3\"><strong>Testing<\/strong><\/li>\n<\/ol>\n<p style=\"padding-left: 30px;\">Connecting the MAX 3232 Pmod Bord to the Serial Port of the computer, the LOGICPORT Logic Analyzer could also be attached to the Universal Expansion Board.<\/p>\n<p style=\"padding-left: 30px;\">Configure the Serial Port Terminal Software (e.g. SecureCRT) as the picture shown below:<\/p>\n<p><a href=\"https:\/\/www.uniteng.com\/index.php\/2012\/12\/25\/part-1-using-serial-port-on-universal-expansion-board\/ueb-rs232-computer-terminal-setting\/\" style=\"padding-left: 30px;\" rel=\"attachment wp-att-90\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-90\" alt=\"UEB RS232 Computer Terminal Setting\" src=\"https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/UEB-RS232-Computer-Terminal-Setting.png\" width=\"361\" height=\"171\" srcset=\"https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/UEB-RS232-Computer-Terminal-Setting.png 361w, https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/UEB-RS232-Computer-Terminal-Setting-300x142.png 300w\" sizes=\"auto, (max-width: 361px) 100vw, 361px\" \/><\/a><\/p>\n<p style=\"padding-left: 30px;\">We almost reach the final stage, let us turn on the board. The Serial Port Terminal will print out following information:<\/p>\n<p><a href=\"https:\/\/www.uniteng.com\/index.php\/2012\/12\/25\/part-1-using-serial-port-on-universal-expansion-board\/ueb-rs232-computer-terminal\/\" style=\"padding-left: 30px;\" rel=\"attachment wp-att-91\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-91\" alt=\"UEB RS232 Computer Terminal\" src=\"https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/UEB-RS232-Computer-Terminal.png\" width=\"500\" height=\"171\" srcset=\"https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/UEB-RS232-Computer-Terminal.png 500w, https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/UEB-RS232-Computer-Terminal-300x102.png 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p style=\"padding-left: 30px;\">The RS232 data stream should also be sniffed by the Logic Analyzer.<\/p>\n<p><a href=\"https:\/\/www.uniteng.com\/index.php\/2012\/12\/25\/part-1-using-serial-port-on-universal-expansion-board\/ueb-rs232-computer-la\/\" rel=\"attachment wp-att-92\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-92\" alt=\"UEB RS232 Computer LA\" src=\"https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/UEB-RS232-Computer-LA.png\" width=\"1115\" height=\"111\" srcset=\"https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/UEB-RS232-Computer-LA.png 1115w, https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/UEB-RS232-Computer-LA-300x29.png 300w, https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/UEB-RS232-Computer-LA-1024x101.png 1024w\" sizes=\"auto, (max-width: 1115px) 100vw, 1115px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Prerequisites: RaspberryPi Universal Expansion Board MAX 3232 Pmod Board (Page 5) Using Serial Port with MAX 3232 Pmod Board Our goal is connecting the STM32 MCU (STM32F103RBT6) to the Computer&#8217;s Serial Port via the onboard CPLD(EPM240T100C5) and the MAX 3232 Pmod Board. In the beginning, the MAX 3232 Pmod Board should be attached to the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ngg_post_thumbnail":0,"footnotes":""},"categories":[5],"tags":[6,9,8,7],"class_list":["post-83","post","type-post","status-publish","format-standard","hentry","category-hardware-notes","tag-raspberrypi","tag-rs232","tag-serial-port","tag-universal-expansion-board"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"neilhao","author_link":"https:\/\/www.uniteng.com\/index.php\/author\/neilhao\/"},"uagb_comment_info":0,"uagb_excerpt":"Prerequisites: RaspberryPi Universal Expansion Board MAX 3232 Pmod Board (Page 5) Using Serial Port with MAX 3232 Pmod Board Our goal is connecting the STM32 MCU (STM32F103RBT6) to the Computer&#8217;s Serial Port via the onboard CPLD(EPM240T100C5) and the MAX 3232 Pmod Board. In the beginning, the MAX 3232 Pmod Board should be attached to the&hellip;","_links":{"self":[{"href":"https:\/\/www.uniteng.com\/index.php\/wp-json\/wp\/v2\/posts\/83","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.uniteng.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.uniteng.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.uniteng.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.uniteng.com\/index.php\/wp-json\/wp\/v2\/comments?post=83"}],"version-history":[{"count":0,"href":"https:\/\/www.uniteng.com\/index.php\/wp-json\/wp\/v2\/posts\/83\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.uniteng.com\/index.php\/wp-json\/wp\/v2\/media?parent=83"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.uniteng.com\/index.php\/wp-json\/wp\/v2\/categories?post=83"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.uniteng.com\/index.php\/wp-json\/wp\/v2\/tags?post=83"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}