Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I just got a batch of LED matrix modules from Sure Electronics (http://www.sureelectronics.net/goods.php?id=1120) and a driver board (http://www.sureelectronics.net/goods.php?id=972).

I've got it wired up, and connected to my Mac. I found the right drivers, and I'm now able to send text to the displays using the virtual COM port, as per the documentation from Sure Electronic's website:

start with "0xFE,0x47 (G) 0x01,0x01" followed by 16 characters - display the 16 characters in the first row
start with "0xFE,0x47 (G) 0x01,0x02" followed by 16 characters - display the 16 characters in the second row

The plan is to hook it all up to a Raspberry Pi (when I eventually get one) and use it all to display information from a web service.

However, this setup is not optimal. The driver board requires some initialization each time it is powered up, in order to be available via USB. Also, I'd like more control over the display of characters (this setup, for instance, does not support non-ASCII characters, or text scrolling).

Heavy googling has led me to believe that I need to go deeper into the HT1632 chip on the driver board. The documentation from Sure Electronics is sparse.

The goal would be to be able to address each LED pixel individually from my code running on my computer (as in a 2D array of booleans, for example).

I'm totally new to micro programming, so I have no idea where to start. What do I need to do in order to program it? Can I even modify the code of the driver board, or do I need another kind of driver board? And how do I automate the boot up sequence, so that the board is automatically USB enabled?

Also, I'm mostly a Java/Web developer guy, so I would like to avoid as much C programming as possible.

If anyone with experience with this kind of programming could point me in the right direction to start, I would be grateful.

share|improve this question
4  
"micro computer"? do you by chance mean microcontroller? –  gnat Apr 23 '12 at 19:21
1  
@gnat - Yeah I did a double take too. I was wondering if I got warped back to the 1980's or something LOL. –  System Down Apr 23 '12 at 19:27
3  
You'll likely get better answers on electronics.stackexchange.com –  sdg Apr 23 '12 at 20:43
1  
Yep, I meant microcontroller - as you can see I need all the help I can get here :) I'll give electronics.stackexchange.com a try. Thanks! –  Vidar S. Ramdal Apr 23 '12 at 21:37
add comment

3 Answers

up vote 2 down vote accepted

Most microcontrollers can be programmed but you'll need to do things like set their reset pins to a higher voltage to put them into "programming mode", or in some other way signal them to do that. A brief look at the hardware you purchased indicates the micro is integrated into the board, so unless they support reprogramming of the controller they're using, you'd have to remove it from the board, hook it up to a programmer board, and then use whatever software comes with the programmer board to backup, modify, whatever the code on the controller.

I can't tell based on the small look I had at it which options are going to be available in this case, but that at least lets you know how it all hooks in in general.

Ultimately though, if you're a Java guy you're probably not going to enjoy micro programming - it's a totally different ballgame. You're also going to have to spend significant time in at least variants of C (and possibly occasional jumps to Assembly for things like control registers etc), because most hobby micros do not have nearly enough memory in general or powerful enough processors to run anything approaching the complexity of Java.

share|improve this answer
    
Just how much does a Raspberry Pi cost? Plenty of options in the sub-$100 mark that can easily run Java. Who says a java programmer won't like getting into the bits and won't enjoy embedded programming - They are different, agreed, the statement is at best an inaccurate and misleading generalization. –  mattnz Apr 27 '12 at 4:20
1  
A microcontroller is a single chip designed for a single purpose, such as controlling a display. A Raspberry Pi, whilst small, is a 700MHz computer. Price and size aren't what makes something a microcontroller. Yes, it has GPIO pins, so it's starting to be able to do some of the things a micro can do, but it's nearly 50square centimeters and even the smallest one draws over a watt of power (whereas a lot of micros draw picowatts to milliwatts even at full operation.) Out of context it may be misleading, but this guy said he loves java and hates C and specifically referenced a micro. –  Jon Kloske Apr 30 '12 at 2:31
    
Well, I don't hate C, I'm just not that comfortable with it. I think I'll be fine, though, just flipping bits. –  Vidar S. Ramdal May 4 '12 at 14:20
    
@mattnz: The Pi costs $25. –  Vidar S. Ramdal May 4 '12 at 14:24
add comment

Also, I'm mostly a Java/Web developer guy, so I would like to avoid as much C programming as possible.

You're going to have to learn to live with C if you wish to do much of anything with microcontrollers, at least have a passing knowledge anyway. Most code you'll see for microcontrollers is written in C. Even if you don't want to write it, you'll at least need to be able to read it.

Also, http://arduino.cc/playground/Main/HT1632C indicates how to set a font for that board and such. I'm sure it's possible to control individual pixels, but if you're planning on circumventing using their font support on their board and instead draw each letter by toggling pixels, your display is going to update very slowly...

share|improve this answer
add comment

I do not know the HT1632, but you should be able to get hold of the data sheet for it. Firstly you need to find out if the device is field programmable. Some (most?) are these days, but it's significantly cheaper to produce from One Time Programmable devices. From there, work out how to get a simple program to run - such as toggle a port pin and monitor it with an oscilloscope, then you may be able to get the LED display to work.

From the HT1632 data sheet, you may be able to find a way to get it into debug/programming mode. Does it have JTag?

Given your lack of experience, you will need to rely on perspiration and inspiration. To achieve what you are trying you would almost certainly need details from Sure Electronics about the board schematics.

EDIT: I scanned the manual. It appears that the driver board starts in serial mode- it has a serial port with no connector, but I did not find out if the serial is RS232 ot TTL level signals. What you should be able to do is attach your Mac to the serial port (You can by an RS232 dongle for this).

share|improve this answer
    
Found the datasheet (alldatasheet.com/datasheet-pdf/pdf/206107/HOLTEK/HT1632.html) and a post from some Arduino folks (arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1255052510) which, as far as I can tell, clearly indicates that the chip is programmable. But I don't have a clear thought on exactly HOW to program it. How do I write to the chip over an USB connection? –  Vidar S. Ramdal Apr 23 '12 at 21:48
    
OK, please forgive my ignorance, but I'm not completely sure how that makes sense - I have already connected my Mac to the driver board's USB port, and I have installed a USB/UART software driver so I get a virtual serial port to write to from my Mac. Would that suffice. Do I still need a hardware RS232 dongle? –  Vidar S. Ramdal Apr 24 '12 at 7:53
1  
The board has a UART as well as the USB port. If you get a UBS-Serial dongle, and connect that to teh boards UART, I would not be surprised to find that you can drive it straight after power on. The USB on the board is a USB-Serial dongle as well, but you claim you need to do stuff after the board i powered on to use it. –  mattnz Apr 27 '12 at 4:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.