• 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.

design idea for micro controller

Parth86

Member
1) You can start from zero and make something new. How do you know if it will do the job.
2) You can copy the 8051 or 8052 and know it is doing many jobs now.
3) You can make a option 1.5 that is partly 8051 and part from your head.

Look at the 8051 instructions set. Can you make a machine that will do some of these functions?
I don't want to copy, I want to design and implement myself on software using fpga with verilog code. I have done little work

micro controller design
8 bit micro controller
8 bit CPU
8 bit ALU ( alu perform 8 bit data)
? bit decoder
8 bit data
8 bit instruction( it can do 256 operation)
? program memory
256x4 bit data memory
8 bit port input
8 bit port output
16 bit counter
IS is correct ?
 

ronsimpson

Well-Known Member
Most Helpful Member
I don't want to copy, I want to design and implement myself on software using fpga with verilog code. I have done little work

micro controller design
8 bit micro controller
8 bit CPU
8 bit ALU ( alu perform 8 bit data)
? bit decoder
8 bit data
8 bit instruction( it can do 256 operation)
? program memory
256x4 bit data memory
8 bit port input
8 bit port output
16 bit counter
IS is correct ?
Why 256x4 bit data memory? Your data is 8 bit, 8 bit ALU. You should have 256x8 data memory.
Your instructions are 8 bit so the program memory should be 8 bit.
 

Parth86

Member
Why 256x4 bit data memory? Your data is 8 bit, 8 bit ALU. You should have 256x8 data memory.
Your instructions are 8 bit so the program memory should be 8 bit.
that means, 8 bit program memory is internal rom and 256x4 bit is internal ram. can we use external ram and rom, how many bit are need to make external ram and rom?
 

NorthGuy

Well-Known Member
It will be hard to live with 8-bit instruction size. Instruction must fit an opcode and operands. 12-bit instructions will be better. 16-bit instructions will provide for very flexible addressing (which you do need on such a small microcontroller).
 

ronsimpson

Well-Known Member
Most Helpful Member
that means, 8 bit program memory is internal rom and 256x4 bit is internal ram. can we use external ram and rom, how many bit are need to make external ram and rom?
1) You can use external ROM and RAM. You are making the computer. You can do what ever you want.
2) I don't know how big a program you will write. I don't know how much ROM you need.
3) I don't know how much data you need to store. I don't know how much RAM you need.

4)"256x4 bit is internal ram" 256x8 must be 8 bit wide.

I am sorry to say this: You do not know enough to do this project.

People before you have done this many times. Learn from them.
A) All data is 8 bits. All RAM is 8 bits wide. Not 256x4 but 256x8.
B) Most 8 bit computers can address 64000 of memory. (ROM and RAM)
B1) Why 64000....because that is what a 16 bit program counter can address
B2) Why 64000...of RAM. Because a 16 bit data pointer can address that much memory.
B3) That does not mean you have to have that much memory but that is the maximum. You can have 2000 of memory or 1000 or 256.
B4) You could have a maximum of 256x8 of RAM and only have 8 bit data pointers. That would be easy. How much memory do you need?

"how many bit are need to make external ram and rom?" I can not answer. That is for you to answer. I don't know what you will do with this computer.
I search a list of micro controllers and found how much ROM some have.
256, 512, 1024, 2048, 1k, 2k, 4k, 8k, 16k, 32k, 64, 128k, 256k, 512k, 1m, 2m, 4k, 6m
The smallest I found is 256 ROM and the largest is 6,000,000.
For RAM the smallest I found is 16x8 and the larges I found was 1,000,000x8.

You can not do much with a computer that has 256 instructions (max program size) and 16 data numbers.
 

Parth86

Member
1) You can use external ROM and RAM. You are making the computer. You can do what ever you want.
2) I don't know how big a program you will write. I don't know how much ROM you need.
3) I don't know how much data you need to store. I don't know how much RAM you need.

4)"256x4 bit is internal ram" 256x8 must be 8 bit wide.

I am sorry to say this: You do not know enough to do this project.

People before you have done this many times. Learn from them.
A) All data is 8 bits. All RAM is 8 bits wide. Not 256x4 but 256x8.
B) Most 8 bit computers can address 64000 of memory. (ROM and RAM)
B1) Why 64000....because that is what a 16 bit program counter can address
B2) Why 64000...of RAM. Because a 16 bit data pointer can address that much memory.
B3) That does not mean you have to have that much memory but that is the maximum. You can have 2000 of memory or 1000 or 256.
B4) You could have a maximum of 256x8 of RAM and only have 8 bit data pointers. That would be easy. How much memory do you need?

"how many bit are need to make external ram and rom?" I can not answer. That is for you to answer. I don't know what you will do with this computer.
I search a list of micro controllers and found how much ROM some have.
256, 512, 1024, 2048, 1k, 2k, 4k, 8k, 16k, 32k, 64, 128k, 256k, 512k, 1m, 2m, 4k, 6m
The smallest I found is 256 ROM and the largest is 6,000,000.
For RAM the smallest I found is 16x8 and the larges I found was 1,000,000x8.

You can not do much with a computer that has 256 instructions (max program size) and 16 data numbers.
thanks for giving the information First I will read the datasheet of 8 bit micro controller and If I having any problem I will post here but I have another question how to design Instruction set for micro controller
 

ronsimpson

Well-Known Member
Most Helpful Member
8 is a good binary number. 1000b
8 bits can hold a ASCII letter. "A", "B", "C", "1", "2", "3" etc.
It is very common for the data path to be 8 bits.

There are two major types of computers.
>Some have the data and instructions on the same wires. So the instruction size is the same as the data size.
>Some have the data and instructions separate. So there is no reason to have the same width. In this case use 5, 9 or 13.

Your instruction decoder needs to be the size for how many instruction you have.
example: using 8 bit instruction (could be and number)
Bits 0,1,2,3,4 go to instruction decoder. Bits 5,6,7 go to address decoder
Bits 0-4 call out instruction like ADD to Working Register, and Bits 5-7 choose what register like "C"
So ADD_A and ADD_B and ADD_C etc. are the same instruction but pointing to a different place.

In the above example every instruction is one clock long in time. There is another method where instructions are different amounts of clocks.
Example: ADD_B is two bytes long. Byte1=ADD instruction and byte2=B
Example: ADD_B_Q is three bytes long. ADD, B, Q --OR-- ADD_B_C could byte1=ADD and Byte2 is (4 bits)=B, (4 bits)=C this is 2 bytes long instructions.

I think you should get a 8051 or PIC development board and write some machine language programs FIRST.
 

Parth86

Member
.

There are two major types of computers.
>Some have the data and instructions on the same wires. So the instruction size is the same as the data size.
>Some have the data and instructions separate. So there is no reason to have the same width. In this case use 5, 9 or 13.
If the data is 8 bit and instruction is 16 bit then which one decoder may be used 5,9 or 13 bit?
 

Parth86

Member
I have looked some datasheet and I have done some little work

Micro controller features

8 bit micro controller
8 bit ALU
8 bit data
8 bit instruction
8 bit input port
8 bit output port
4K bytes program memory on chip (ROM)
8K bytes data memory on chip (RAM)
64K program memory(external ROM)
64K data memory (external RAM)
16 bit counter
16 bit data pointer
16 bit stack pointer
64k stack address


I know its not enough to make micro controller. I need to know more
please check out my features If somewhere I am wrong please tell me I will work again
 

Mike odom

Active Member
The data and the address bus widths are rarely the same. On the 8085 microprocessors, the data was 8 bits, but the address was 16 bits (same with the 8051 microcontroller, you can put the code memory external). The instructions were of 1, 2, or 3 byte lengths, depending on the instructions and where the operand was located. On the 8086, the data was 8/16 bit (8088/8086), and the address was 20 bit. In order to run 8 bit code (software development cost a lot more than hardware) and get 8 bit users to migrate to the new 16 bit processors, the 20 bit address was obtained by adding a segment register to a 16 bit operand/address register. So the 8086 has a superset of the 8085 instructions. It runs all the originals, plus a few segment resgister commands that won't be found in 8 bit code, so they had no effect on the processor. This is the 64k limit of the old .com programs. Remember that DOS can run three program types: .exe, .bat, and .com.

The original IBM PC used the 8088 (8086 16 bit core with 8 bit data interface) to save on memory width. IC memory was also expensive in those days, so IBM chose a 9 bit memory interface architecture, but used the 16 bit cpu core to address 1M bytes of memory.

ALU width depends on what types of functions you are trying to do. 8x8 multiply? You better be able to access a 16 bit output register. Most micros do this by using register pairs. Divide Instruction? 8 bit / 8 bit isn't very practical, but 16 bit / 8 bit is.

Decoder? Is this the instruction decoder? The instruction decoder width would depend on how many instructions you want to use. This is where the CISC and RISC battles take place (complex instruction set computer, and reduced instruction set computer). Complex instruction set computers can do a powerful operation in one instruction, but may take 2, 3, or 4 CLOCK CYCLES to carry out each instruction. This is because of the complex decoding an operation of each instruction. RISC machines have a very simple set of instructions and complete each instruction in one CLOCK CYCLE. However, it may take 2 or 3 instructions to do the same task as a CISC machine. Our guided missiles had the very first 'microprocessor' design for its control computer. What makes a microprocessor different from the 'normal' computer of the day is that most computers used instruction decode loops (hardware) to carry out instructions. Each instruction had a chain of logic gates that was responsible for implementing the instruction, gating data in a sequential order. With the microprocessor, it has a micro decode ROM, and each instruction op code is actually a pointer to a program to carry out that instruction. Basically, it is a set of gating commands. Data from each decode ROM address is put into the micro decode register, 80 bits long in the case of the guidance computer on the missile, and each 1 or 0 in the instruction register caused the gating of data from point a to b. 80 bits long means there were 80 different flow commands it could turn on and off in sequence. That sequence being programmed from the micro decode ROM.

I also know that Intel built the prototype for the 80286 ('286) in TTL logic on 10 breadboards. Here is a pic of the 8085 die. I believe the micro decode ROM is the lower left. Also, on the block diagram, you can see how they group 2 8 bit registers into 16 bits. The HL register was also the index register.
 

Attachments

Parth86

Member
The data and the address bus widths are rarely the same. On the 8085 microprocessors, the data was 8 bits, but the address was 16 bits (same with the 8051 microcontroller, you can put the code memory external). The instructions were of 1, 2, or 3 byte lengths, depending on the instructions and where the operand was located. On the 8086, the data was 8/16 bit (8088/8086), and the address was 20 bit. In order to run 8 bit code (software development cost a lot more than hardware) and get 8 bit users to migrate to the new 16 bit processors, the 20 bit address was obtained by adding a segment register to a 16 bit operand/address register. So the 8086 has a superset of the 8085 instructions. It runs all the originals, plus a few segment resgister commands that won't be found in 8 bit code, so they had no effect on the processor. This is the 64k limit of the old .com programs. Remember that DOS can run three program types: .exe, .bat, and .com.

The original IBM PC used the 8088 (8086 16 bit core with 8 bit data interface) to save on memory width. IC memory was also expensive in those days, so IBM chose a 9 bit memory interface architecture, but used the 16 bit cpu core to address 1M bytes of memory.

ALU width depends on what types of functions you are trying to do. 8x8 multiply? You better be able to access a 16 bit output register. Most micros do this by using register pairs. Divide Instruction? 8 bit / 8 bit isn't very practical, but 16 bit / 8 bit is.

Decoder? Is this the instruction decoder? The instruction decoder width would depend on how many instructions you want to use. This is where the CISC and RISC battles take place (complex instruction set computer, and reduced instruction set computer). Complex instruction set computers can do a powerful operation in one instruction, but may take 2, 3, or 4 CLOCK CYCLES to carry out each instruction. This is because of the complex decoding an operation of each instruction. RISC machines have a very simple set of instructions and complete each instruction in one CLOCK CYCLE. However, it may take 2 or 3 instructions to do the same task as a CISC machine. Our guided missiles had the very first 'microprocessor' design for its control computer. What makes a microprocessor different from the 'normal' computer of the day is that most computers used instruction decode loops (hardware) to carry out instructions. Each instruction had a chain of logic gates that was responsible for implementing the instruction, gating data in a sequential order. With the microprocessor, it has a micro decode ROM, and each instruction op code is actually a pointer to a program to carry out that instruction. Basically, it is a set of gating commands. Data from each decode ROM address is put into the micro decode register, 80 bits long in the case of the guidance computer on the missile, and each 1 or 0 in the instruction register caused the gating of data from point a to b. 80 bits long means there were 80 different flow commands it could turn on and off in sequence. That sequence being programmed from the micro decode ROM.

I also know that Intel built the prototype for the 80286 ('286) in TTL logic on 10 breadboards. Here is a pic of the 8085 die. I believe the micro decode ROM is the lower left. Also, on the block diagram, you can see how they group 2 8 bit registers into 16 bits. The HL register was also the index register.
8051 make with cmos technology I think its very tough point. do you have any idea which simulator is used to make cmos circuit ?
 

Mike odom

Active Member
8051 make with cmos technology I think its very tough point. do you have any idea which simulator is used to make cmos circuit ?
no, the 80C51 is made with cmos logic. I used them when they first came out in 1986. the 8051 was bipolar logic.
no, I do not know what process they use. There are many versions of the 8051, itself being an architecture not a process. The design software will depend on the process being used (NMOS I, NMOS II, NMOS III, etc).
 

Parth86

Member
I am little bit confused on following things

I am doing all work on software tool
1) what is functional design design for 8 bit micro controller?
2) what is logic design for 8 bit micro controller ?

can any one explain with small example .....thanks
 

Latest threads

EE World Online Articles

Loading

 
Top