{"id":1894,"date":"2024-10-05T21:11:07","date_gmt":"2024-10-05T21:11:07","guid":{"rendered":"http:\/\/tomblog.firstsolo.net\/?p=1894"},"modified":"2024-10-05T21:11:08","modified_gmt":"2024-10-05T21:11:08","slug":"making-an-arduino-act-like-an-axe027","status":"publish","type":"post","link":"http:\/\/tomblog.firstsolo.net\/index.php\/making-an-arduino-act-like-an-axe027\/","title":{"rendered":"Making an Arduino act like an AXE027"},"content":{"rendered":"\n<p>Today I wanted to modify the firmware in a PICAXE microcontroller. Downloading the IDE and compiling the code was easy enough, but you have to have a special AXE027 USB to serial converter to get the code onto the microcontroller. Any USB to TTL level serial converter will do if only it inverts the usual TTL serial levels, i.e. the AXE027 uses 0V for logic 1 and 5V for logic 0.<\/p>\n\n\n\n<p>Once I understood the problem, the solution was easy. Program an Arduino (of which I have many on hand) to treat its own serial pins as digital I\/O pins whose logical sense can be inverted and pipe the I\/O through to\/from another pair of pins.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>void setup() {\n  \/\/ set up my serial pins as digital I\/O\n  pinMode(0, INPUT);\n  pinMode(1, OUTPUT);\n  \/\/ set up two other pins for interfacing with the PICAXE\n  pinMode(2, OUTPUT);\n  pinMode(3, INPUT);\n}\n\nvoid loop() {\n  \/\/ act as a man in the middle inverting signals\n  digitalWrite(2, !digitalRead(0));\n  digitalWrite(1, !digitalRead(3));\n}\n<\/code><\/pre>\n\n\n\n<p>That&#8217;s it. Now Arduino pin 2 goes to Serial In on the PICAXE and Arduino pin 3 goes to Serial Out.<\/p>\n\n\n\n<p>You also have to connect Arduino ground to PICAXE ground and the PICAXE can use the Arduino&#8217;s 5V if it doesn&#8217;t have its own.<\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li class=\"share-facebook\"><a rel=\"nofollow\" class=\"share-facebook sd-button share-icon\" href=\"http:\/\/tomblog.firstsolo.net\/index.php\/making-an-arduino-act-like-an-axe027\/?share=facebook\" target=\"_blank\" title=\"Share on Facebook\" id=\"sharing-facebook-1894\"><span>Facebook<\/span><\/a><\/li><li class=\"share-twitter\"><a rel=\"nofollow\" class=\"share-twitter sd-button share-icon\" href=\"http:\/\/tomblog.firstsolo.net\/index.php\/making-an-arduino-act-like-an-axe027\/?share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\" id=\"sharing-twitter-1894\"><span>Twitter<\/span><\/a><\/li><li class=\"share-google-plus-1\"><a rel=\"nofollow\" class=\"share-google-plus-1 sd-button share-icon\" href=\"http:\/\/tomblog.firstsolo.net\/index.php\/making-an-arduino-act-like-an-axe027\/?share=google-plus-1\" target=\"_blank\" title=\"Click to share on Google+\" id=\"sharing-google-1894\"><span>Google<\/span><\/a><\/li><li class=\"share-reddit\"><a rel=\"nofollow\" class=\"share-reddit sd-button share-icon\" href=\"http:\/\/tomblog.firstsolo.net\/index.php\/making-an-arduino-act-like-an-axe027\/?share=reddit\" target=\"_blank\" title=\"Click to share on Reddit\"><span>Reddit<\/span><\/a><\/li><li class=\"share-pocket\"><a rel=\"nofollow\" class=\"share-pocket sd-button share-icon\" href=\"http:\/\/tomblog.firstsolo.net\/index.php\/making-an-arduino-act-like-an-axe027\/?share=pocket\" target=\"_blank\" title=\"Click to share on Pocket\"><span>Pocket<\/span><\/a><\/li><li><a href=\"#\" class=\"sharing-anchor sd-button share-more\"><span>More<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><div class=\"sharing-hidden\"><div class=\"inner\" style=\"display: none;\"><ul><li class=\"share-tumblr\"><a rel=\"nofollow\" class=\"share-tumblr sd-button share-icon\" href=\"http:\/\/tomblog.firstsolo.net\/index.php\/making-an-arduino-act-like-an-axe027\/?share=tumblr\" target=\"_blank\" title=\"Click to share on Tumblr\"><span>Tumblr<\/span><\/a><\/li><li class=\"share-stumbleupon\"><a rel=\"nofollow\" class=\"share-stumbleupon sd-button share-icon\" href=\"http:\/\/tomblog.firstsolo.net\/index.php\/making-an-arduino-act-like-an-axe027\/?share=stumbleupon\" target=\"_blank\" title=\"Click to share on StumbleUpon\"><span>StumbleUpon<\/span><\/a><\/li><li class=\"share-end\"><\/li><li class=\"share-pinterest\"><a rel=\"nofollow\" class=\"share-pinterest sd-button share-icon\" href=\"http:\/\/tomblog.firstsolo.net\/index.php\/making-an-arduino-act-like-an-axe027\/?share=pinterest\" target=\"_blank\" title=\"Click to share on Pinterest\"><span>Pinterest<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Today I wanted to modify the firmware in a PICAXE microcontroller. Downloading the IDE and compiling the code was easy enough, but you have to have a special AXE027 USB to serial converter to get the code onto the microcontroller. &hellip; <a href=\"http:\/\/tomblog.firstsolo.net\/index.php\/making-an-arduino-act-like-an-axe027\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li class=\"share-facebook\"><a rel=\"nofollow\" class=\"share-facebook sd-button share-icon\" href=\"http:\/\/tomblog.firstsolo.net\/index.php\/making-an-arduino-act-like-an-axe027\/?share=facebook\" target=\"_blank\" title=\"Share on Facebook\" id=\"sharing-facebook-1894\"><span>Facebook<\/span><\/a><\/li><li class=\"share-twitter\"><a rel=\"nofollow\" class=\"share-twitter sd-button share-icon\" href=\"http:\/\/tomblog.firstsolo.net\/index.php\/making-an-arduino-act-like-an-axe027\/?share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\" id=\"sharing-twitter-1894\"><span>Twitter<\/span><\/a><\/li><li class=\"share-google-plus-1\"><a rel=\"nofollow\" class=\"share-google-plus-1 sd-button share-icon\" href=\"http:\/\/tomblog.firstsolo.net\/index.php\/making-an-arduino-act-like-an-axe027\/?share=google-plus-1\" target=\"_blank\" title=\"Click to share on Google+\" id=\"sharing-google-1894\"><span>Google<\/span><\/a><\/li><li class=\"share-reddit\"><a rel=\"nofollow\" class=\"share-reddit sd-button share-icon\" href=\"http:\/\/tomblog.firstsolo.net\/index.php\/making-an-arduino-act-like-an-axe027\/?share=reddit\" target=\"_blank\" title=\"Click to share on Reddit\"><span>Reddit<\/span><\/a><\/li><li class=\"share-pocket\"><a rel=\"nofollow\" class=\"share-pocket sd-button share-icon\" href=\"http:\/\/tomblog.firstsolo.net\/index.php\/making-an-arduino-act-like-an-axe027\/?share=pocket\" target=\"_blank\" title=\"Click to share on Pocket\"><span>Pocket<\/span><\/a><\/li><li><a href=\"#\" class=\"sharing-anchor sd-button share-more\"><span>More<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><div class=\"sharing-hidden\"><div class=\"inner\" style=\"display: none;\"><ul><li class=\"share-tumblr\"><a rel=\"nofollow\" class=\"share-tumblr sd-button share-icon\" href=\"http:\/\/tomblog.firstsolo.net\/index.php\/making-an-arduino-act-like-an-axe027\/?share=tumblr\" target=\"_blank\" title=\"Click to share on Tumblr\"><span>Tumblr<\/span><\/a><\/li><li class=\"share-stumbleupon\"><a rel=\"nofollow\" class=\"share-stumbleupon sd-button share-icon\" href=\"http:\/\/tomblog.firstsolo.net\/index.php\/making-an-arduino-act-like-an-axe027\/?share=stumbleupon\" target=\"_blank\" title=\"Click to share on StumbleUpon\"><span>StumbleUpon<\/span><\/a><\/li><li class=\"share-end\"><\/li><li class=\"share-pinterest\"><a rel=\"nofollow\" class=\"share-pinterest sd-button share-icon\" href=\"http:\/\/tomblog.firstsolo.net\/index.php\/making-an-arduino-act-like-an-axe027\/?share=pinterest\" target=\"_blank\" title=\"Click to share on Pinterest\"><span>Pinterest<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div><\/div><\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/tomblog.firstsolo.net\/index.php\/wp-json\/wp\/v2\/posts\/1894"}],"collection":[{"href":"http:\/\/tomblog.firstsolo.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/tomblog.firstsolo.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/tomblog.firstsolo.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/tomblog.firstsolo.net\/index.php\/wp-json\/wp\/v2\/comments?post=1894"}],"version-history":[{"count":1,"href":"http:\/\/tomblog.firstsolo.net\/index.php\/wp-json\/wp\/v2\/posts\/1894\/revisions"}],"predecessor-version":[{"id":1895,"href":"http:\/\/tomblog.firstsolo.net\/index.php\/wp-json\/wp\/v2\/posts\/1894\/revisions\/1895"}],"wp:attachment":[{"href":"http:\/\/tomblog.firstsolo.net\/index.php\/wp-json\/wp\/v2\/media?parent=1894"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/tomblog.firstsolo.net\/index.php\/wp-json\/wp\/v2\/categories?post=1894"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/tomblog.firstsolo.net\/index.php\/wp-json\/wp\/v2\/tags?post=1894"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}