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.
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/
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.
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.
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...
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.
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.
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.
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...
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!.
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!.