<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>ftdi cable on irq5 test</title><link>https://irq5-7854a1fdb9f4.pages.dev/tag/ftdi-cable/</link><description>Recent content in ftdi cable on irq5 test</description><language>en-us</language><lastBuildDate>Thu, 22 Dec 2016 23:45:00 +0000</lastBuildDate><atom:link href="https://irq5-7854a1fdb9f4.pages.dev/tag/ftdi-cable/feed/" rel="self" type="application/rss+xml"/><item><title>Raspberry Pi Zero as Multiple USB Gadgets</title><link>https://irq5-7854a1fdb9f4.pages.dev/2016/12/raspberry-pi-zero-as-multiple-usb-gadgets/</link><pubDate>Thu, 22 Dec 2016 23:45:00 +0000</pubDate><guid>https://irq5-7854a1fdb9f4.pages.dev/2016/12/raspberry-pi-zero-as-multiple-usb-gadgets/</guid><description>&lt;p>In case you haven&amp;rsquo;t heard, the &lt;a href=https://www.raspberrypi.org/products/pi-zero/ rel=noopener target=_blank class=external>&lt;strong>Raspberry Pi Zero&lt;/strong>&lt;/a> is the smallest, most low-cost device in the Raspberry Pi family,
but it&amp;rsquo;s also the hardest to find.
It has two Micro-B USB ports, one for power and another functions as a dual-role
&lt;a href=https://en.wikipedia.org/wiki/USB_On-The-Go rel=noopener target=_blank class=external>USB OTG&lt;/a> port.&lt;/p>&lt;p>&lt;picture>&lt;img src=https://c1.staticflickr.com/1/131/31623966595_aaa1696c4e_b.jpg alt="Raspberry Pi Zero, back side">&lt;/picture>&lt;/p>&lt;p>One of the more interesting uses for the Raspberry Pi Zero is to get it to behave as a USB device, just like your USB flash drive, for example.&lt;/p>&lt;p>There have been several guides written already,
such as the &lt;a href=https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget rel=noopener target=_blank class=external>Adafruit one&lt;/a>,
but most of them were based on the &lt;a href=http://www.linux-usb.org/gadget/ rel=noopener target=_blank class=external>old kernel gadget drivers&lt;/a>, like &lt;code>g_serial&lt;/code> and &lt;code>g_ether&lt;/code>.
It still works, but not as flexible and likely to be deprecated in future.&lt;/p>&lt;p>&lt;a href="https://irq5-7854a1fdb9f4.pages.dev/2016/12/raspberry-pi-zero-as-multiple-usb-gadgets/#more">Continue reading…&lt;/a>&lt;/p></description></item><item><title>MIDI to USB (Serial) Converter</title><link>https://irq5-7854a1fdb9f4.pages.dev/2011/03/midi-to-usb-serial-converter/</link><pubDate>Sat, 12 Mar 2011 19:37:00 +0000</pubDate><guid>https://irq5-7854a1fdb9f4.pages.dev/2011/03/midi-to-usb-serial-converter/</guid><description>&lt;p>MIDI is actually just serial data at 31,250bps in &lt;a href=http://en.wikipedia.org/wiki/8-N-1 rel=noopener target=_blank class=external>8N1&lt;/a> format that is transmitted over a 5-pin DIN cable. This means you can receive MIDI data from your musical instrument using a serial port, or an &lt;a href=http://www.ftdichip.com/Products/Cables/USBTTLSerial.htm rel=noopener target=_blank class=external>FTDI cable&lt;/a>.&lt;/p>&lt;p>Receiving MIDI data over the FTDI cable doesn&amp;rsquo;t magically turn your USB serial device into a MIDI device - you need to be running a software bridge or a driver that pretends to be a virtual MIDI device emitting these messages. For this purpose, I shall use the &lt;a href=http://www.spikenzielabs.com/SpikenzieLabs/Serial_MIDI.html rel=noopener target=_blank class=external>Serial MIDI Converter&lt;/a> from SpikenzieLabs.&lt;/p>&lt;p>I&amp;rsquo;m using Mac OS X 10.6.6 and the latest Java update, so I didn&amp;rsquo;t need any extra JAR files.&lt;/p>&lt;h1 id=wiring-it-up>Wiring It Up&lt;/h1>&lt;p>The circuit is relatively simple - you need the DIN socket, an opto-isolator, 2 resistors, and optionally a diode. In my case, parts came from a scrap bin, so I used a 330 ohm resistor instead of a 220 ohm for Rb and a 1K for Rd instead of 280 ohms. For the opto-isolator, element14 had some non-RoHS CNY17-2 on sale, so I just used that.&lt;/p>&lt;p>&lt;picture>&lt;img src=https://irq5-7854a1fdb9f4.pages.dev/posts/2011/img/midi_schematic.png alt="MIDI hookup schematic" width=468 height=285>&lt;/picture>&lt;/p>&lt;p>Note that the RXD output is only meant for interfacing with a TTL circuit like an FTDI chip/cable or MAX232 transceiver, not the RS232 serial port directly.&lt;/p>&lt;p>You can find the same circuit diagram (with different values &amp; parts) in the official &lt;a href=http://www.midi.org/techspecs/electrispec.php rel=noopener target=_blank class=external>MIDI Electrical Specification Diagram&lt;/a>.&lt;/p>&lt;p>&lt;a href="https://irq5-7854a1fdb9f4.pages.dev/2011/03/midi-to-usb-serial-converter/#more">Continue reading…&lt;/a>&lt;/p></description></item><item><title>RS232 converter + TTL-232R-3V3</title><link>https://irq5-7854a1fdb9f4.pages.dev/2011/01/rs232-converter--ttl-232r-3v3/</link><pubDate>Tue, 04 Jan 2011 20:45:00 +0000</pubDate><guid>https://irq5-7854a1fdb9f4.pages.dev/2011/01/rs232-converter--ttl-232r-3v3/</guid><description>&lt;p>If you&amp;rsquo;re into microcontrollers like me, you should have an FTDI breakout board or the more handy &lt;a href=http://www.ftdichip.com/Products/Cables/USBTTLSerial.htm rel=noopener target=_blank class=external>FTDI TTL-232R-3V3 cable&lt;/a>. This cable integrates an FTDI USB-to-serial chip and terminates into a 6-pin header, with TTL in/outputs, ready to be interfaced to any microcontroller.&lt;/p>&lt;p>Recently I had to talk to an RS232 port. The voltage used by the RS232 port is anywhere from 7 to 15V (typically), and uses both positive and negative voltages, which cannot be directly interfaced with TTL. Most of my university friends who took microcontroller class previously bought an RS232-to-USB converter, since that&amp;rsquo;s what the trainer board (evaluation board) uses, but not me. So what should I do now?&lt;/p>&lt;p>Using a MAX232 (actually a HIN232) chip and 5 capacitors, I followed the recommended application circuit to build a level shifter. I laid out the circuit on a veroboard with a 6-pin header on one end for the TTL-232R-3v3 cable, and a 2x5 header for the RS232 port.&lt;/p>&lt;p>Since I ripped out many old computers with those serial port headers I decided to use it. The pinout for the RS232 port header is available in many motherboard manuals, including mine. The only pins (usually) of interest are circled. The pins are 2, 3 and 5 for receive, transmit and ground, respectively.&lt;/p>&lt;p>&lt;picture>&lt;source srcset=/posts/2011/img/mb_serial_header.png.webp type=image/webp>&lt;img src=https://irq5-7854a1fdb9f4.pages.dev/posts/2011/img/mb_serial_header.png alt="Motherboard serial header pinout" width=589 height=487>&lt;/picture>&lt;/p>&lt;p>&lt;a href="https://irq5-7854a1fdb9f4.pages.dev/2011/01/rs232-converter--ttl-232r-3v3/#more">Continue reading…&lt;/a>&lt;/p></description></item></channel></rss>