{"id":6744,"date":"2015-03-30T15:15:57","date_gmt":"2015-03-30T20:15:57","guid":{"rendered":"http:\/\/www.multitech.net\/developer\/?page_id=6744"},"modified":"2015-12-10T08:31:45","modified_gmt":"2015-12-10T14:31:45","slug":"mtac-gpio-usage","status":"publish","type":"page","link":"https:\/\/www.multitech.net\/developer\/software\/mlinux\/using-mlinux\/mlinux-using-accessory-cards\/mtac-gpio-usage\/","title":{"rendered":"MTAC-GPIO Usage"},"content":{"rendered":"<div class=\"note\">Hardware specific information for this card is available on the <a href='https:\/\/www.multitech.net\/developer\/products\/multiconnect-conduit-platform\/accessory-cards\/mtac-gpio\/' title='MTAC-GPIO'>MTAC-GPIO<\/a> page.<\/div>\n<p>The GPIO accessory card provides:<\/p>\n<ul>\n<li>4 digital inputs (<code>din0-din3<\/code>)<\/li>\n<li>4 digital outputs (<code>dout0-dout3<\/code>)<\/li>\n<li>3 analog inputs (<code>adc0-adc2<\/code>)<\/li>\n<li>2 LEDs (<code>led1, led2<\/code>)<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<div>\n<div class=\"tablenoborder\">\n<table id=\"referenceID__table_w2v_vd2_lq\" summary=\"\" border=\"1\" frame=\"border\" rules=\"all\" cellspacing=\"0\" cellpadding=\"4\">\n<thead align=\"left\">\n<tr>\n<th class=\"cellrowborder\" id=\"d2178e49\" valign=\"top\" width=\"20.11385199240987%\">Attribute<\/th>\n<th class=\"cellrowborder\" id=\"d2178e52\" valign=\"top\" width=\"18.975332068311197%\">Connector Pin<\/th>\n<th class=\"cellrowborder\" id=\"d2178e55\" valign=\"top\" width=\"60.91081593927894%\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td class=\"cellrowborder\" headers=\"d2178e49 d2178e52 d2178e55 \" colspan=\"3\" valign=\"top\"><strong>Analog inputs<\/strong><\/td>\n<\/tr>\n<tr>\n<td class=\"cellrowborder\" headers=\"d2178e49 \" valign=\"top\" width=\"20.11385199240987%\">adc0<\/td>\n<td class=\"cellrowborder\" headers=\"d2178e52 \" valign=\"top\" width=\"18.975332068311197%\">6<\/td>\n<td class=\"cellrowborder\" headers=\"d2178e55 \" valign=\"top\" width=\"60.91081593927894%\">Reads data from the Analog Input 0 pin and triggers a new conversion (0 &#8211; 4096 decimal (0xFFFh))<\/td>\n<\/tr>\n<tr>\n<td class=\"cellrowborder\" headers=\"d2178e49 \" valign=\"top\" width=\"20.11385199240987%\">adc1<\/td>\n<td class=\"cellrowborder\" headers=\"d2178e52 \" valign=\"top\" width=\"18.975332068311197%\">7<\/td>\n<td class=\"cellrowborder\" headers=\"d2178e55 \" valign=\"top\" width=\"60.91081593927894%\">Reads data from the Analog Input 1 pin and triggers a new conversion (0 &#8211; 4096 decimal (0xFFFh))<\/td>\n<\/tr>\n<tr>\n<td class=\"cellrowborder\" headers=\"d2178e49 \" valign=\"top\" width=\"20.11385199240987%\">adc2<\/td>\n<td class=\"cellrowborder\" headers=\"d2178e52 \" valign=\"top\" width=\"18.975332068311197%\">8<\/td>\n<td class=\"cellrowborder\" headers=\"d2178e55 \" valign=\"top\" width=\"60.91081593927894%\">Reads data from the Analog Input 2 pin and triggers a new conversion\u00a0(0 &#8211; 4096 decimal (0xFFFh))<\/td>\n<\/tr>\n<tr>\n<td class=\"cellrowborder\" headers=\"d2178e49 d2178e52 d2178e55 \" colspan=\"3\" valign=\"top\"><strong>Digital inputs<\/strong><\/td>\n<\/tr>\n<tr>\n<td class=\"cellrowborder\" headers=\"d2178e49 \" valign=\"top\" width=\"20.11385199240987%\">din0<\/td>\n<td class=\"cellrowborder\" headers=\"d2178e52 \" valign=\"top\" width=\"18.975332068311197%\">1<\/td>\n<td class=\"cellrowborder\" headers=\"d2178e55 \" valign=\"top\" width=\"60.91081593927894%\">Reads the state of the External Input 0 pin<\/td>\n<\/tr>\n<tr>\n<td class=\"cellrowborder\" headers=\"d2178e49 \" valign=\"top\" width=\"20.11385199240987%\">din1<\/td>\n<td class=\"cellrowborder\" headers=\"d2178e52 \" valign=\"top\" width=\"18.975332068311197%\">2<\/td>\n<td class=\"cellrowborder\" headers=\"d2178e55 \" valign=\"top\" width=\"60.91081593927894%\">Reads the state of the External Input 1 pin<\/td>\n<\/tr>\n<tr>\n<td class=\"cellrowborder\" headers=\"d2178e49 \" valign=\"top\" width=\"20.11385199240987%\">din2<\/td>\n<td class=\"cellrowborder\" headers=\"d2178e52 \" valign=\"top\" width=\"18.975332068311197%\">3<\/td>\n<td class=\"cellrowborder\" headers=\"d2178e55 \" valign=\"top\" width=\"60.91081593927894%\">Reads the state of the External Input 2 pin<\/td>\n<\/tr>\n<tr>\n<td class=\"cellrowborder\" headers=\"d2178e49 \" valign=\"top\" width=\"20.11385199240987%\">din3<\/td>\n<td class=\"cellrowborder\" headers=\"d2178e52 \" valign=\"top\" width=\"18.975332068311197%\">4<\/td>\n<td class=\"cellrowborder\" headers=\"d2178e55 \" valign=\"top\" width=\"60.91081593927894%\">Reads the state of the External Input 3 pin<\/td>\n<\/tr>\n<tr>\n<td class=\"cellrowborder\" headers=\"d2178e49 d2178e52 d2178e55 \" colspan=\"3\" valign=\"top\"><strong>Digital outputs<\/strong><\/td>\n<\/tr>\n<tr>\n<td class=\"cellrowborder\" headers=\"d2178e49 \" valign=\"top\" width=\"20.11385199240987%\">dout0<\/td>\n<td class=\"cellrowborder\" headers=\"d2178e52 \" valign=\"top\" width=\"18.975332068311197%\">10<\/td>\n<td class=\"cellrowborder\" headers=\"d2178e55 \" valign=\"top\" width=\"60.91081593927894%\">Sets or clears the External Output 0 output pin<\/td>\n<\/tr>\n<tr>\n<td class=\"cellrowborder\" headers=\"d2178e49 \" valign=\"top\" width=\"20.11385199240987%\">dout1<\/td>\n<td class=\"cellrowborder\" headers=\"d2178e52 \" valign=\"top\" width=\"18.975332068311197%\">11<\/td>\n<td class=\"cellrowborder\" headers=\"d2178e55 \" valign=\"top\" width=\"60.91081593927894%\">Sets or clears the External Output 1 output pin<\/td>\n<\/tr>\n<tr>\n<td class=\"cellrowborder\" headers=\"d2178e49 \" valign=\"top\" width=\"20.11385199240987%\">dout2<\/td>\n<td class=\"cellrowborder\" headers=\"d2178e52 \" valign=\"top\" width=\"18.975332068311197%\">12<\/td>\n<td class=\"cellrowborder\" headers=\"d2178e55 \" valign=\"top\" width=\"60.91081593927894%\">Sets or clears the External Output 2 output pin<\/td>\n<\/tr>\n<tr>\n<td class=\"cellrowborder\" headers=\"d2178e49 \" valign=\"top\" width=\"20.11385199240987%\">dout3<\/td>\n<td class=\"cellrowborder\" headers=\"d2178e52 \" valign=\"top\" width=\"18.975332068311197%\">13<\/td>\n<td class=\"cellrowborder\" headers=\"d2178e55 \" valign=\"top\" width=\"60.91081593927894%\">Sets or clears the External Output 3 output pin<\/td>\n<\/tr>\n<tr>\n<td class=\"cellrowborder\" headers=\"d2178e49 \" colspan=\"3\" valign=\"top\" width=\"20.11385199240987%\"><strong>LEDs<\/strong><\/td>\n<\/tr>\n<tr>\n<td class=\"cellrowborder\" headers=\"d2178e49 \" valign=\"top\" width=\"20.11385199240987%\">led1<\/td>\n<td class=\"cellrowborder\" headers=\"d2178e52 \" valign=\"top\" width=\"18.975332068311197%\"><\/td>\n<td class=\"cellrowborder\" headers=\"d2178e55 \" valign=\"top\" width=\"60.91081593927894%\">Turns the led on or off<\/td>\n<\/tr>\n<tr>\n<td class=\"cellrowborder\" headers=\"d2178e49 \" valign=\"top\" width=\"20.11385199240987%\">led2<\/td>\n<td class=\"cellrowborder\" headers=\"d2178e52 \" valign=\"top\" width=\"18.975332068311197%\"><\/td>\n<td class=\"cellrowborder\" headers=\"d2178e55 \" valign=\"top\" width=\"60.91081593927894%\">Turns the led on or off<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>&nbsp;<\/p>\n<p><strong>Use the provided <a href='https:\/\/www.multitech.net\/developer\/software\/mlinux\/using-mlinux\/utilities\/io-control-using-mts-io\/' title='I\/O Control Using mts-io'>mts-io-sysfs utility<\/a> to interface with the accessory card.<\/strong><\/p>\n<p><strong>Examples:<\/strong><\/p>\n<p>Read a digital input:<\/p>\n<pre class=\"brush:shell\">$ mts-io-sysfs show gpiob\/din0<\/pre>\n<p>Set a digital output:<\/p>\n<pre class=\"brush:shell\">$ mts-io-sysfs store gpiob\/dout0 1<\/pre>\n<p>Read an analog input:<\/p>\n<pre class=\"brush:shell\">$ mts-io-sysfs show gpiob\/adc0<\/pre>\n<p>Set an LED<\/p>\n<pre class=\"brush:shell\">$ mts-io-sysfs store gpiob\/led1 1<\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Hardware specific information for this card is available on the page. The GPIO accessory card provides: 4 digital inputs (din0-din3) 4 digital outputs (dout0-dout3) 3 analog inputs (adc0-adc2) 2 LEDs (led1, led2) &nbsp; Attribute Connector Pin Description Analog inputs adc0 6 Reads data from the Analog Input 0 pin and triggers a new conversion (0 [&hellip;]<\/p>\n","protected":false},"author":1144,"featured_media":0,"parent":7909,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-6744","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/6744","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/users\/1144"}],"replies":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/comments?post=6744"}],"version-history":[{"count":17,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/6744\/revisions"}],"predecessor-version":[{"id":7036,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/6744\/revisions\/7036"}],"up":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/7909"}],"wp:attachment":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/media?parent=6744"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}