Binary to BCD converter IC?

Hello, I'm searching for an IC which can convert binary input to BCD code. I have a TC77 temperature sensor, which provides data to 8-bit shift register, and finally I have 8 bits in complementary code for negative temperatures, and straight code for positive temperatures. Let's put aside the negative numbers for now and concentrate on simple binary to BCD converter. I want to put that reading on a 7-segment indication via 7447 driver. So long for now I've found in Google ICL74185 as binary to BCD convertor, but I will need 2 or 3 hooked together for converting 8-bit number. Also I can't find that IC anywhere on our stores and it seems it is not in production anymore.

The other question is - is there a IC for converting the complimentary code into straight code?

I don't want to use microcontrollers.

Regards, Ivan.

Reply to
ivanatora
Loading thread data ...

A small (256 bytes) PROM can be programmed to convert 8-bit twos- complement to two BCD digits and a sign bit, but you'd lose some precision. A wider PROM could supply 12 BCD bits and a sign. Somebody probably offers it preprogrammed; National Semiconductor used to have a bunch of specialized decoders based on the same mask ROM, back in the Z-80 era. Converting twos-complement to natural binary can be done with gates, but the minimum-package-count solution is probably a small microcontroller. Some of them, especially the low-speed grades, have become absurdly cheap. Most of them have a serial input, so you wouldn't need the shift register.

Reply to
Stephen J. Rush

This was recently covered in detail. How about a CPLD? Program it once, treat it like a complex logic chip. XC9536's cost about $1 at digikey.

Reply to
DJ Delorie

How much does the programmer cost? I looked into CPLDs a while back, and the programming algorithm was proprietary, meaning I'd have to shell out a few hundred bucks for a programmer.

Regards, Bob Monsen

Reply to
Bob Monsen

The Xilinx tools are free, and they have app notes that tell you how to run the jtag yourself for embedded ISP, and provide a tool to compress the bitstream into something easily parsable (and documented).

Me, I'm wiring mine up to a small mcu module I already have[*], so the cost to me for the programmer is zero. There are schematics for the Parallel III cable if you want to build it; it's a connector and a couple of TTL chips.

Total cost to me to have a XC9536XL CPLD: $1.

[*]
formatting link
Reply to
DJ Delorie

Just FYI I did a trial synthesis (by first! :) of this, and it fits into the XC9572 but not the XC9536. So, it's $2 instead of $1.

Reply to
DJ Delorie

More trials.

If you want a multiplexed display (three digit drivers, seven segment drivers, clock input), it fits easily into a XC9536.

If you want separate digits (i.e. 21 segment drivers) but don't mind providing a clock (full update in three clocks), that can fit into an XC9536 too. This works because there's only one 7-segment decoder block, which is shared across the three output modules.

It looks like there's enough remaining cells to implement leading zero blanking, too.

Not that I've actually tried any of these in hardware :-)

Reply to
DJ Delorie

I'm back again. I've searched a lot and find no easy way to convert parallel binary into BCD, so I'm reconsidering using a microcontroller. They are pretty cheap indeed, and a friend of mine just built a PIC16 programmer. Me and him are not so bad in C and asm, so we could make of that good learning project :)

Reply to
ivanatora

I believe someone pointed out that an easy way to convert binary to BCD is to store the BCD values in EPROM(s) and use the binary as the address. I once wrote an ASM Macro to generate the BCD values for storing in a HEX file to program the EPROM. You need four output bits of EPROM for each BCD digit. For eight bit binary you need two eight bit wide EPROMs.

Ken Fowler

Reply to
Ken Fowler

In that way what would happen to the number 1110 (14) for example? There is no corresponding (readable) BCD code for that, and two BCD digits must be emitted - '1' and '4'.

Reply to
ivanatora

--- With 8-bit address and data spaces:

BINARY BCD BCD DECIMAL ADDRESS MSD LSD DISPLAY

-----------|------|------|-------- 0000 0000 0000 0000 00 0000 0001 0000 0001 01 0000 0010 0000 0010 02 0000 0011 0000 0011 03 0000 0100 0000 0100 04 0000 0101 0000 0101 05 0000 0110 0000 0110 06 0000 0111 0000 0111 07 0000 1000 0000 1000 08 0000 1001 0000 1001 09 0000 1010 0001 0000 10 0000 1011 0001 0001 11 0000 1100 0001 0010 12 0000 1101 0001 0011 13 0000 1110 0001 0100 14 0000 1111 0001 0101 15 0001 0000 0001 0110 16 0001 0001 0001 0111 17 0001 0010 0001 1000 18 0001 0011 0001 0000 19 0001 0100 0010 0000 20 0001 0101 0010 0001 21 . . . 1001 1001 1001 1001 99

-- JF

Reply to
John Fields

Mapping all 100 possible combinations? That seems pretty exhausting :P I see it now, thanks for the example!

is

I

BCD

Reply to
ivanatora

--
It shouldn\'t be, just write a binary to BCD routine which will
generate a file your EPROM programmer can use to burn the target
EPROM.
---   

>I see it now, thanks for the example!
Reply to
John Fields

Ok, I have a WORKING binary to three-digit-led converter chip:

formatting link

The chip (XC9572XL-VQ44) costs $2.04 each at Digikey.

Reply to
DJ Delorie

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.