A Tale of Many Divisions – Naive Prime Factorization Across a Handful of Architectures

Compiler Explorer Dissassembly

CNXSoft: Another guest post by blu where he looks at how a small piece of code involving divisions behaves on different architectures. Once upon a time (i.e. the other week) I was giving tips to my 5th-grader how to efficiently compute least common multiples, when it struck me I could do better ‒ I could write a prime factorizer that could be useful to the elementary-school-goers in this house, as well as to the people checking the formers’ homeworks. Moreover, a naive prime factorizer could show kids how computers would carry out algorithms taught in class. There was also a bit of curiosity involved ‒ last time I wrote a prime factorizer I was in high school, and the language was Applesoft BASIC, so 30 years later, armed with a modern C++ arsenal and a supercomputer (by late ‘80s standards), I wondered what one might come up with today, approaching the problem from first principle (sorry, no Euler today). The …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

CH330N is a New USB to Serial Chip in an SOP8 Package


Earlier this month we covered Air602 low cost Arm WiFi module, and while it’s not clear whether it will ever compete with ESP8266 due to software support, some readers noticed an interesting new chip on the corresponding development board: WCH CH330N USB to serial chip with features similar to CH340, but less pins (e.g. DTS, and  CTS are missing), and available in a tiny SOP8 package. CH330N comes with built-in crystal oscillator, and supports baud rate from 50 bps to 2 Mbps. You’ll find more hardware technical details in the datasheet in Chinese. CH330(N) works with CH340/CH341 driver as pointed out by Icenowy Zheng who made a small USB to TTL debug board based on the chip to practice PCB drawing with KiCAD. She also mentioned the USB ID and behavior of CH330 is the same with CH340. CH330 / CH330N chip is still nowhere to be found on Aliexpress, but you can purchase it for around 30 cents in …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

MuxPi Board Relies on NanoPi NEO to Enable Remote Testing of Development Boards

MuxPi Remote Testing Board

Product development often occurs in different location over the world, there may be one team in Asia, and another in Europe and the US. At the beginning, the number of working samples for a board may be limited,  so the project manager may have to decide who gets the boards since those may not be available to all teams. So it would be great if somehow there was a way to do remote testing of boards, so maybe the team in Asia could setup the testbed, used it during there time, and once they are back home, the US team can take over remotely to carry on their own development work on the hardware. That’s exactly what MuxPi board is all about. The solution provide remote access via the Ethernet port of a NanoPi NEO board, and connects to the DUT (Device under Test) via HDMI, Ethernet, USB and other interfaces. The (micro) SD card is muxed to either boot …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

μArt is a Universal USB to UART-TTL Adapter with Safety Features (Crowdfunding)

μArt USB to UART-TTL Adapter

I’ve never had specific issues with USB to TTL debug boards personally, but potentially you could damage the target if you select one with the wrong voltage, and for more advanced use cases often do not include GPIOs. μArt USB to UART-TTL Adapter aims to solve those issue with wide voltage range (1.8 to 5.4V), safety features like galvanic isolation or over-current protection, and one header exposing I/Os. Key features: Universal TTL-UART – 1.8 – 5.4 V, up to 3M speed, standard & non-standard baudrates, pins for handshaking and flashing various MCU families, wide OS-support Galvanic isolation, integrated pull-ups, signal- and power-filters Over-current protection, reverse-polarity protection, ESD protection, mechanical protection Voltage-autosensing, LEDs, GPIOs, software-configurable Dimensions – 58 x 33 x 14 mm Weight – 16 grams Everything is also packaged in a case contrary to most (all) other boards in the market. uART-USB-TLL-Board The developer provides drivers for Windows, Linux, MacOS, etc…, although currently GPIO support only works with Linux …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

Embedded Linux Conference Europe & OpenIoT Summit Europe 2018 Schedule

Embedded Linux Conference OpenIOT Summit Europe 2018

The Embedded Linux Conference & OpenIoT Summit 2018 took place in March of this year in the US, but the European version of the events are now planned to take place on October 21-24 in Edinburg, UK, and the schedule has already been released. So let’s make a virtual schedule to find out more about some of interesting subjects that are covered at the conferences. The conference and summit really only officially start on Monday 22, but there are a few talks on Sunday afternoon too. Sunday, October 21 13:30 – 15:15 – Tutorial: Introduction to Quantum Computing Using Qiskit – Ali Javadi-Abhari, IBM Qiskit is a comprehensive open-source tool for quantum computation. From simple demonstrations of quantum mechanical effects to complicated algorithms for solving problems in AI and chemistry, Qiskit allows users to build and run programs on quantum computers of today. Qiskit is built with modularity and extensibility in mind. This means it is easy to extend its …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

ESP8266 Loader App Allows you to Flash and Debug ESP8266 Boards from Android Smartphones

In case you’d like to flash ESP8266 boards using a phone, you can now do so with ESP8266 Loader app for Android, which also gives you access to the serial console. All you’ll need to an Android smartphone with USB OTG support, a good USB cable, and a few ESP8266 boards such as Wemos D1 mini or NodeMCU. It should also be possible to use a TV box instead. Other listed features: Support any USB chip – CDC/ACM, FTDI, PL2303, CH34X and CP210X Change the SSID & password automatically durring upload No Ads (Pro version) Access to Google Drive storage (Pro version) Multiple upload widgets button (Pro version) That’s a free app with premium feature, which also means it’s not open source, so any new features would have to be implemented by the developer. I asked him whether ESP32 boards were also supported, but he answered the app only works with ESP8266 boards. This also got me interested in whether …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

WCH CH340E is a Tiny 10-Pin Serial to USB Chip

I own a bunch of  USB to serial debug board based on CH340G/T or PL2303HX, and all include a crystal on the board with the exception of Hardkernel’s USB-UART module kit based on CP2104 (QFN24 package) working without crystal, hence smaller than most, but a bit more expensive than most. WCH has just released a new form version of their CH340 that does not require a crystal, comes in a tiny (3x3mm) MSOP10 package, and costs about 42 cents on Electrodragon (5 pieces). You’ll also find it for as low as 1 CNY ($0.15) on 1688.com. CH340E is slightly more expensive than CH340G, but considering you don’t need a crystal, and it will take less space on your PCB, total BoM cost for this USB to TTL function should be lower. Electrodragon reports that only two external parts are required, and they tested it up to 150,000 baud to flash ESP8266. CH340E is software compatible with CH340G, so the same …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

Embedded Linux Conference & Open Source Summit Europe 2017 Schedule

The Embedded Linux Conference & IoT summit 2017 took place in the US earlier this year in February, but there will soon be a similar event with the Embedded Linux Conference *& Open Source Summit Europe 2017 to take up in Europe on October 23 – 25 in Prague, Czech Republic, and the Linux Foundation has just published the schedule. It’s always useful to find out what is being discussed during such events, even if you are not going to attend, so I went through the different sessions, and compose my own virtual schedule with some of the ones I find the most interesting. Monday, October 23 11:15 – 11:55 – An Introduction to SPI-NOR Subsystem – Vignesh Raghavendra, Texas Instruments India Modern day embedded systems have dedicated SPI controllers to support NOR flashes. They have many hardware level features to increase the ease and efficiency of accessing SPI NOR flashes and also support different SPI bus widths and speeds. …

Support CNX Software – Donate via PayPal or become a Patron on Patreon