{"id":2091,"date":"2025-05-23T21:00:53","date_gmt":"2025-05-23T12:00:53","guid":{"rendered":"https:\/\/rfsec.ddns.net\/db\/?p=2091"},"modified":"2025-06-30T22:01:29","modified_gmt":"2025-06-30T13:01:29","slug":"windows-ft232h-st7789","status":"publish","type":"post","link":"https:\/\/rfsec.ddns.net\/db\/?p=2091","title":{"rendered":"Windows\u304b\u3089I2C\u30c7\u30d0\u30a4\u30b9\u3092\u5229\u7528"},"content":{"rendered":"\n<p>I\/F \u30dc\u30fc\u30c9\u3068\u3057\u3066CH341T\u307e\u305f\u306fFT232H\u3092\u5229\u7528\u3059\u308b\u3002<\/p>\n\n\n\n<p>Raspberry pi\u3084ESP\u30b7\u30ea\u30fc\u30ba\u306a\u3069\u306e\u7d44\u307f\u8fbc\u307f\u30b7\u30b9\u30c6\u30e0\u306e\u5236\u5fa1\u306b\u9069\u3057\u305f\u30de\u30a4\u30b3\u30f3\u306b\u306f\u3001GPIO,I2C\u3084SPI\u306a\u3069\u306e\u30dd\u30fc\u30c8\u304c\u5099\u308f\u3063\u3066\u308b\u306e\u304c\u7279\u5fb4\u306e\u4e00\u3064\u3067\u3059\u3002\u3053\u308c\u3089\u306eI\/F\u3092\u901a\u3058\u3066\u69d8\u3005\u306a\u30bb\u30f3\u30b5\u30fc\uff08\u4f8b\u3048\u3070\u6e29\u5ea6\u3001\u6e7f\u5ea6\u3001\u6c17\u5727\u306a\u3069\uff09\u3084\u5c0f\u578b\u8868\u793a\u5668\u3001PWM\u5236\u5fa1\u5668\u306a\u3069\u306b\u63a5\u7d9a\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4e00\u65b9\u3001WindowsPC\u306a\u3069\u306b\u5e83\u304f\u4f7f\u308f\u308c\u3066\u3044\u308bx86\u306b\u306f\u3001\u6b8b\u5ff5\u306a\u304c\u3089\u30bb\u30f3\u30b5\u30fc\u306a\u3069\u306e\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u3092\u76f4\u63a5\u5236\u5fa1\u53ef\u80fd\u306a\u30dd\u30fc\u30c8\u304c\u3042\u308a\u307e\u305b\u3093\u3002 PC\u306b\u306fUSB\u30dd\u30fc\u30c8\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u3053\u306eUSB\u30dd\u30fc\u30c8\u304b\u3089\u30b7\u30ea\u30a2\u30eb\u3084I2C\u3078\u5909\u63db\u3059\u308b\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u3092\u63a2\u3057\u3066\u307f\u305f\u3089CH341T\u304camazon\u306a\u3069\u3067\u5b89\u4fa1\u306b\u8ca9\u58f2\u3055\u308c\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u305d\u3053\u3067\u3001USB\u304b\u3089CH341T\u3068FT232H\u7d4c\u7531\u3067\u3001\u6b21\u306e\u3088\u3046\u306a\u6a5f\u80fd\u3092\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u3002<br>(1)AHT20\u3067\u6e29\u5ea6\u3001\u6e7f\u5ea6\u306e\u30c7\u30fc\u30bf\u3092\u53d6\u5f97<br>(2)OLED\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4SSD1306\u3078\u6587\u5b57\u8868\u793a<br>(3)PCA9685\u3067\u30b5\u30fc\u30dc\u30e2\u30fc\u30bf\u3092\u99c6\u52d5<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/crescentvenus\/USBtoI2C\">https:\/\/github.com\/crescentvenus\/USBtoI2C<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/notebooklm.google.com\/notebook\/c10195e5-a816-47d6-80bc-7efd12e30a8b\/audio\">NotebookLM\u3067\u97f3\u58f0\u306b\u3088\u308b\u89e3\u8aac<\/a><\/p>\n\n\n\n<p><strong><a href=\"https:\/\/learn.adafruit.com\/circuitpython-on-any-computer-with-ft232h\/pinouts\">Power Pins<\/a><\/strong><br>5V &#8211; this is the 5V power from the USB input.<br>GND &#8211; this is the common ground for all power and logic.<br>3V power output &#8211; The new version has a 3.3V power output pin for up to 500mA<br><strong>GPIO Pins<\/strong><br>D4 to D7 &#8211; can be used as either digital inputs or outputs.<br>C0 to C7 &#8211; can be used as either digital inputs or outputs.<br><strong>I2C Pins<\/strong><br>SCL &#8211; the I2C clock signal is on D0.<br>SDA &#8211; the I2C data is on D1+D2.<br><strong>I2C switch<\/strong> &#8211; The new version has a switch that connects D1 and D2 for easy I2C interfacing. Move the switch to ON to use I2C and\/or the STEMMA QT connector. You can then use either D1 or D2 for SDA.<br>On the original version only: Note that there are two pins (D1 and D2) which must be tied together and treated as one to use I2C.<\/p>\n\n\n\n<p><strong>SPI Pins<\/strong><br>SCLK &#8211; the SPI clock signal is on D0.<br>MOSI &#8211; Microcontroller Out, Serial In is on D1.<br>MISO &#8211; Microcontroller In, Serial Out is on D2.<br>CS0 &#8211; Chip Select is on D3. This is not used by Blinka, instead use one of the GPIO pins from above (see example section).<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"841\" height=\"588\" data-id=\"2097\" src=\"https:\/\/rfsec.ddns.net\/db\/wp-content\/uploads\/2025\/05\/FT232H2.jpg\" alt=\"\" class=\"wp-image-2097\" srcset=\"https:\/\/rfsec.ddns.net\/db\/wp-content\/uploads\/2025\/05\/FT232H2.jpg 841w, https:\/\/rfsec.ddns.net\/db\/wp-content\/uploads\/2025\/05\/FT232H2-300x210.jpg 300w, https:\/\/rfsec.ddns.net\/db\/wp-content\/uploads\/2025\/05\/FT232H2-768x537.jpg 768w, https:\/\/rfsec.ddns.net\/db\/wp-content\/uploads\/2025\/05\/FT232H2-624x436.jpg 624w\" sizes=\"auto, (max-width: 841px) 100vw, 841px\" \/><\/figure>\n<\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>ST7789\u30d4\u30f3 FT232H\u30d4\u30f3 \u8aac\u660e <\/p>\n\n\n\n<p>VCC 3.3V \u96fb\u6e90\uff083.3V\u63a8\u5968\u30015V\u306f\u4e0d\u53ef\u306e\u5834\u5408\u3042\u308a\uff09 <\/p>\n\n\n\n<p>GND  \u3000\u3000GND \u30b0\u30e9\u30f3\u30c9 <\/p>\n\n\n\n<p>SCL \u3000\u3000\u3000D0 (SCLK) <\/p>\n\n\n\n<p>SPI\u30af\u30ed\u30c3\u30af\u4fe1\u53f7 \u3000SDA D1 (MOSI) SPI\u30c7\u30fc\u30bf\u5165\u529b\uff08Master Out Slave In\uff09 <\/p>\n\n\n\n<p>RES \u3000\u3000\u3000\u3000D5 \u30ea\u30bb\u30c3\u30c8\u30d4\u30f3 <\/p>\n\n\n\n<p>DC \u3000\u3000\u3000\u3000D6 \u30c7\u30fc\u30bf\/\u30b3\u30de\u30f3\u30c9\u9078\u629e\u30d4\u30f3 <\/p>\n\n\n\n<p>BLK \u3000\u3000\u3000\u30003.3V\u307e\u305f\u306fD7 \u30d0\u30c3\u30af\u30e9\u30a4\u30c8\uff08\u30aa\u30d7\u30b7\u30e7\u30f3\u30013.3V\u307e\u305f\u306fGPIO\u3067\u5236\u5fa1\uff09<\/p>\n\n\n\n<p><strong>CircuitPython Libraries on any Computer with FT232H<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/learn.adafruit.com\/circuitpython-on-any-computer-with-ft232h\/windows\">https:\/\/learn.adafruit.com\/circuitpython-on-any-computer-with-ft232h\/windows<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>GPIO\u30b5\u30f3\u30d7\u30eb<\/strong><\/h2>\n\n\n\n<p><strong>OUTPUT<\/strong>\u3000\u30b5\u30f3\u30d7\u30eb<br>import time<br>import board<br>import digitalio<br><br>led = digitalio.DigitalInOut(board.C0)<br>led.direction = digitalio.Direction.OUTPUT<br><br>while True:<br>    led.value = True<br>    time.sleep(0.5)<br>    led.value = False<br>    time.sleep(0.5)<br><br><strong>INPUT \u30b5\u30f3\u30d7\u30eb<\/strong><br>import board<br>import digitalio<br><br>led = digitalio.DigitalInOut(board.C0)<br>led.direction = digitalio.Direction.OUTPUT<br><br>button = digitalio.DigitalInOut(board.C1)<br>button.direction = digitalio.Direction.INPUT<br><br>while True:<br>    led.value = button.value<br><br><strong>I2C<\/strong>\u30b5\u30f3\u30d7\u30eb<br># SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries<br># SPDX-License-Identifier: MIT<br><br>import time<br><br>import board<br><br>from adafruit_bme280 import basic as adafruit_bme280<br><br># Create sensor object, using the board&#8217;s default I2C bus.<br>i2c = board.I2C()  # uses board.SCL and board.SDA<br># i2c = board.STEMMA_I2C()  # For using the built-in STEMMA QT connector on a microcontroller<br>bme280 = adafruit_bme280.Adafruit_BME280_I2C(i2c)<br><br># OR create sensor object, using the board&#8217;s default SPI bus.<br># import digitalio<br># spi = board.SPI()<br># bme_cs = digitalio.DigitalInOut(board.D10)<br># bme280 = adafruit_bme280.Adafruit_BME280_SPI(spi, bme_cs)<br><br># change this to match the location&#8217;s pressure (hPa) at sea level<br>bme280.sea_level_pressure = 1013.25<br><br>while True:<br>    print(&#8220;\\nTemperature: %0.1f C&#8221; % bme280.temperature)<br>    print(&#8220;Humidity: %0.1f %%&#8221; % bme280.relative_humidity)<br>    print(&#8220;Pressure: %0.1f hPa&#8221; % bme280.pressure)<br>    print(&#8220;Altitude = %0.2f meters&#8221; % bme280.altitude)<br>    time.sleep(2)<br><br><strong>SPI\u30b5\u30f3\u30d7\u30eb<\/strong><br>import board<br>import digitalio<br>import adafruit_rgb_display.ili9341 as ili9341<br>from PIL import Image<br><br># Setup display<br>cs_pin = digitalio.DigitalInOut(board.C0)<br>dc_pin = digitalio.DigitalInOut(board.C1)<br>disp = ili9341.ILI9341(board.SPI(), cs=cs_pin, dc=dc_pin, baudrate=64000000)<br><br># Load image and convert to RGB<br>image = Image.open(&#8216;blinka.bmp&#8217;).convert(&#8216;RGB&#8217;)<br><br># Display it (rotated by 90 deg)<br>disp.image(image, 90)<br><br><br><\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"792\" data-id=\"2100\" src=\"https:\/\/rfsec.ddns.net\/db\/wp-content\/uploads\/2025\/05\/SPI-TFT-1024x792.png\" alt=\"\" class=\"wp-image-2100\" srcset=\"https:\/\/rfsec.ddns.net\/db\/wp-content\/uploads\/2025\/05\/SPI-TFT-1024x792.png 1024w, https:\/\/rfsec.ddns.net\/db\/wp-content\/uploads\/2025\/05\/SPI-TFT-300x232.png 300w, https:\/\/rfsec.ddns.net\/db\/wp-content\/uploads\/2025\/05\/SPI-TFT-768x594.png 768w, https:\/\/rfsec.ddns.net\/db\/wp-content\/uploads\/2025\/05\/SPI-TFT-624x483.png 624w, https:\/\/rfsec.ddns.net\/db\/wp-content\/uploads\/2025\/05\/SPI-TFT.png 1163w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/figure>\n","protected":false},"excerpt":{"rendered":"<p>I\/F \u30dc\u30fc\u30c9\u3068\u3057\u3066CH341T\u307e\u305f\u306fFT232H\u3092\u5229\u7528\u3059\u308b\u3002 Raspberry pi\u3084ESP\u30b7\u30ea\u30fc\u30ba\u306a\u3069\u306e\u7d44\u307f\u8fbc\u307f\u30b7\u30b9\u30c6\u30e0\u306e\u5236\u5fa1\u306b\u9069\u3057\u305f\u30de\u30a4\u30b3\u30f3\u306b\u306f\u3001GPIO,I2C\u3084SPI\u306a\u3069\u306e\u30dd\u30fc\u30c8\u304c\u5099\u308f\u3063\u3066\u308b\u306e\u304c\u7279\u5fb4\u306e\u4e00\u3064\u3067\u3059 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-2091","post","type-post","status-publish","format-standard","hentry","category-make"],"featured_image_src":null,"author_info":{"display_name":"mars","author_link":"https:\/\/rfsec.ddns.net\/db\/?author=1"},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=\/wp\/v2\/posts\/2091","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2091"}],"version-history":[{"count":7,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=\/wp\/v2\/posts\/2091\/revisions"}],"predecessor-version":[{"id":2131,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=\/wp\/v2\/posts\/2091\/revisions\/2131"}],"wp:attachment":[{"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2091"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2091"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2091"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}