Skip to content

Instantly share code, notes, and snippets.

View trozodejamon's full-sized avatar

Jason Tay trozodejamon

  • Pasosmas.com
  • Petaling Jaya, Selangor, Malaysia
View GitHub Profile

STC Micro 8051 Microcontroller Notes

Quick Notes

The critical few things you need to know about it are:

  1. They are 1T (single clock cycle) 8051 compatible MCUs (but some instructions may take as many as 5 or 6 clock cycles to complete) and most are capable of operating at up to 35MHz. Check the markings on your part. If it says something like "28I", then it means that your part has been rated to operate at up to 28MHz. Note that rather than use nice round numbers like 12MHz, which is possible, it is more customary to use specific operating frequencies that facilitate the generation of a lower error UART baud rate. I.e., 11.0592MHz, than would otherwise be possible.
  2. They have a built-in bootloader that emits a magic number, then listens on UART0 (RxD, TxD) on bootup. The ISP programmer uses this.
  3. There are two main HEX file download tools, the manufacturer's own STCISP which is an all singing and dancing development support tool (it has pinout information, timer configuration and code generation t
@trozodejamon
trozodejamon / ebaz4205.md
Last active July 10, 2021 06:40
EBAZ4205 Ex-Cryptominer Boards with Xilinx Zynq APSoC

EBAZ4205

These are ex-asic cryptominer control boards (they do not include the ASIC hashers), used boards, but nevertheless a really nice, low-cost Xilinx Zynq 7010 board that can have a second life through hobbyists and experimenters. Unlike purpose built development boards, to use this board, you will also need to already have, or purchase in order to use it, the following items:

  1. A Xilinx DLC9 or DLC10 JTAG download cable or an FTDI FT2232H breakout board instead.
  2. You will also need a 3.3V USB-to-serial adapter if using the Xilinx cable. If using the FT2232H, you can use the 2nd channel for this.
  3. Note that some boards may arrive with some missing or damaged components. Be prepared to do some basic SMD repair.
  4. Follow the instructions in [xjtuecho's repo to reset the built-in password and stop the cgminer script from starting.][1]
  5. My boards would run with DC input of 5.2V to 12V. 12V is recommended. Current draw just sitting there is about 130mA @ 12V.
  6. There are various ways to create a ba
@trozodejamon
trozodejamon / licheepinano.md
Last active July 2, 2021 09:00
Sipeed LicheePi Nano First Boot Details

LicheePi Nano

The LicheePi Nano by Sipeed is a very small, stamp-sized ARM926EJ-S module featuring the AllWinner F1C100s SoC, which itself features 32MB of on-board SDRAM. This is a first in a series of notes that help me keep track of the default state of the boards that I use and the available options with the shipped firmware. Note that the datasheet for the F1C100s and it's bigger brother the F1C200s which has 64MB of SDRAM, but is otherwise pin-for-pin compatible, have a very sparse datasheet. If you need detailed information, such as that about the registers, you will need to refer to the Allwinner F1C600 User Manual. The default clock speed is [indicated to be 408MHz][1].

  1. Some boards have soldered down 8MB or 16MB SPI Flash. Mine had 16MB. If your board does not have an SPI Flash soldered in, then you will be expected to boot from Micro SD Card.
  2. Power the board with a Micro USB cable.