{"id":33,"date":"2008-04-07T15:08:14","date_gmt":"2008-04-07T21:08:14","guid":{"rendered":"http:\/\/blog.blockos.org\/?p=86"},"modified":"2008-04-07T15:08:14","modified_gmt":"2008-04-07T21:08:14","slug":"micro-sdisco","status":"publish","type":"post","link":"https:\/\/blog.blockos.org\/?p=33","title":{"rendered":"Micro SDisco"},"content":{"rendered":"<p>Some months ago, I bought a <a href=\"http:\/\/www.4dsystems.com.au\/prod.php?id=22\">4DSystem\u2019s \u00b5DRIVE-uSD-G1<\/a> (microDRIVE) from <a href=\"http:\/\/www.sparkfun.com\/commerce\/product_info.php?products_id=8567\" target=\"_blank\">Sparkfun<\/a>. It&#8217;s basically a serial module which let you access a microSD  memory card (from 512Mb to 2Gig). You may wonder why use an external module as SD cards have a SPI interface? The main reason is &#8230; laziness. All file-system operations are performed by the module. So why bother coding fat16 support or whatever? Unfortunately, the current microDRIVE firmware only supports raw access.<\/p>\n<p><a href=\"http:\/\/blog.blockos.org\/wp-content\/uploads\/2008\/04\/00007.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-87\" title=\"00007\" src=\"http:\/\/blog.blockos.org\/wp-content\/uploads\/2008\/04\/00007.png\" alt=\"Arduino with 4D System\\'s uDRIVE-uSD-G1\" width=\"384\" height=\"300\" \/><\/a><\/p>\n<p>Anyway, I wrote a small module for the current firmware. It was implemented as a template in order to support various serial implementations. The serial class must provide the following methods :<\/p>\n<ul>\n<li>uint8_t read()<\/li>\n<li>void print(uint8_t)<\/li>\n<li>int available()<\/li>\n<\/ul>\n<p>It&#8217;d have been better if all the serial implementations derived from a same interface. But as I didn&#8217;t want to modify the base Arduino code (and as i said earlier, because I&#8217;m lazy), I went for the easy\/brutal way. And you&#8217;d probably never have more than one microDRIVE. At least you want raid \ud83d\ude00<\/p>\n<p>I tested <a href=\"http:\/\/www.arduino.cc\" target=\"_blank\">Arduino<\/a>&#8216;s <a href=\"http:\/\/www.arduino.cc\/en\/Serial\/Begin\" target=\"_blank\">HardwareSerial<\/a> and <a href=\"http:\/\/www.arduino.cc\/en\/Reference\/SoftwareSerial\" target=\"_blank\">SoftwareSerial<\/a>,   as long as <a href=\"http:\/\/www.ladyada.net\/\" target=\"_blank\">ladyada&#8217;s<\/a> <a href=\"http:\/\/www.ladyada.net\/make\/eshield\/download.html\" target=\"_blank\">AFSoftSerial<\/a>. None of the software implementations work \ud83d\ude10 Only soft read is working (hardware tx was used). As software serial is working for the serial LCD, I think the problem might be the autobaud detection during microDRIVE initialization&#8230; Or not&#8230;<\/p>\n<ul>\n<li><a href=\"http:\/\/blockos.org\/releases\/uDRIVE_uSD_G1\/uDRIVE_uSD_G1.h\" target=\"_blank\">[Code]<\/a><\/li>\n<li><a href=\"http:\/\/blockos.org\/releases\/uDRIVE_uSD_G1\/doc\/\">[Documentation]<\/a><\/li>\n<\/ul>\n<p>Be careful! There&#8217;s a bug in the rev1 firmware. The internal memory address is not incremented to the next sector block after a write operation. It was corrected in the rev2.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some months ago, I bought a 4DSystem\u2019s \u00b5DRIVE-uSD-G1 (microDRIVE) from Sparkfun. It&#8217;s basically a serial module which let you access a microSD memory card (from 512Mb to 2Gig). You may wonder why use an external module as SD cards have a SPI interface? The main reason is &#8230; laziness. All\u2026 <a class=\"continue-reading-link\" href=\"https:\/\/blog.blockos.org\/?p=33\">Continue reading<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7,3],"tags":[8,26,27,13],"_links":{"self":[{"href":"https:\/\/blog.blockos.org\/index.php?rest_route=\/wp\/v2\/posts\/33"}],"collection":[{"href":"https:\/\/blog.blockos.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.blockos.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.blockos.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.blockos.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=33"}],"version-history":[{"count":0,"href":"https:\/\/blog.blockos.org\/index.php?rest_route=\/wp\/v2\/posts\/33\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.blockos.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=33"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.blockos.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=33"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.blockos.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=33"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}