by admin

Ebay HY-MiniSTM32V LCD initialization and Adafruit GFX Library port to STM32F103

October 27, 2017 in ARM, C, C++, Code Snippets, DIY, Hardware, Microcontroller, Programming, STM32, Tutorial by admin

A while ago I’ve bought a HY-MiniSTM32V board from Ebay. There are two boards – a main board with the STM32F103VCT6 microcontroller and a 240×320 pixel LCD board with resistive touch screen. The LCD itself is connected to the FSMC (Flexible Static Memory Controller) and can be mapped as a memory device.

The FSMC is an embedded external memory controller that allows the STM32F10xxx microcontroller to interface with a wide range of memories, including SRAM, NOR Flash, NAND Flash and LCD modules. The suitable connection to LCD is as a NOR Flash / SRAM device.

From AN2790 – TFT LCD interfacing with the high-density STM32F10xxx FSMC:

To control a NOR Flash/SRAM memory, the FSMC provides the following features:

  • Select the bank to be used to map the NOR Flash/SRAM memory: there are four independent banks that can be used to interface with NOR Flash/SRAM/PSRAM memories, and each bank is selected using a separate Chip Select pin.
  • Enable or disable the address/data multiplexing feature.
  • Select the memory type to be used: NOR Flash/SRAM/PSRAM.
  • Define the external memory databus width: 8/16 bits.
  • Enable or disable the burst access mode for NOR Flash synchronous memories.
  • Configure the use of the wait signal: enable/disable, polarity setting and timing configuration.
  • Enable or disable the extended mode: this mode is used to access the memory with different timing configurations for read and write operations.

Read the rest of this entry →

by admin

Bitbanged USB stack on a sub-$1 Cortex M0+ MCU

January 5, 2017 in ARM, Devices, DIY, Hardware, Microcontroller, Tips & Tricks, Tutorial by admin

A nice presentation about how to get USB running on an sub-$1 Cortex M0+ ARM microcontroller that has no built in USB hardware. The talk describes the implementation of a new bitbanged USB stack, starting with a primer on the USB PHY layer and continuing up the stack, concluding with “Palawan”, a feature-complete open-source bitbanged USB Low Speed stack available for use on microcontrollers priced for under a dollar. We’ll go over requirements for getting USB to work, as well as talking about USB timing, packet order, and how to integrate everything together.

by admin

Live debugging ESP8266 with open-source tools

December 28, 2016 in C, C++, DIY, ESP8266, Microcontroller, Tips & Tricks by admin

The ESP8266 is a low-cost Wi-Fi chip with full TCP/IP stack and MCU (Micro Controller Unit) capability produced by Shanghai-based Chinese manufacturer, Espressif Systems.

Since 2014, when first came in the attention of the western makers, the documentation became quite available, together with couple of SDKs and firmwares for various programming langauges like Lua, together with the low price, made reasonable easy to develop applications hosted on this tiny chip. Some of this little chip’s features:

  • 32-bit RISC CPU: Tensilica Xtensa LX106 running at 80 MHz (can be overclocked)
  • 64 KiB of instruction RAM, 96 KiB of data RAM
  • External QSPI flash – 512 KiB to 4 MiB (up to 16 MiB is supported)
  • IEEE 802.11 b/g/n Wi-Fi
  • Integrated TR switch, balun, LNA, power amplifier and matching network
  • WEP or WPA/WPA2 authentication, or open networks
  • 16 GPIO pins
  • SPI, I²C,
  • I²S interfaces with DMA (sharing pins with GPIO)
  • UART on dedicated pins, plus a transmit-only UART can be enabled on GPIO2
  • 1 10-bit ADC

Although developing software to be hosted on it isn’t such a big challenge like it used to be due to the plenty of information available on the internet, debugging the code running on the MCU is a different story. Luckily, at the Attachix blog there is a series of articles about writing software for this MCU, and in the 4th article the owner was nice enough to describe how to set up step-by-step debugging of the code either by command line or even from Eclipse IDE. Please follow this link for the entire article.

by admin

Running ‘hello world’ on Netis WF2419D router

September 19, 2015 in Code Snippets, DIY, Hardware, Microcontroller, Programming, RTL8196C, Tips & Tricks, Tutorial by admin

hardwareThis started as a quick fun project to do for breaking a bit apart from the usual daily stuff and mainly consist of building a ‘hello world’ application, install it on the modem’s flash and run it, instead of modem’s own firmware. The guinea pig will be a Netis WF2419D router I got cheaply some while ago, and just gathers the dust in the house.

If you wanna play with your modem, please note: You can render your modem unusable (this will, for sure, at least erase parts the existing data from the flash, leaving your modem unable to perform it’s modem duties). While probably there is a way of recovering from this (reinstalling the original firmware), if you manage overwrite the bootloader section of flash, it will become a paper weight (probably can be recovered by interfacing it with a JTAG or maybe removing the flash and copying data into it from another router’s flash). Anyway I take no responsability for your actions, broken modem, burned down house or whatever problem might happen because of this post.

Opening up the modem and getting out the circuit board, it’s packed with the following:

  • Realtek RTL 8196C SoC
  • RTL8192CE WLAN chip
  • Winbond W9812G6JH Ram (16 MB as 2M x 4Banks x 16 Bits SDRAM)
  • EON 4 MByte SPI flash

Read the rest of this entry →

by admin

$1.50 Arduino TV Annoyer!! (Turns TVs on when you want them off)

October 31, 2013 in AVR, DIY, Hardware, Microcontroller by admin

arduinoArticle featuring on

A qucik instructable on how to construct a Arduino based TV annoyer, which would turn on TV when you want to turn it on. To quote the original article:

Hey Arduino fans! Here is an ‘ible for making a device that turns TVs on when you want them off, and off then you want them on! If you hide it in something inconspicuous, it would make a great April Fools joke or gag gift.


Required components:

  • 1x Infrared Detector ($0.78)
  • 1x Wide angle Infrared LED ($0.23)
  • 1x Narrow angle Infrared LED ($0.23)
  • 1x 2N3904 PNP transistor (or equivalent) ($0.08)
  • 1x 10 Ohm resistor (Brown, Black, Black, Gold) ($0.05)
  • 1x 47 Ohm resistor (Yellow, Purple, Black, Gold) ($0.10)
  • 1x Arduino Uno (or equivalent) ($25.00)
  • Some wire (preferably solid-core, 22 gauge or so) (About $7-$8 at your local hardware/electronics store)

Required tools:

  • 1x USB A-B cable (for programming the Arduino) ($2.95)
  • 1x Soldering Iron (Optional) (About $15-$25 at your local hardware/electronics store)
  • 1x Spool of thin solder (About $10 at your local hardware/electronics store)
  • 1x Solderless breadboard (About $5-$6 at your local electronics store)
  • 1x Computer (I would hope you know where to get one of these)
  • 1x Arduino IDE (can be downloaded here)

For the original article and information about how to assemble it, follow this link.

by admin

Awesome DIY watch

October 28, 2013 in AVR, DIY, Hardware, Microcontroller by admin


What do you need for a nice DIY wrist watch? Apparently a small microcontroller, an RTC chip, OLED screen.

This awesome DIY wrist watch based on  Atmel ATmega328P  microcontroller and  DS3231M RTC and 1.3″ 128×64 monochrome OLED screen. For more information on this awesome project, follow this link.

Skip to toolbar