Hi, I was wondering how I can make a crystal oscillator circuit for my Z80 project, I have a 3.581Mhz crystal and I would like to use it as a clock source? Which circuit should I use?
Posted on 2004-02-23 20:18:34 by x86asm
The top diagram http://www.part15.org/mwa/tech/circuits/osc-xtal.html should suit your purposes nicely.
Posted on 2004-02-23 22:06:46 by Homer
Microchip has several App Notes on this such as this one.

(Note: I don't believe the proceeding circuit is suitable for driving a logic circuit)
Posted on 2004-02-24 11:32:31 by Ernie
You can use a schmit trigger or even a 74HC04 at that frequency. Just take two resistors about 2.2K you may have to plat with the values alittle. Now tie input and output together of two gates through the resistor. Run output of one gate to input of other gate. Now take Xtal and tie output of one gate to input of other gate through Xtal.
Posted on 2004-02-24 16:34:12 by mrgone
Ernie, I use that cct in my PIC16f84a in-cct programmer :)
The only difference being R1 = 390 ohm rather than 220 ohm, because the transistors I had on hand were saturating at that current.
Posted on 2004-02-24 22:59:36 by Homer
Wow that's cool! I built a programmer once for Intel 28F001 Flash. I used a 386EX processor of all things..lol but it had multiple functions. It has 132 pins on the surface mount processor. Yjen one day I dropped it and it broke :( wah-wah. I put it together with strap wire and Elmers glue. Try to fix it a couple of times but no luck. The world of technology moves too fast to keep messing with old stuff. I think I'll just buy programmers these days unless I can make a buck designing one in which case I'll make gerber files and get a PCB made for it.
Posted on 2004-02-26 12:57:04 by mrgone

You can use a schmit trigger or even a 74HC04 at that frequency. Just take two resistors about 2.2K you may have to plat with the values alittle. Now tie input and output together of two gates through the resistor. Run output of one gate to input of other gate. Now take Xtal and tie output of one gate to input of other gate through Xtal.


Hey can you draw a quick schematic, neatness is really not important, just as long as I read it, because I really don't comprehend, I don't have a degree in EE :confused:

NOTE: I would also like to interface the system to the parallel port to download code to system RAM, what I have is two IC's in mind, using a 74LS373 and a 74LS245 if needed (probably not), any tips and pointers would be nice :D
Posted on 2004-02-29 19:55:07 by x86asm
I had to attach the drawing. I cant figure out how to paste an image????? So frustrating. Oh well
Posted on 2004-02-29 21:00:02 by mrgone
Do you have processor on PCB board? I have used USART NS16440 and PC serial port for that purpose. The attachment is just that oscillator
Posted on 2004-02-29 21:14:17 by mrgone

Do you have processor on PCB board? I have used USART NS16440 and PC serial port for that purpose. The attachment is just that oscillator

I'm doing wire wrap, I think it may get too complicated if I add a USART, how many pins is it? And where can I find it? The one with the prvious stated parts will be unidirectional PC->Z80, because the Z80 won't be able to write data back with my current design but I would like it to be bidrectional, preferably through serial so I can just open up HyperTerminal or some other terminal software and communicate with the machine as well.
Also is it OK if I use a a LS part instead of an HC part for the inverter?

Also, I can get an 82C51 USART from futurlec for $3.45 US, I already have some MAX232's so I'm thinking that should be enough to get interfaced for bidirectional communication. I don't want to use a 16550 because I mean another 40 pin DIP is too much and I really don't need the FIFO's for extra speed, anything is OK (even 300 bps), speed is not really a concern just wanna talk to the PC :D

Think it is a good idea to purchase the chip ? It is a 28pin DIP.

Thanks :grin:
Posted on 2004-03-01 14:27:56 by x86asm
Just get data sheets with it. The 74LS04 is not a good choice. Pulls alot of power and is slow. If you must use LS than use schmit trigger 74LS14. The "HC" stands for "High speed CMOS". I would use HC or AHC or even better "AHCT" which is "Advanced High Speed CMOSS Technology". You can get all these parts a www.digi-key.com. They are alittle high in price but readily available. Let me know how it goes? I have some DOS programs of old serial interfaces I wrote to do the same thing. You could probably get some good tips from. I'll send them if you like.
Posted on 2004-03-02 12:44:57 by mrgone

Just get data sheets with it. The 74LS04 is not a good choice. Pulls alot of power and is slow. If you must use LS than use schmit trigger 74LS14. The "HC" stands for "High speed CMOS". I would use HC or AHC or even better "AHCT" which is "Advanced High Speed CMOSS Technology". You can get all these parts a www.digi-key.com. They are alittle high in price but readily available. Let me know how it goes? I have some DOS programs of old serial interfaces I wrote to do the same thing. You could probably get some good tips from. I'll send them if you like.


Please send the code, I would really appreciate it, thanks, I will sure let you know how it goes but I guess I'll need to get some 74HC04's so it may take some time and since my studies are relatively heavy at the moment I can't get as far as I would like to in a specified amount of time. I'm confused I thought TTL was faster and CMOS was slower :S

Thanks I'll order the 74HC04 and 8251 ASAP.

BTW would you know how much percentage error in baud rate with the PC serial port tolerate? Thanks :D
Posted on 2004-03-02 15:13:52 by x86asm
Yeah high speed CMOS is faster. You don't have to worry about tolerance on 8251 though I'm accustome to Nat'l Semi-conductor family ie NS16450 etc. The stop bits and start bits do a good job in synchronization. When you place your order make sure you get crystal for 8251. I beleive the freq. for NS16450 is 1.8432 MHz. Chips like Intel 80l188EB and 386EX have serial ports built in and can derive the USART frequecy from the processor clock. I actually still have some CMOS 8088 processors with BIU chip that divide the frequency into 33% duty cycle. I've done some design with Z80 but was a long time ago. What are you using for daisey chain interrupt controller? I used MOSTEK MK3881. I beleive they are out of business now. I'll get those files together. They are from PC side and unit side. Keep up with your studies and goog luck :alright:
Posted on 2004-03-02 18:00:12 by mrgone

Yeah high speed CMOS is faster. You don't have to worry about tolerance on 8251 though I'm accustome to Nat'l Semi-conductor family ie NS16450 etc. The stop bits and start bits do a good job in synchronization. When you place your order make sure you get crystal for 8251. I beleive the freq. for NS16450 is 1.8432 MHz. Chips like Intel 80l188EB and 386EX have serial ports built in and can derive the USART frequecy from the processor clock. I actually still have some CMOS 8088 processors with BIU chip that divide the frequency into 33% duty cycle. I've done some design with Z80 but was a long time ago. What are you using for daisey chain interrupt controller? I used MOSTEK MK3881. I beleive they are out of business now. I'll get those files together. They are from PC side and unit side. Keep up with your studies and goog luck :alright:


With the current amount of devices I have and the type of devices, the 8251 is the only device that can generate interrupts really, so I will hook it up directly to the INT line or I may choose not to use INT's and poll the STATUS word in the 8251 to check if there is a new byte, I believe a 2400 bps or something like that I will be able to sample it fast enough, I could be wrong , if so let me know :) I'm not sure what speed crystal to order, I would like a 9600bps rate and I think the Z80 can keep up with the transfer of data across the line. Ya Mostek is out of business, I have an SGS Z80 :D, I've already designed the IO and memory address decoders from some AND gates and inverters (using a simple memory scheme and IO decode scheme, like 01h-IO1, 02h-IO2, 04h-IO3...etc)
uses the least amount of wires and saves me some headaches :D . Once I have something up I will let all of u guys know how much fun I'm having :D

BTW are u an EE ? (Electrical Engineer?)



Much thanks for the files I could use the examples :D
Posted on 2004-03-02 21:35:51 by x86asm
Yeah EE. These files are in BIOS and on PC for serial communication. The coma12 etc are PC side at 1200 BPS.
Posted on 2004-03-03 11:51:07 by mrgone

Yeah EE. These files are in BIOS and on PC for serial communication. The coma12 etc are PC side at 1200 BPS.


Which files do I disassemble?, I'm kinda confused here, there is no source :S
Posted on 2004-03-03 19:11:28 by x86asm
Are you familiar with DOS "Debug.exe"? Just type:

from c:\>

type: Debug coma12.com <enter>
then type: u 100 <enter>

You will see port numbers etc.
Posted on 2004-03-03 20:39:56 by mrgone

Are you familiar with DOS "Debug.exe"? Just type:

from c:\>

type: Debug coma12.com <enter>
then type: u 100 <enter>

You will see port numbers etc.


Ohhhh, I see it thanks mrgone :D , hey I'm looking into going into the field of EE, if this is too personal you don't have to answer but what is your job function? What do u do for ur living?
Posted on 2004-03-03 20:50:44 by x86asm
Well the manufacturing sector here in US has been rather tough so I have been free lancing doing design contracts for whatever I can muster up....lol. Looking brighter here for immediate future.
Posted on 2004-03-04 14:04:39 by mrgone