Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

8 bit EEPROM with 16 bit uP...

Status
Not open for further replies.

udi_hakim

New Member
Hi,
I am having a problem working with my 80c286 processor.
I need to hook it up with EEprom but all the EEproms i know uses 8bit data bus and the 80c286 has 16bit data bus so how can i force it to read the software from the EEprom in 2 bytes chunks?
 
udi_hakim said:
Hi,
I am having a problem working with my 80c286 processor.
I need to hook it up with EEprom but all the EEproms i know uses 8bit data bus and the 80c286 has 16bit data bus so how can i force it to read the software from the EEprom in 2 bytes chunks?

What sort of EEPROM are you trying to use?, most are I2C which is a type of serial bus.

EEPROM's are usually used for storing data, which is only 8 bit anyway, the type of processor you use doesn't make any difference. If you need to store 16 bit (or more) numbers in EEPROM, you simply implement a scheme to do so - a simple one for 16 bit would be even addresses are the low byte, and odd addresses the high byte (or the other way round).
 
I doesn't use I2C but serial 2864 by atmel.

My problem is not to store data... the problem is that this eeprom should contain the boot program so i need the 286 to read the boot program right from the 8bit eeprom.
 
udi_hakim said:
I doesn't use I2C but serial 2864 by atmel.

My problem is not to store data... the problem is that this eeprom should contain the boot program so i need the 286 to read the boot program right from the 8bit eeprom.

OK.

But it's still a serial EEPROM?, so it can't be simply addressed as a normal EPROM or RAM would be.

So, presumably, the system will include a bootloader in EPROM, which copies the actual boot program from the EEPROM in to RAM, and then runs it - is that what you are trying to do?.

If so all you need to do is copy it byte for byte from the EEPROM to the RAM, memory on a 16 bit processor is still usually addressable just as 8 bit memory - with the processor reading two bytes each time (or 4 bytes at a time for 32 bit processors).

If your processor can't address memory as bytes (I'm not familiar with 286 assembler), your bootloader code simply needs to read two bytes from the EEPROM, join them together as one 16 bit word, and store that in RAM.
 
**** , i ment parallel EEPROM!
I was very tired when i wrote the message...

I know that if i would use serial EEPROM i won't have any problem,
but the problem is that this is a parallel EEPROM so i need to design a circuit that reads 2 bytes in each reading cycle and put them on the low and high halves of the bus...
 
Have you considered the simple option of using two EEPROM's to give a 16 bit result?. Presumably you're wanting to actually run the program from the EEPROM?, is it fast enough to do that?.
 
Well i think you are confused because you only use PIC's...

The only way to run a start up programs for any microprocessor is to use ROM like EEProm/Flash/Fram or any other Non volatile memory.

Microprocessors like the 80X86 or microcontrollers like the 8031 by intel has no internal ROM as the PIC's or the AVR's has, so you need to use an external ROM with a startup program.
Even our own PC's has a start up program (BIOS) written on a flash memmory.

I used a lot of 8031 designs with external EEPROMS but it has 8bit data bus.
I dont think there are a lot of 16bit EEPROMS out there and even if ill find one i have no programmer to program it.
So there must be a way to use a 8bit EEPROM with the 16 bit uP... ill ask my professor tomorow...
 
Use add/even memory banking as it is done in 8086. To fetch/write 16-bit data at a time, two EEPROMs are connected to higher and lower order data bus while address lines to both chips are same. In 8086 BHE and A0 signals are used to select either of them. SInce 80286 is extension of 8086, I think it should support this technique. Check out the datasheet is it has BHE signal.
 
udi_hakim said:
Well i think you are confused because you only use PIC's...

The only way to run a start up programs for any microprocessor is to use ROM like EEProm/Flash/Fram or any other Non volatile memory.

No, I'm familiar with other processors as well, my original experience was with the 6502 a long time ago :lol:

Microprocessors like the 80X86 or microcontrollers like the 8031 by intel has no internal ROM as the PIC's or the AVR's has, so you need to use an external ROM with a startup program.
Even our own PC's has a start up program (BIOS) written on a flash memmory.

I'm well aware of how memory is addressed in micro-processors (as opposed to micro-controllers), as with anything, it gives some advantages and some disadvantages.

My concern was with EEPROM, not FLASH, EEPROM is usually fairly slow, if it's not fast enough you will have problems - as I'm sure you're aware, even EPROM's have speed ratings, and it's important to use memory that's quick enough.

I used a lot of 8031 designs with external EEPROMS but it has 8bit data bus.
I dont think there are a lot of 16bit EEPROMS out there and even if ill find one i have no programmer to program it.
So there must be a way to use a 8bit EEPROM with the 16 bit uP... ill ask my professor tomorow...


You don't need a 16 bit one, simply use two 8 bit ones - use one for the high byte, and one for the low byte, with the address lines connected together - giving a 16 bit memory. This is how SIMM's and DIMM's etc. work, they stack individual chips to give the required width.
 
Using 2 EEProms gives a major problem:
I should divide my program to 2 parts, the even bytes to 1 eeprom and the odd bytes to another eeprom.
I can do it with the programmer i designed but i thought there is simpler way...
 
udi_hakim said:
Using 2 EEProms gives a major problem:
I should divide my program to 2 parts, the even bytes to 1 eeprom and the odd bytes to another eeprom.
I can do it with the programmer i designed but i thought there is simpler way...

I don't really see how it could get any simpler?, it would be trivial to write a program which splits the compiled HEX file into odd and even bytes to give your two separate files.

How big is your EEPROM anyway?.
 
Yes it can't be that hard, ill try it tommorow....

The 2864 EEPROM is 8Kbytes.

I wonder what the motherboards companies does with the BIOS for the new computers, are they using 32 bit flash memory?
 
udi_hakim said:
Yes it can't be that hard, ill try it tommorow....

The 2864 EEPROM is 8Kbytes.
How much of it are you likely to be using?. Obviously, using two of them will give you 16Kbytes - memory is measured in 8 bit bytes, regardless of the bus width.

I wonder what the motherboards companies does with the BIOS for the new computers, are they using 32 bit flash memory?

From what I remember they usually have two flash memory chips on the mother boards - but a lot depends how it's addressed.

The Motorola 68000 series had various chip types, some addressed 8 bit external memory, some 16 bit, and some 32 bit - but all were the same 32 bit processor internally.
 
udi_hakim said:
I wonder what the motherboards companies does with the BIOS for the new computers, are they using 32 bit flash memory?

It's 16 Bit and doesn't need to be wider. When any x86 computer starts it is in real-mode, emulating a 8086. wich had a 16 bit databus.
For a x86 to work in 32bit it has to be switched to protected mode by an application or the OS. Once the OS has switched the cpu to protected mode it should take care of bios calls because the real bios is no longer adressable.
 
Status
Not open for further replies.

Latest threads

Back
Top