Category: STC micro

  • LED hourglass kit programming

    This is the kit that uses the STC15W201 (or STC15W204) chip. The -201 has only 1K of FLASH memory for program storage, the -204 has 4K. The chips are interchangeable and have the same pinout – they only differ in the amount of FLASH (and EEPROM) memory they contain. New patterns since making the video! […]

  • STC89C I/O Ports push-pull

    The (English) datasheet contains Chapter 4, which explains how the I/O ports work as standard in the traditional 8051 way: so-called ‘quasi-bidirectional’. In this mode, when a ‘1’ is written to a port bit, the I/O floats high, with a weak pull-up resistor, and external devices are able to pull the pin low, so the […]

  • POV source code – part 3

    If you’re trying to compile the source code with the Keil compiler, you’re probably getting error messages about ‘undefined identifier’ or similar.  This is because the standard Keil reg52.h header file doesn’t define all the necessary identifiers for the STC89C5x chips. We need to define the special function register (sfr) P4 = 0xE8; so the […]

  • POV source code – part 2

    Clock interrupt The STC89C52 has three timer/counters (most of the 8051 chips have the first two, and the third one is pretty common).  One of the modes for timer 1 is to count clock pulses in an 8-bit register and when FF is reached, reload the count register from a separate 8-bit register.  Each time […]

  • POV source code – part 1

    These posts relate to the previous few concerning the Banggood kit: Cross LED Dot Matrix Display Circuit Board Rotating Electronic Kit It uses an STC89C52RC microcontroller which is a (fairly) modern Chinese version in the 8051 family. You can program it in assembler, but I chose to use the C language for this project. The […]

  • Cheap POV (persistence of vision) clock kit

    These kits are available on for about $11 shipping included.  Tricky soldering, and they don’t come with any instructions.  There are instructions available on the website – but not unless you read Chinese.  The pictures on the website help though. Anyway, I recommend the kit.  Even if you can’t get it working properly, it’s […]

  • ISP programmer for the STC89C51 and STC89C52

    I couldn’t find an ISP (programmer) for the STC89C52RC that worked with modern versions of Windows. I found several programmers that work with other chips in the STC range. I did find one that worked on Windows XP, and with some hacking got it to work with Windows 7; however I had no luck with […]