cancel
Showing results for 
Search instead for 
Did you mean: 

Anyone using an STM8 to replace 74LSXX series ICs?

JRoth.3
Associate

I'm curious if I can use an 8-pin STM8 breakout board to replace some 74LSXX series ICs, or in some cases, maybe a handful of them.

I need to build a 7-seg LED display that outputs hex. I can order one, wait a week, pay $8 for shipping, hope it works as expected, etc., etc. But I'm looking for a better solution.

I've been doing software for the past 30+ years and started an EE degree years ago and never finished it. I should have stuck with it but I went another direction and landed in software. The last couple of years I started getting back into electronics I am starting to do some hardware tinkering and building some retro PCs (6502, 8-bit computer, etc.) and keep runnning into little issues where I am missing an IC or a hard to find IC is overpriced and I want to just create what I need. Or in this case, take a 7-seg LED driver design and tweak it to output hex. One of the issues is that you need a clock if you want to use a single IC for more than one display. So now something that should be pretty simple is getting a bit more complex. You also run into designs where you need shift registers. So really, using basic 74LS## series ICs for these retro projects is not a great fit. It works, but I suspect there's a much better options. So far, the best solution I have seen is using a CLPD. But there are pretty good options using a PIC as well.

So, today I remember that I bought half a dozen STM8 and STM32 dev boards a year ago and one has three 8-pin breakout boards that might do the trick. The code I need is really simple... input 4-bit binary number and output 7-bit binary to drive the LED and add an additional bits to drive multiple displays. In Verilog, it would be something like the following for a single display. This is VERY common to do in an FPGA or CLPD but I thought doing this with a STM8 might be intresting and when considering the clock and shift regs, it might actually be the best approach.

	always @(counter)
		case (counter)
			4'b0000:seg_data=7'b1111110;
			4'b0001:seg_data=7'b0110000;
			4'b0010:seg_data=7'b1101101;
			4'b0011:seg_data=7'b1111001;
			4'b0100:seg_data=7'b0110011;
			4'b0101:seg_data=7'b1011011;
			4'b0110:seg_data=7'b1011111;
			4'b0111:seg_data=7'b1110000;
			4'b1000:seg_data=7'b1111111;
			4'b1001:seg_data=7'b1111011;
		endcase

So I am curious if this might be something the STM8s are used for, combinational logic, LUT lookup from EEPROM, RAM, replacing 74LSXXXX chips, etc.

Any thoughts are suggestions are much appreciated.

Best regards,

Jon

1 REPLY 1
S.Ma
Principal

Overall mcu replaces HW by SW+Time.

I guess it should be ok for led. May need a hw signal to sync all mcu and avoid visual artifacts.