how to identify the micro controller

tshuck

Joined Oct 18, 2012
3,534
Maybe you'd think I talk nonsense[...]
When you bring in anecdotes that don't relate to the discussion, yes...

[...]but that way sometimes in software you implement kind of a digital ccircuit, and state machines- the same components the CPU is made of on a very low level.
Yes, a program may, at times, resemble the logical flow of a processor, but that doesn't help anyone get an understanding of how they work.

If I'd be up to memorize and understand literally that document to all details, I'd get old...
No one said you had to memorize anything - understanding the basics and terminology associated with processors allows one to analyze much more complicated designs.
 

takao21203

Joined Apr 28, 2012
3,702
micro controller has 8 bit instruction it means it can do 256 operations like add ,sub , and not, logic .......up to 256 . to decode 256 operations how many control input are required ?
The Z80 would be such a CPU. There is also the possibility to have multibyte opcodes.

For instance the Intel 8086 is using the 0x66 prefix to modify an opcode that follows in terms of operand size.

But yes, if you have 8bits, you have upto 256 possible encodings for opcodes (if let say, you restrict it to single byte opcodes).

In reality however, even single byte opcodes are often followed immediately by another byte for the operand. But somtimes not, you'd just use the 8bit word as opcode, execute, and fetch the next.

The 68000 for instance is using only 4 bits to select the opcode group. Mostly it is a 16bit CPU, means the data bus is 16 bits, and opcodes are 16bits minimum (one word). That said, some can have 32 bits results, internal registers have 32 bits, and, the "best" thing in terms of confusion, the external address bus is only 24 bits- with the lower bit not brought out. Instead, you have /UDS and /LDS (upper and lower data strobe), which can activate one 8bit bank, the other, or both.

Studying the 68000 manuals is also a good idea, to see how an implementation of a CPU looks like.

It contains an internal microcontroller, and a 2 stage opcode ROM. Dont ask me about the bit width for same- actually both ROMs have different bit width.
 

takao21203

Joined Apr 28, 2012
3,702
micro controller has 8 bit instruction it means it can do 256 operations like add ,sub , and not, logic .......up to 256 . to decode 256 operations how many control input are required ?
It is a bit problematic if you only consider a glossary definition of opcode operation.

There are such operations and such operations (an english language expression). Or to be more clear, some can modify the way other operations are processed, others which follow afterwards.

Operations are not always processed the same, depending on the flow of executions, or depending on just anything the designer designed.

You could for instance execute 3 NOPs, when one memory cell is 0xA3, the instruction set is switched to a different one internally, so you'd have 512 encodings with only 8 bits (just an example).
 
Last edited:

Thread Starter

vead

Joined Nov 24, 2011
629
Of course you can. But you don't have to. It could be 5 bit, 9 bit, or 13 bit.

In reality, you dont normally have such affinity.

8bit controller only says the data bus is 8bit, and the regular ALU operations have 8bit operands (not even neccessarily 8bit results).

There is for instance something called EA or effective address- sometimes combined from the PC, and paging bits, and SFRs.

A so-called EA calculation unit. Not normally the input operands will be 8bit and neither the output.

But if you wanted to, it could be.

Make yourself free of that 8bit, 16bit consideration. It is just an agreement. We could have 9bit CPUs. It is an agreement which makes working together easier.

8bit CPU says not much if nothing. It only says "this CPU is built in a way it has an 8bit bus and mostly is dealing with 8bit data", in terms of conformity.

What if we'd have 7bit chips, 13bit chips, 5bit, and 9bit- nothing matching together properly.

So we need "classes" of 8bit, 16bit, 32bit, etc.

Internally, you are not bound to that at all.
that's mean we can use 5 bit 9 bit 13 bit decoder for 8 bit microcontroller I am not sure

to control one operation like add we need 1 control input
to control two operation add, sub we need 2 control input
to control five operation add, sub not nand nor we need 3 control input
 

takao21203

Joined Apr 28, 2012
3,702
If the end product meets the specification, it does not matter at all. You could examine a bit stream (serial CPU).

But if you talk about a straighforward, linear instruction decoder, you are correct.

Let's say. the statment "we need 8bit decoder for 8bit controller" is neither correct nor incorrect. There is no correlaton.

Look the wikipedia article- it mentions the Intel 4004 and the TMS1000- very early CPUs.
http://en.wikipedia.org/wiki/Microcontroller

They only use 4bit words.

The bit class is really merely talking about the external data bus width, and the size of the register file registers.

Here again a list:

z80
8086
68000
TMS1000
Inte 4004
6502 maybe
PIC 16F5X

just a selection.

If you have trouble with one, stop, and ccontinue with one you find easier. That's a method which works for me. If I am stuck, I do something different, where I can make progress easily. Later, I return, and try again.

I have learned electronics and controllers that way, only using the datasheets (and of course, building circuits + running simulation software).
 

Thread Starter

vead

Joined Nov 24, 2011
629
Of course you can. But you don't have to. It could be 5 bit, 9 bit, or 13 bit.

In reality, you dont normally have such affinity.

8bit controller only says the data bus is 8bit, and the regular ALU operations have 8bit operands (not even neccessarily 8bit results).

There is for instance something called EA or effective address- sometimes combined from the PC, and paging bits, and SFRs.

A so-called EA calculation unit. Not normally the input operands will be 8bit and neither the output.

But if you wanted to, it could be.

Make yourself free of that 8bit, 16bit consideration. It is just an agreement. We could have 9bit CPUs. It is an agreement which makes working together easier.

8bit CPU says not much if nothing. It only says "this CPU is built in a way it has an 8bit bus and mostly is dealing with 8bit data", in terms of conformity.

What if we'd have 7bit chips, 13bit chips, 5bit, and 9bit- nothing matching together properly.

So we need "classes" of 8bit, 16bit, 32bit, etc.

Internally, you are not bound to that at all.
1. A Microcontroller is a CPU. It is the same.

8 bit micro controller
8 bit CPU - same thing

8 bit ALU - correcct

8 bit decoder - incorrect. Instruction encoding is normally different size

8 bit data - correct. Obvious.

8 bit instruction - Most CPU have one operand, or two operand, or even more than that for each opcode.

Simple instruction might be 8bit, but might be different size. And some instruction take 2 words or more.

64 k program memory - nobody can know that. Normally, it is less for 8bit chips.

64 k data memory - you need 16bit address for that, and normally 8bit CPU has much less installed memory.

8 bit port input
8 bit port output - Most CPUs have 8bit ports, even 16 or 32bit one's

16 bit timer - No correlation here.

You put together a list but there is not much correlation.
The data size is 8bit, so the ALU also is 8bit but it might have some 16bit operations.

There is also an address generation unit inside controller chips.

2

I'd recommend you to study not just the 16F5X, but also other, more complex 8bit conntroller datasheets.

Happy reading! Some are 300 or 400 pages.

It takes a lot of practice, and reading, and time, to master Microcontroller, and to be able to scribble one on paper, or build with software/FPGA etc.

It takes much less maybe to take a source somewhere, mangle through a compiler, and cobble together a controller core on a large FPGA that somehow works.

3

How about trying displays, such as character LCD, GLCD, and color TFT? It will keep you occupied for months.

Learn the basics first and then try something advanced.
but tako21203 said me 8 bit decoder is incorrect for 8bit microcontroller?
 

takao21203

Joined Apr 28, 2012
3,702
A microcontroller is using internal memory- and that often is NOT 8bit.

A CPU (8bit) of course has to use 8bit from the databus.

It is incorrect as such as you think: 8bit controller means 8bit decoder.

As for incorrect, there is such incorrect, and such incorrect.

As for PICs which I mostly use, it is totally incorrect.

http://map.grauw.nl/resources/z80instr.php

The z80 is not a controller. A CPU is the same as a controller, but just kind of...

Have a look that table, and you'd see it is using 8bit words as such for the opcodes, which can be one-word, two-word, or multi-word.

But I told you, it's not a controller...
 

Thread Starter

vead

Joined Nov 24, 2011
629
A microcontroller is using internal memory- and that often is NOT 8bit.

A CPU (8bit) of course has to use 8bit from the databus.

It is incorrect as such as you think: 8bit controller means 8bit decoder.

As for incorrect, there is such incorrect, and such incorrect.

As for PICs which I mostly use, it is totally incorrect.

http://map.grauw.nl/resources/z80instr.php

The z80 is not a controller. A CPU is the same as a controller, but just kind of...

Have a look that table, and you'd see it is using 8bit words as such for the opcodes, which can be one-word, two-word, or multi-word.

But I told you, it's not a controller...
can you tell me which decoder is use for 8 bit controller 4 bit decoder or 5 bit decoder
 

takao21203

Joined Apr 28, 2012
3,702
can you tell me which decoder is use for 8 bit controller 4 bit decoder or 5 bit decoder
can you create a new blog or a SNS stream on purpose from scratch, trying to be nice, for the sake to entertain people, and design it in a way they become curious to explore it a little, and not just hit the "close window" button after 30 seconds?

Are you eventually more successful at that than trying to understand controllers?

1. Sadly, I often come accross such blogs or SNS streams.
2. It would be nice if you are able to do both things- deal with technology, make a progress, and also entertain people.

Have you had any new insights so far from this thread?
Is there something to you which is still totally unclear besides the number of bits for a decoder?
 
Last edited:

MrChips

Joined Oct 2, 2009
30,795
can you tell me which decoder is use for 8 bit controller 4 bit decoder or 5 bit decoder
There is no right answer to your question.

What is a decoder?
Why would you use a decoder in an 8-bit controller?
What function does a decoder serve in any controller?
 

Thread Starter

vead

Joined Nov 24, 2011
629
There is no right answer to your question.

What is a decoder?
Why would you use a decoder in an 8-bit controller?
What function does a decoder serve in any controller?
decoder is use to decode instruction.I need to decode instruction in controller I used decoder
 

WBahn

Joined Mar 31, 2012
30,045
I just made this recommendation in another thread, but I think it was for a different OP. If not, apologies.

vead, it sounds like you really have no clue what the different parts of a microcontroller do or how they interact. If you did, then most of your oft-repeated questions would answer themselves. How many bits to you need for your instructions? Enough to encode all of the information needed for any single instruction (and keep in mind that not all instructions have to be the same length, but for what you are doing I recommend it).

That's not a put down, just an observation. If true, then you would best be served by studying a simple architecture from the ground up to see how all of these individual pieces play together. A good way to do that, in my opinion, is to work through the Nand2Tetris project.

http://forum.allaboutcircuits.com/blog.php?b=590
 

Thread Starter

vead

Joined Nov 24, 2011
629
I just made this recommendation in another thread, but I think it was for a different OP. If not, apologies.

vead, it sounds like you really have no clue what the different parts of a microcontroller do or how they interact. If you did, then most of your oft-repeated questions would answer themselves. How many bits to you need for your instructions? Enough to encode all of the information needed for any single instruction (and keep in mind that not all instructions have to be the same length, but for what you are doing I recommend it).

That's not a put down, just an observation. If true, then you would best be served by studying a simple architecture from the ground up to see how all of these individual pieces play together. A good way to do that, in my opinion, is to work through the Nand2Tetris project.

http://forum.allaboutcircuits.com/blog.php?b=590
I don't have any Idea how designer decide bit for every part of controller.like ram , rom, decoder and another, there may be many option but how we choose particular bit
 

takao21203

Joined Apr 28, 2012
3,702
I ask you to provide a piece of work as reference.
It can be in your native language.

-A electronic circuit, if possible with photos and demo video
-A software source code, no matter the language
-A text such an essay
-A piece of art such as a drawing (online)
-An online contribution such as a video on youtube

This is neccessary for following reasons

-People can understand the way you work and your experience
-You demonstrate that you have already produced something, since a "controller" is something serious*, not so good as first piece.
-To enable people to give you the right guidance

It could be a free webpage with just a couple of technology links, and your comments on them (to demonstrate that, and how, you are working on the topics).

If you don't want or can not do this, for the time being, also in turn I can not give further advice.

I suggest to get a wordpress blog or google+ blog, and put your ideas. plans and results of your research in a diary (to documentate progress).

2

I looked on youtube, BANDAI VISUAL has claimed copyright and has removed the full length video "Nobody Knows".

I have just uploaded 43 minutes again- let's see what will happen. I can take a copyright strike, no problem. I created the clip from original DVD in high quality.

http://www.youtube.com/watch?v=XpMuULOC63M

*A "controller" as project, is non-trivial, such as for instance a multivibrator, or a NE555 circuit, or a small radio.

Help us to help you :D
 

spinnaker

Joined Oct 29, 2009
7,830
I don't have any Idea how designer decide bit for every part of controller.like ram , rom, decoder and another, there may be many option but how we choose particular bit
The designer first puts together a list of requirements then decides on those things. The reasons are endless. Just look at all of the chips a company like microchip makes. All made to satisfy different design requirements.
 

Thread Starter

vead

Joined Nov 24, 2011
629
I ask you to provide a piece of work as reference.
It can be in your native language.

-A electronic circuit, if possible with photos and demo video
-A software source code, no matter the language
-A text such an essay
-A piece of art such as a drawing (online)
-An online contribution such as a video on youtube

This is neccessary for following reasons

-People can understand the way you work and your experience
-You demonstrate that you have already produced something, since a "controller" is something serious*, not so good as first piece.
-To enable people to give you the right guidance

It could be a free webpage with just a couple of technology links, and your comments on them (to demonstrate that, and how, you are working on the topics).

If you don't want or can not do this, for the time being, also in turn I can not give further advice.

I suggest to get a wordpress blog or google+ blog, and put your ideas. plans and results of your research in a diary (to documentate progress).

2

I looked on youtube, BANDAI VISUAL has claimed copyright and has removed the full length video "Nobody Knows".

I have just uploaded 43 minutes again- let's see what will happen. I can take a copyright strike, no problem. I created the clip from original DVD in high quality.

http://www.youtube.com/watch?v=XpMuULOC63M

*A "controller" as project, is non-trivial, such as for instance a multivibrator, or a NE555 circuit, or a small radio.

Help us to help you :D
everybody say start from basic. I studied about basic gates memory , counter, shift register, flip flop, adder memory and other device. If someone say, design 2 bit and gate, I can design or make 8 bit counter. I can make or say make 8 bit decoder I can make all I can make, IF I know the bit , its very tough for me to find out bit for particular part If anyone can give idea how designer decide bit please tell me . suppose you want to make first micro controller and you are going to make and you don't have any datasheet how you can your self micro controller
how you will be decide the feature
how you will be decide bit for particular part
 

MrChips

Joined Oct 2, 2009
30,795
controller has 8 bit instruction, It can do 256 operation like Add , sub , AND , not.... etc
If your instruction has 256 unique operations then hypothetically you need an 8-bit decoder. But usually many of these instructions are similar and can be grouped in subsets of instructions. So before asking how many bits you need to decode firstly you will have to map out your instruction set.
 

Thread Starter

vead

Joined Nov 24, 2011
629
If your instruction has 256 unique operations then hypothetically you need an 8-bit decoder. But usually many of these instructions are similar and can be grouped in subsets of instructions. So before asking how many bits you need to decode firstly you will have to map out your instruction set.
can we use 8 bit rom and 256x8 bit ram
 
Top