Continue to Site

# 2732 hex(bin) programming question

Status
Not open for further replies.

#### Iordan

##### Newbie
Hello I have a complicated question,
if you are kind enough to answer it I will be very thankful
Here it goes:
I want to program a 2732 IC in Proteus.
I'm not new to programming but it requires a hex file, I've read a lot on the topic but it only explains what the numbers do(addresses and so forth)
My question is how program these things. Or how to write some code let's say d3 blink when a2 is a 1
Something like this, I'm not new to programming, but I've never heard of hex files.
If you have some info I will be appriciative.
Thank you for reading so far

#### betwixt

##### Super Moderator
Staff member
.hex files are just an image of the binary code but saved in text format. They were originate from around 45 years ago because many systems at the time could only use printable text to store or transfer files. These days almost all computers can handle binary but the standard existed and worked well so it is still used.

In a hex file the binary numbers are saved as ASCII hexadecimal. For example:
binary 00010010 = 0x12 in hexadecimal = '3132' in ascii hex. 0x31 is '1' and 0x32 is '2'
binary 10100101 = 0xA5 in hexadecimal = '4135' in ascii hex. 0x41 is 'A' and 0x35 is '5'

Hex files can be simply a list of printable characters but it is common to use hex files formatted in a special way so they carry not only the data but the address where it is to be stored and an extra character to verify there are no errors, called a checksum. Look at this page for more details - https://en.wikipedia.org/wiki/Intel_HEX

Most programming software/hardware will read hex files and interpret the contents before writing to a device.

Brian.

### Iordan

Points: 2

#### KlausST

##### Super Moderator
Staff member
Hi,

2732 is not the full IC name. What exact IC do you speak of?
It is a memory IC or better say an EEPROM.
There are "A" signals, these are address lines.
There are "D" signals, which are data lines.
You cant program it to blink D3 when A2 is 1. To toggle signal lines you need a microcontroller.
A microcontroller needs a program, a software.
It may be programmed in a programming language like "C" on a PC.
A compiler translates it to machine code. This code can be stored in an EEPROM. Like an 2732. But still it needs a controller to process the code that is stored in the EEPROM.
The compiler may generate a HEX file. To program the HEX file into the EEPROM you need an programmer.

Klaus

### Iordan

Points: 2

#### Iordan

##### Newbie
Thanks for you reply Klaus and Brian.
Hi,

2732 is not the full IC name. What exact IC do you speak of?
It is a memory IC or better say an EEPROM.
There are "A" signals, these are address lines.
There are "D" signals, which are data lines.
You cant program it to blink D3 when A2 is 1. To toggle signal lines you need a microcontroller.
A microcontroller needs a program, a software.
It may be programmed in a programming language like "C" on a PC.
A compiler translates it to machine code. This code can be stored in an EEPROM. Like an 2732. But still it needs a controller to process the code that is stored in the EEPROM.
The compiler may generate a HEX file. To program the HEX file into the EEPROM you need an programmer.

Klaus
I have a few more questions, if you answer them I will be grateful.
So I have to program a microcontroller and when it's compiled it will generate a hex file, which can be uploaded to 2732 EEPROM.
Now I know how to program, but what will the code consist of?

I mean I know I will have to include some library specially designed for the microcontroller.
Which microcontroller should I use?
In Proteus there is a upload hex file which is a nice feature. So I guess the hard part is generating the hex file.

#### KlausST

##### Super Moderator
Staff member
Hi,

The way you work makes no sense.
Finding a microcontroller/processor because you have an EEPROM chip makes no sense.
It´s like you find an empty box (EEPROM) ... now you ask us what things you should put into the box (software, HEX file) ... and where to send it (microcontroller).

The other way round makes more sense, but nowadays microcontrollers usually have built in EEPROM/FLASH memory.

Klaus

### Iordan

Points: 2

#### Iordan

##### Newbie
Hi,

The way you work makes no sense.
Finding a microcontroller/processor because you have an EEPROM chip makes no sense.
It´s like you find an empty box (EEPROM) ... now you ask us what things you should put into the box (software, HEX file) ... and where to send it (microcontroller).

The other way round makes more sense, but nowadays microcontrollers usually have built in EEPROM/FLASH memory.

Klaus

Yes.
I found a hex file it is like this
:10000000f8faf9fdfefef9faffffffffffffffff21
:10001000fffffffffffffffffffffffffffffffff0
:10002000ffffffffffffffffffffffffffffffffe0
:10003000ffffffffffffffffffffffffffffffffd0
:10004000ffffffffffffffffffffffffffffffffc0
:10005000ffffffffffffffffffffffffffffffffb0
:10006000ffffffffffffffffffffffffffffffffa0
:10007000ffffffffffffffffffffffffffffffff90
:10008000ffffffffffffffffffffffffffffffff80
:10009000ffffffffffffffffffffffffffffffff70
:1000a000ffffffffffffffffffffffffffffffff60
:01000001FF

When I upload this to EEPROM, all the outputs are 1, when the inputs are ZERO
But I don't know how to generate one, which can make the outputs controllable
I can't seem to find a hex programming book, and I can't seem to find an IDE which supports the 2732 EEPROM.
Maybe you know of one?
Thanks

#### betwixt

##### Super Moderator
Staff member

An EEPROM is a storage device, it might hold the program code for a microcontroller but it can't execute it by itself.
Each MCU has it's own instruction set and pin connections so the code for each one will be different. You have to start with the MCU first, write the code then store it in the EEPROM.

Note that the 2732 is actually an EPROM not EEPROM and it went into production about 30 years ago.

Brian.

### Iordan

Points: 2

#### KlausST

##### Super Moderator
Staff member
Hi,
When I upload this to EEPROM, all the outputs are 1, when the inputs are ZERO
I doubt this. ..because:
:10000000f8faf9fdfefef9faffffffffffffffff21
because when all inputs are 0 then you have address = "0x0000" (the green one)
then you have "0xf8" as data (the blue one) which is 0b1111 1000. this means the 5 upper bits are HIGH, but the three lower bits are LOW.

But there are contol inputs. They all need to be set for a valid READ. If not set correctly then I rather expect high_impedance than HIGH.

Klaus

#### FvM

##### Super Moderator
Staff member
I want to program a 2732 IC in Proteus
So we are talking about a simulation rather than real hardware? In this case I don't understand what the problem is.

As stated by KlausST, you'll see 0xf8 in Proteus simulation at 2732 outputs if all address inputs and CE and OE are pulled low.

Status
Not open for further replies.