Beginning of JY-MCU-3208 code

Let me preface this post with the statement that the code found here is written with the assumption of a modified display (larger mcu and higher speed crystal). It also uses an LM34 Temperature IC placed where the DS18B20 would go.

Let me continue with that modification. As you know if you already have one of these boards, is that there are provisions for several extra components to be added. One such component is a Dallas Semiconductor DS18B20 Temperature sensor IC. This sensor looks like a transistor, uses the Dallas One Wire protocol, and has 3 pins VCC, Data, and GND.

I then looked at the schematic and noticed that the data output for the DS18B20 went to one of the ADC pins on the microcontroller (Notice the DQ line is ADC2 on the MEGA8).

This got me thinking… since I had some LM34 Temperature IC’s handy could I substitute that for the DS18B20? Again back to the schematic, there was only one thing that would be of issue. That would be the resistor that acts as a pullup for the data line of the DS18B20.

Once I removed the LM34 would be wired correctly. So I located that resistor on the board (which was a 10K instead of the 5.1K the schematic shows) and removed it.

I then installed the LM34 and it works perfectly.

That’s all the hardware changes I’ve made so far. As for coding this, a while back I had purchased some Sure Electronics 16×24 displays and had sourced some libraries for driving the HTC1632C on them. I found one that was pretty stripped down and went to work.

The job I had before me was this. I wanted to be able to use the routines I had written for my other LED Array projects. This meant whatever driver library I came up with, I had to be able to manipulate the display as an x/y grid in a memory array that would be compatible with my current functions. I had to be able to read the ADC value and interpret that to characters on the display. I wanted to use my current 5×8 font file.

You probably don’t care much about the how I went about all this, but suffice it to say, most of it was pretty simple except one part. That was coming up with the formula for determining what memory location in the HT1632C controller the data needed stored in. I spent hours on that one with many diagrams but finally it all came together.

This is the result so far.

As you can see, the special effects all seem to work well.

If you are interested in the files, they are available for download HERE FOR THE SOURCE and HERE FOR THE SCHEMATIC

There you have it. One thing, this source as compiled will not fit in the mega8 onboard a stock display. You may be able to modify it by eliminating some of the functions to shrink it down enough to fit, but I haven’t tried that.

This entry was posted in News. Bookmark the permalink.

18 Responses to Beginning of JY-MCU-3208 code

  1. Derk says:

    Hi there,

    I own a display like this and have a problem with it. I have accidentally changed the fuses in the micro to use external crystal (which is, at least I think, not connected) (low 0xdf high 0xca). I tried to change the fuses but the board does not respond anymore to anything.

    Do you have a clue where I can connect a crystal to the board to put the fuses back how they where? I am unsure what the crystal that is already on the board is used for, but it looks like it’s connected to be an external crystal?

    Anyway, I would appreciate some help.

    • Rick_S says:

      The crystal on the board is connected to the external crystal pins. However, it is only a 32KHz crystal so the MCU would run very slow using this as it’s clock frequency. You should be able to reset the fuses, but for your programmer to talk to it, you will have to be at a low communications speed. If you use a USBASP with a speed jumper, connect that jumper and then it will most likely talk. If you have a different programmer, or a USBASP without a jumper, you will need to adjust the speed via the software you use. For instance with a USBASP with current firmware and AVRDUDE, the -B parameter is used to change the speed. I use -B 6 for new mcu’s, this may work for this as well. You could also change the crystal if you wanted to, as long as it is in the same package style. I show my changed crystal in this post.

      • Derk says:

        Thanks for your super fast reply. Unfortunately setting the jumper does not work for my usbasp. I have the feeling that I own an usbasp that has “autospeed”. Setting the jumper does not do anything and the -B option does not work:
        avrdude: set SCK frequency to 4000 Hz
        avrdude: warning: cannot set sck period. please check for usbasp firmware update.
        To update the firmware I need another programmer which I currently don’t have. I will try to update the firmware as soon as the usbasp I just bought arrives :).

  2. wes says:

    Your comments are helpful. I tried to use an AVR ISP MK2 with Arduino IDE. Didn’t work and I’m getting flashing orange on the programmer. I think I’ll try to program something using something other than Arduino IDE with the AVR ISP MK2. When I get all that to work successfully then I’ll try the JY board again. The advantage of Arduino is all the libary files make make the programming processes very easy. I’ve played around with the MSP430 and there is an Arduino clone “Energia” that makes that board easy to program. I got their MATRIX Booster pack to work. I’m trying to find a cheap way to get an LED matrix. MSP430 Launch pad is $5 while an Arduino is $30. JY is $12 with everything.

    • Rick_S says:

      It could possibly be a power issue. If you can separate the power from your programmer to the board and just have the grounds common, then power the board independantly through it’s power jack, it would eliminate that possiblilty.

  3. wes says:

    I actually have 3 or these JY-3208 boards. First I tried to program the ATMEGA8 using another Arduino as the ISP. Couldn’t get it to work with the listed ATMEGA8 in the default Arduino boards menu. I tried loading a same program for the Adafruit HT libraries files running a board with the ATMEGA8 removed. Next I removed an Atmega8 from a know working board. I intalled a ATMEG328 in its place. I left the installed crystal and changed nothing else. I tried to use every possible ATMEGA328 listed in the board meu. kept getting no sync message.


    How critical is matching the frequencies of the ISP and the onboard chip?
    My next question is those people that have actually programming the board, were you able to do it with an Arduino ISP and what board did you select? Either ATMEGA8 or ATMEGA328.
    One of my questions is their labels on the board. What is PIN1 as you looking at the board?
    My project is to have a matrix that reads the message off on and SDCARD and displays them. For now I just want a message board.

    Most of these tutorials and videos you see on this card lack details.

    I have gotten a Charlieplex 4X5 matrix to work on an ATINY85. I used SMD led and the SMD version of the ATINY85 to program and function.

    Any help is greatly appreciated.

    • Rick_S says:

      I didn’t use an Arduino ISP to program the board, I use a kit built USBASP programmer. I’ve never really tried Arduino as ISP. Programming the board in C and sending the hex file over with avrdude worked without a problem for me. On the original ATMEGA8, I had to set the SCK speed slow because the chip was at the default 1MHz clock. This is done with a jumper on my programmer board.

      As for pin 1 on the 10 pin connector, if you have the top of the board facing you (LED side) and the connectors on the left, Pin 1 is the top left. The connector is wired as a standard 10 pin ISP except they threw in the RX and TX lines on pins that are typically grounded. A standard ISP programmer should work fine though.

      Keep in mind, this does have to be programmed via ISP, there is no bootloader on the chip, nor is the circuitry there to reset with DTR as a standard arduino would have.

      Hope that helps out,


  4. Pingback: More information on the JY-MCU 3208 «

  5. jack says:

    Hello there was just wondering if someone could point me in the direction of some code for an arduino uno. Or anyone who could help me port the code. Any help would be appreciated. 🙂

    • Rick_S says:

      While I do own a couple of arduino boards, I don’t program them in the processing language. I typically program in C and then upload to them with avrdude. I mainly got the boards because of the variety of shields available for them and because they make a nice “package” with the micro controller and usb/serial interface.


  6. PittyAlex says:

    Hi form Russia.
    I’m also love LED and uC electronics and DX shopping…
    I found some interesting chip HT1632C in stock and want to buy it, but I can not find any datasheet for it. Do you have one? Or other information for this chip?

    • Rick_S says:

      One of the first places I look for datasheets is They have a datasheet for the controller you listed. There are also several projects on the web built with displays that use that device such as the JY-MCU-3208 here. Sure electronics also sells displays using the HT1632C and there are several projects you can find online using them. Good luck in your projects,


  7. Niko says:

    I wonder if theese can be controled via regular arduino , I almost succeeded to Interface it with Arduino Mega 2560 (Atmega8 onboard removed) using CS , WR and DATA pins of HT1632C

    The problem is that regular HT1632.h library from arduino playground address it wrong —> X,Y inverted and mirrored font.

    Can I use Your lib with arduino ?? Do You have some sketch examples ?

    • Rick_S says:

      My libraries and the ones I used are standard ‘C’ libraries. While they could be used with arduino, I really couldn’t tell you how to do it. If you were to transfer the compiled program to an arduino, I would imagine it would most likely run as long as you wired it correctly to the display.

    • jack says:

      Hi there I am attempting to do the same thing your trying to do. Except nothing is working. All the pins are connected. But still nothing on the display 🙁
      Anyways I thought this arduino library might help you.

  8. Carlhako says:

    Thanks Rick!

    I bought one of these from dealextreme after seeing your blogpost about a month ago. It arrived today. I will do the microcontroller upgrade like you did and see if I can get your code working. I think this will be the new display for my alarm clock which i built a couple of years ago currently displaying time with an old 7seg display.

    • Rick_S says:

      I want to get the real time clock IC installed. I purchased it a while back with they crystal, just haven’t had a chance to put it in. I was thinking of converting an old clock with this display… too many projects – too little time… If you have any problems, let me know.

Leave a Reply

Your email address will not be published. Required fields are marked *