{"id":114,"date":"2012-12-25T20:14:25","date_gmt":"2012-12-26T03:14:25","guid":{"rendered":"https:\/\/www.uniteng.com\/?p=114"},"modified":"2021-01-05T14:47:07","modified_gmt":"2021-01-05T06:47:07","slug":"part-2-using-serial-port-on-universal-expansion-board","status":"publish","type":"post","link":"https:\/\/www.uniteng.com\/index.php\/2012\/12\/25\/part-2-using-serial-port-on-universal-expansion-board\/","title":{"rendered":"Part 2: 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<ul type=\"disc\">\n<li><a title=\"Raspberry Pi\" href=\"http:\/\/www.raspberrypi.org\" target=\"_blank\" rel=\"noopener\">Raspberry Pi<\/a><\/li>\n<\/ul>\n<h2><strong>Using Serial Port with the Raspberry Pi &#8211; Getting all Linux Kernel outputs via Serial Port<br \/>\n<\/strong><\/h2>\n<p>At first, we need to attach  Raspberry Pi and MAX 3232 Pmod Module to the Universal Expansion Board.<br \/>\n<a href=\"https:\/\/www.uniteng.com\/index.php\/2012\/12\/25\/114\/rpi-rs232-to-computer\/\" rel=\"attachment wp-att-125\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/RPI-RS232-to-Computer.png\" alt=\"RPI RS232 to Computer\" width=\"1024\" height=\"726\" class=\"alignnone size-full wp-image-125\" srcset=\"https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/RPI-RS232-to-Computer.png 1024w, https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/RPI-RS232-to-Computer-300x212.png 300w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<ol>\n<li value=\"1\"><strong>CPLD Configuration<\/strong><\/li>\n<p>This part is pretty easy since we only need to map the UART to the MAX 3232 Pmod using the CPLD. The following Verilog code can implement the idea:<\/p>\n<pre class=\"brush:cpp;\">\r\nmodule RS232(RXD_in,TXD_in,RXD_out,TXD_out);\r\n\r\ninput   RXD_in, TXD_in;\r\noutput  RXD_out,TXD_out;\r\n\r\nassign RXD_out = RXD_in;\r\nassign TXD_out = TXD_in;\r\n\r\nendmodule\r\n<\/pre>\n<p>Navigate to Quartus  -> Assignments -> 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-2-using-serial-port-on-universal-expansion-board\/rpi-rs232-to-computer-cpld\/\" rel=\"attachment wp-att-134\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/RPI-RS232-to-Computer-CPLD.png\" alt=\"RPI RS232 to Computer CPLD\" width=\"751\" height=\"102\" class=\"alignnone size-full wp-image-134\" srcset=\"https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/RPI-RS232-to-Computer-CPLD.png 751w, https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/RPI-RS232-to-Computer-CPLD-300x40.png 300w\" sizes=\"auto, (max-width: 751px) 100vw, 751px\" \/><\/a><br \/>\nWe can flash the design into the CPLD right now.<\/p>\n<li value=\"2\"><strong>Testing<\/strong><\/li>\n<p>Connecting the MAX 3232 Pmod Bord to the Serial Port of the computer. 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-2-using-serial-port-on-universal-expansion-board\/rpi-rs232-to-computer-rs232-setting\/\" rel=\"attachment wp-att-140\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/RPI-RS232-to-Computer-RS232-Setting.png\" alt=\"RPI RS232 to Computer RS232 Setting\" width=\"359\" height=\"173\" class=\"alignnone size-full wp-image-140\" srcset=\"https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/RPI-RS232-to-Computer-RS232-Setting.png 359w, https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/RPI-RS232-to-Computer-RS232-Setting-300x144.png 300w\" sizes=\"auto, (max-width: 359px) 100vw, 359px\" \/><\/a><\/p>\n<p>We almost reach the final stage, let us turn on the board.<\/p>\n<p>The Serial Port Terminal will print out following information:<\/p>\n<p><a href=\"https:\/\/www.uniteng.com\/index.php\/2012\/12\/25\/part-2-using-serial-port-on-universal-expansion-board\/rpi-rs232-to-computer-rs232-output\/\" rel=\"attachment wp-att-141\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/RPI-RS232-to-Computer-RS232-Output.png\" alt=\"RPI RS232 to Computer RS232 Output\" width=\"1158\" height=\"892\" class=\"alignnone size-full wp-image-141\" srcset=\"https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/RPI-RS232-to-Computer-RS232-Output.png 1158w, https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/RPI-RS232-to-Computer-RS232-Output-300x231.png 300w, https:\/\/www.uniteng.com\/wp-content\/uploads\/2012\/12\/RPI-RS232-to-Computer-RS232-Output-1024x788.png 1024w\" sizes=\"auto, (max-width: 1158px) 100vw, 1158px\" \/><\/a>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Prerequisites: RaspberryPi Universal Expansion Board MAX 3232 Pmod Board (Page 5) Raspberry Pi Using Serial Port with the Raspberry Pi &#8211; Getting all Linux Kernel outputs via Serial Port At first, we need to attach Raspberry Pi and MAX 3232 Pmod Module to the Universal Expansion Board. CPLD Configuration This part is pretty easy since [&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-114","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) Raspberry Pi Using Serial Port with the Raspberry Pi &#8211; Getting all Linux Kernel outputs via Serial Port At first, we need to attach Raspberry Pi and MAX 3232 Pmod Module to the Universal Expansion Board. CPLD Configuration This part is pretty easy since&hellip;","_links":{"self":[{"href":"https:\/\/www.uniteng.com\/index.php\/wp-json\/wp\/v2\/posts\/114","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=114"}],"version-history":[{"count":0,"href":"https:\/\/www.uniteng.com\/index.php\/wp-json\/wp\/v2\/posts\/114\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.uniteng.com\/index.php\/wp-json\/wp\/v2\/media?parent=114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.uniteng.com\/index.php\/wp-json\/wp\/v2\/categories?post=114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.uniteng.com\/index.php\/wp-json\/wp\/v2\/tags?post=114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}