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.

A whole lot of question (z80 related, along with some others)

Status
Not open for further replies.
What is a "Counter Timer Circuit" and what does it do?
 
A Z80 CTC (Counter Timer Chip) has a number of counters. When you connect a syncronous clock to the input of a counter we call it a timer because all the clock pulses are the same distance apart.

If we connect an asyncronous clock to the input we call it a counter because it "counts" events like people going through a turnstyle, but gives no information about the interval between the people.
 
Marks256 said:
Let's not start the "PICs are better" thing. Ok? I will start with PICs when i feel that i am good and ready.
I was under the impression that you had already started.

At any rate, I would prefer you learn the simple and common things, before learning the complex and rare things.

The "devices insert instructions during interrupts" is an 8080/Z80 weirdness that AFAIK no other line of processors use. There were many competitors to Intel and Zilog, and if anyone else used that weird protocol, I'm not aware of it.

Most, if not all, other processors handle interrupts pretty much the same way the PIC does. The IBM mainframe, the Pentium, Motorola microprocessors and microcontrollers, and many others. The processor (not the device!) performs the equivalent of a subroutine call.
 
Ok. Scratch the question on how keyboards handle multiple inputs. I think i figured it out on my own. ;) Instead of the keyboard just being a bunch of buttons hooked up to high, some sort of scan system goes through (demux?) each individual line looking for keys that are on or off. that way, if two keys are pressed in one row, and one in another, the device won't get confused. this way, only ONE "row" has it's data being read. not the whole keyboard at a single given time... right?


blueroomelectronics said:
Hey Marks256, here's a ZX81 clone schematic (yes Z80 with video)
**broken link removed**
http://oldcomputers.net/

Thanks for the link to the clone! :D and to oldcomputers.net ;)

tkbits said:
At any rate, I would prefer you learn the simple and common things, before learning the complex and rare things.

To me, this is simple. This is how I learn. Just because YOU may learn by starting out simple, and getting more and more complex, doesn't mean EVERY body learns that way. Call me weird, call me crazy, whatever. I learn more by failing then i do succeeding.
 
OK, you're weird and crazy.

twenty five years ago, the available home computer technology was a major encouragement and opportunity for people to learn and progress in electronics and programming. the current trend is to make the user more and more remote from the technology they're using. the fun is leaking away.
 
the fun is leaking away.
I think that's why Marks256 wants to play with the z80. Not very practical, but much more "fun" for him than a PIC. People build tube amps. Why not vintage computers? It's a hobby for most of the people here.
Marks256 said:
some sort of scan system goes through (demux?) each individual line looking for keys that are on or off. that way, if two keys are pressed in one row, and one in another, the device won't get confused. this way, only ONE "row" has it's data being read. not the whole keyboard at a single given time...
That's pretty much how most keyboards work; a scanned matrix of keys.
 
kchriste said:
I think that's why Marks256 wants to play with the z80. Not very practical, but much more "fun" for him than a PIC. People build tube amps. Why not vintage computers? It's a hobby for most of the people here.

Thank you! I couldn't have said it better (not the song, either... :D)

kchriste said:
That's pretty much how most keyboards work; a scanned matrix of keys.

Ok. Thanks.




Another question. How does an 8 bit processor handle numbers larger then 255?
 
Marks256 said:
..
Another question. How does an 8 bit processor handle numbers larger then 255?
One byte or nybble at a time. Check out instructions that set and use the carry flag.
 
Its handles larger numbers the same way you do when not using a calculator. ie: When doing addition on paper, you will only deal with single digits at a time and use "carries" to move the values in excess of 9 to the column on the left:

56 + 37 =??

6 + 7 = 13
So keep the 3 in the units column and add the 1 to the 5 & 3 in the 10s column ( 5 + 3 + 1carry = 9 ) so the answer is 93. The 8 bit processor program has to do the same thing except it only has to carry when the answer exceeds 255 (For unsigned math) or 127 (For signed math).
Funny thing on this topic is that I only really learned math once I started writing assembler: I'd never thought about the fact that multiplication is just a form of addition. ie: You can figure out 7 x 13 just by adding 13 to itself 7 times. Too much emphasis on just memorizing multiplication tables when I was growing up I guess. :rolleyes:
 
Papabravo said:
One byte or nybble at a time. Check out instructions that set and use the carry flag.
kchriste said:
Its handles larger numbers the same way you do when not using a calculator. ie: When doing addition on paper, you will only deal with single digits at a time and use "carries" to move the values in excess of 9 to the column on the left:

56 + 37 =??

6 + 7 = 13
So keep the 3 in the units column and add the 1 to the 5 & 3 in the 10s column ( 5 + 3 + 1carry = 9 ) so the answer is 93. The 8 bit processor program has to do the same thing except it only has to carry when the answer exceeds 255 (For unsigned math) or 127 (For signed math).
Funny thing on this topic is that I only really learned math once I started writing assembler: I'd never thought about the fact that multiplication is just a form of addition. ie: You can figure out 7 x 13 just by adding 13 to itself 7 times. Too much emphasis on just memorizing multiplication tables when I was growing up I guess.

Aaah... that sounds simple! :)

Does anyone know of any books (free would be nice... as in ebooks, but not a requirement) that i can get to read up on z80 Assembly? I understand what most of the op codes do, but there are a few that i can't figure out what their purpose is...
 
Marks256 said:
Does anyone know of any books (free would be nice... as in ebooks, but not a requirement) that i can get to read up on z80 Assembly? I understand what most of the op codes do, but there are a few that i can't figure out what their purpose is...

If you don't understand it, you probably don't need to know about it - a 16F PIC has only 35 instructions, and probably a third of those are only very rarely used (some I've NEVER used!).

As always, build one, and play with it - rather than keep asking silly questions!.
 
Marks256 said:
Does anyone know of any books (free would be nice... as in ebooks, but not a requirement) that i can get to read up on z80 Assembly? I understand what most of the op codes do, but there are a few that i can't figure out what their purpose is...

Why don't you go to the Z80 support website and get whatever information is available?

Zilog Z80 CPU user manual and other related infos

For those OP codes that troubles you, you can then ask here.
 
Nigel Goodwin said:
If you don't understand it, you probably don't need to know about it - a 16F PIC has only 35 instructions, and probably a third of those are only very rarely used (some I've NEVER used!).

As always, build one, and play with it - rather than keep asking silly questions!.

Is my name Marks35? No. It is Marks256!

I like silly questions.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top