Before I start out, let me just point out that I'm new to hardware design. In fact, this is just hobby for now, but might turn into something later. Because of this, I don't follow any standards per se, but I like to be as organized and efficient as possible.

I designed a 16-bit microprocessor from the bottom-up, including the architecture and instruction set, as a hobby project. It has been implemented on a Spartan 6 FPGA and is working great. I made a casing for the processor to be used as a panel, which integrates with the DMA capabilities of the design.

One of these is the ability to choose which part of the processor you're currently observing on the data output display. This information about the currently chosen 'entity' is also to be display on a 3-digit 7-segment display, in characters. For example, 'ALU', 'STA' for Stack, 'ADD' for MAR, etc.

This is completely unnecessary, but I'd like to do this anyway, as a visual treat. Since I'm new to circuit design entirely, what I thought of first was to use an array of multiplexers to simply choose the state of the 7-segment displays depending on the input. But this would require some manual IC wiring, which I'm not too keen on doing. I tried to make a PCB, but most of the copper tracks were broken.

What I would like to do is use a microcontroller (something I've never done before) to achieve this. I have never used a microcontroller, and I'm unaware as to which particular one would be useful in the scenario. I'd appreciate it if someone took the time to point me in the right direction.

Ah, and also, the reason I'm not simply using the FPGA to drive these three displays is because I've run out of the 70 GPIOs on the development board.

  • \$\begingroup\$ You've never used a microcontroller, yet you've designed your own 16-bit microprocessor and implemented it in FPGA? I don't know if I should question your architecture or the process to which you are learning. Either way, if you are indeed out of pins and need to get clever, we are going to need to know how fast your custom microprocessor is running at \$\endgroup\$ – Funkyguy Aug 4 '14 at 13:32
  • \$\begingroup\$ Almost any with sufficient pins will do. Map the segments to port bits and create a lookup table in software. Likely you will scan across the digits outputting the segments for each in turn. \$\endgroup\$ – Chris Stratton Aug 4 '14 at 13:32
  • \$\begingroup\$ @Funkyguy, this is not hard to imagine if someone has followed a course track focused on computation structures rather than applications... trivial tasks are not covered. The clock speed of the examined processor doesn't really matter as the human eye can only see so much. \$\endgroup\$ – Chris Stratton Aug 4 '14 at 13:33
  • \$\begingroup\$ @ChrisStratton True true, its just oddly different these days for somebody to start with an FPGA over the much more common Arduino or microcontroller. I'm not too worried about the eye not being able to see it, but if the....oh wait I mis-understood the question. You're right. Well OP could certainly use an Arduino for this then, so long as OP can free up a couple of pins. \$\endgroup\$ – Funkyguy Aug 4 '14 at 13:37
  • \$\begingroup\$ @Funkyguy I've not even started undergrad yet. The microprocessor is coded in Verilog, and the architecture fits my purpose. I'm not following a course of any sort. It's just a hobby project. The processor runs using the clock onboard the development board at 100 MHz, but the display updates only at 20 Hz, which is pretty high in itself. The difference is not perceivable. Since it's a minicomputer with nothing more than a couple 7-Segment displays, it doesn't matter. Also, I'm aware that an Arduino would work, but I do not have one and would like to learn microcontrollers as well! \$\endgroup\$ – Shreyas Aug 4 '14 at 14:15

Regardless of which way you choose to go, you're going to have to share some of those 70 "used-up" I/Os with whatever you're going to use to drive the displays, so I suggest you use four of them, [I/Os] go the simple hardware route, and use a couple of TI 16 channel LED drivers for just long enough to update your displays periodically.

enter image description here

enter image description here

| improve this answer | |
  • \$\begingroup\$ That's a possibility. But it really only takes one signal, as the FPGA could output an asynchronous serial message easily received by a microcontroller. \$\endgroup\$ – Chris Stratton Aug 4 '14 at 16:41
  • \$\begingroup\$ But to what end? You've still got to drive 21 segments, and if all you're doing is interposing an MCU to reduce The I/O load sharing on the FPGA from 4 to 1, it hardly seems worth it, IMO. Ah, but wait... It's just a hobby project, so for the sake of learning it's probably a valid exercise even though The OP'll eventually have to / want to come to grips with hardware. ;) \$\endgroup\$ – EM Fields Aug 4 '14 at 16:54
  • \$\begingroup\$ @EMFields I believe this is for serial transfer from the FPGA to the chip for output? I apologize if my question wasn't clear enough. The data to be displayed on the three displays is the same all the time, but needs to be multiplexed between 8 possible states. Something like a lookup table would work. It woud be impractical to keep sending the same data over and over. The 3-bit input that chooses the state isn't actually internal to the FPGA, but external (the same signal is passed on to the FPGA as well). \$\endgroup\$ – Shreyas Aug 4 '14 at 17:54
  • \$\begingroup\$ Might be a silly question in my opinion, but I just want to dump the multiplexing onto a microcontroller so that I do not have to manually wire up 21 8-bit data selectors to each and every segment. Plus, I could change what the multiplexing would output, if I use a microcontroller, instead of being not able to change it in the former case since it has already been hardcoded. Am I right? \$\endgroup\$ – Shreyas Aug 4 '14 at 17:57
  • \$\begingroup\$ @Shreyas: Re. your first comment; using the shift register approach, the data is sent from the source to the 5926 as a 21 bit serial data stream which is clocked into the chip and then latched in the 5926's parallel output register where it drives all 21 LED segments statically, as a constant-current sink, until the next update. \$\endgroup\$ – EM Fields Aug 4 '14 at 18:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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