{"id":83,"date":"2012-05-24T08:41:07","date_gmt":"2012-05-24T08:41:07","guid":{"rendered":"http:\/\/www.electronic-products-development.com\/?p=83"},"modified":"2022-02-18T15:37:50","modified_gmt":"2022-02-18T15:37:50","slug":"io","status":"publish","type":"post","link":"https:\/\/ibex.tech\/embedded\/microchip\/pic24\/c30-compiler\/io","title":{"rendered":"IO"},"content":{"rendered":"<h4>IO Defines<\/h4>\n<pre><code>\r\n\/\/Output define examples\r\n#define\tMY_OUTPUT\t\t\t_LATD0\r\n#define\tMY_OUTPUT(state)\t\t_LATF0 = state\t\t\/\/&lt;&lt;&lt;This method better for compatibility with with other compilers\r\n#define MY_OUTPUT(state)\t\tLATCbits.LATC1 = state\r\n\r\n\/\/Input define examples\r\n#define\tMY_INPUT\t\t\t_RF2\r\n\r\n\/\/Port define examples\r\n#define DATA_BUS_IP\t\t\tPORTD\r\n#define DATA_BUS_OP(data)\t\tLATD = data\r\n#define DATA_BUS_TRIS(state)\t\tTRISD = state\r\n<\/code><\/pre>\n<h4>Peripheral Pin Select<\/h4>\n<pre><code>\r\n\t\/\/----- INPUTS -----\r\n\t\/\/ASSIGN UART1 RX TO RP23\r\n\tRPINR18bits.U1RXR = 23;\r\n\r\n\t\/\/----- OUTPUTS -----\r\n\t\/\/ASSIGN UART1 TX TO RP22\r\n\tRPOR11bits.RP22R = 3;\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>IO Defines \/\/Output define examples #define MY_OUTPUT _LATD0 #define MY_OUTPUT(state) _LATF0 = state \/\/&lt;&lt;&lt;This method better for compatibility with with other compilers #define MY_OUTPUT(state) LATCbits.LATC1 = state \/\/Input define examples #define MY_INPUT _RF2 \/\/Port define examples #define DATA_BUS_IP PORTD #define DATA_BUS_OP(data) LATD = data #define DATA_BUS_TRIS(state) TRISD = state Peripheral Pin Select \/\/&#8212;&#8211; INPUTS &#8212;&#8211; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-83","post","type-post","status-publish","format-standard","hentry","category-c30-compiler"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts\/83","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/comments?post=83"}],"version-history":[{"count":9,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts\/83\/revisions"}],"predecessor-version":[{"id":556,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts\/83\/revisions\/556"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/media?parent=83"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/categories?post=83"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/tags?post=83"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}