6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Mon Sep 30, 2024 2:32 am

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Sat Jul 30, 2011 11:01 pm 
Offline

Joined: Tue Feb 01, 2011 3:10 am
Posts: 41
I have pretty much finished transferring my homebrew computer from bread to protoboard, however I seem to be having a problem with the serial circuit. It's a 6551 chip, with a MAX232 to convert voltages. It seems the circuit works when I press down on the crystal, while resetting. Thought it could be a wiring problem so I resoldered the crystal wires. Now it doesn't work at all! I used garth's 22pf cap idea at pin 6 to ground idea to clean the signal btw (which worked before). Voltages at both ends seem good, so any ideas what I causing it?


Top
 Profile  
Reply with quote  
PostPosted: Sun Jul 31, 2011 1:14 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8407
Location: Midwestern USA
ioncannon wrote:
I have pretty much finished transferring my homebrew computer from bread to protoboard, however I seem to be having a problem with the serial circuit. It's a 6551 chip, with a MAX232 to convert voltages. It seems the circuit works when I press down on the crystal, while resetting. Thought it could be a wiring problem so I resoldered the crystal wires. Now it doesn't work at all! I used garth's 22pf cap idea at pin 6 to ground idea to clean the signal btw (which worked before). Voltages at both ends seem good, so any ideas what I causing it?

I know that Garth's circuit does work (having used that same circuit way in the past) and will produce a clean signal. You didn't precisely define what you mean by "Now it doesn't work at all!" However, assuming the circuit is completely DOA, here's what I'd look at.

First determine if the crystal is oscillating. If you have a 'scope you should be able to detect a clean and symmetric waveform at the crystal. A logic probe can also help if a 'scope isn't handy. If you see nothing, suspect the crystal. Clock crystals are high volume commodity parts and a 2-3 percent failure rate per lot is not unheard of. Also, you may need to bond the crystal's case to ground to get a stable oscillation.

If the crystal is oscillating and the signal is present at pins 6 and 7 (PDIP package) of the 6551, verify that you have a Ø2 clock present at pin 27 of the 6551. Also, tie DCD (pin 16) low for testing (and leave low if you aren't going to connect a modem).

The 6551's chip selects should be active as soon as a valid address is placed on A0-A15 by the MPU. When Ø2 goes high D0-D7 will become valid and you should be able to read or write the chip. Interfacing the 6551 with the 65C02 is very straightforward (a little less so with the 65C816).

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 04, 2011 7:29 pm 
Offline

Joined: Tue Feb 01, 2011 3:10 am
Posts: 41
Well it seemed to have been a mixture of broken crystal and not grounded crystal. I think the reason it worked when I touched it was my finger was grounding the case. Thanks for the info, didn't realize they had to be grounded. I don't know how it worked before, probably a stray ground wire grounding it or something. Anyway, soldered a ground wire to the new crystal and I am getting output. It's coming in as the wrong characters (I am using my old Win3.1 computer as a terminal, so maybe that is why) but the amount that comes in is correct so the cpu/ram/rom/6551 side of things should be correct. Probably the Terminal program isn't set correctly.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 04, 2011 8:43 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8521
Location: Southern California
Then I wonder if there's something else wrong with the crystal and grounding the case just got oscillation started but at the wrong frequency. Do you have a 'scope or frequency counter? I have never grounded the case of the crystal (it usually came with a gray heat-shrink plastic insulating label over it anyway) and have never had any problem. I put the crystal from pin 6 to pin 7, and a 22pF capacitor from 6 (the input) to ground.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Aug 05, 2011 5:05 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8407
Location: Midwestern USA
GARTHWILSON wrote:
Then I wonder if there's something else wrong with the crystal and grounding the case just got oscillation started but at the wrong frequency. Do you have a 'scope or frequency counter? I have never grounded the case of the crystal (it usually came with a gray heat-shrink plastic insulating label over it anyway) and have never had any problem. I put the crystal from pin 6 to pin 7, and a 22pF capacitor from 6 (the input) to ground.

If all else fails, try substituting a TTL oscillator, which you would connect to pin 6 on the 6551, leaving pin 7 open. The gibberish you are seeing on your terminal may be, as Garth suggests, due to an incorrect frequency (should be 1.8432 MHz) or a speed/format/parity mismatch caused by an incorrect setup value in the control register.

I have, on occasion, run into crystals that weren't stable if the case wasn't grounded. I suspect in this particular case (no pun intended) that there may be other issues. What type of capacitor did you use for that 22pf part?

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Aug 07, 2011 8:39 pm 
Offline

Joined: Sun May 08, 2011 7:39 am
Posts: 104
I went through all this when I tried to build a UK101 clone. The clock just would not tick, even though it is exactly the same as the original machine. Have you a circuit diagram of just the clock circuit?

Here's a link to the one that worked:

viewtopic.php?t=1795&postdays=0&postorder=asc&start=120

That's part of a long long thread that describes the build and all the problems I encountered (and eventually overcame with the help of the community). On my machine, the clock circuit runs at 8Mhz which is then divided down three times by a 74LS93 to yield 1Mhz for the CPU.

Actually there is a lot of good advice on that thread. In the end the frequency counting multimeter was the winner, because I couldn't quite afford an oscilloscope, as well as a logic probe and NOP generator.

Regards

JonB


Top
 Profile  
Reply with quote  
 Post subject: Tick, Tock, Fix My Clock
PostPosted: Mon Aug 08, 2011 2:17 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8407
Location: Midwestern USA
jonb wrote:
I went through all this when I tried to build a UK101 clone. The clock just would not tick, even though it is exactly the same as the original machine. Have you a circuit diagram of just the clock circuit?

Here's a link to the one that worked:

viewtopic.php?t=1795&postdays=0&postorder=asc&start=120

That's part of a long long thread that describes the build and all the problems I encountered (and eventually overcame with the help of the community). On my machine, the clock circuit runs at 8Mhz which is then divided down three times by a 74LS93 to yield 1Mhz for the CPU.

Actually there is a lot of good advice on that thread. In the end the frequency counting multimeter was the winner, because I couldn't quite afford an oscilloscope, as well as a logic probe and NOP generator.

Regards

JonB

I believe that was a circuit for generating an MPU clock. All you need for a UART is a suitable crystal and trim capacitor, or a TTL can oscillator. I no longer fool around with crystals, as the can oscillators (the half-size ones that fit a DIP8 socket) take up no more PCB real estate that a crystal and produce a very clean output. The only additional component required is the usual decoupling cap between Vcc and Gnd.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 11, 2011 6:12 pm 
Offline

Joined: Tue Feb 01, 2011 3:10 am
Posts: 41
The gibberish was a really simple fix. It was due to incorrect frequency (thought it was 19200 not 9600) in the terminal. It seems to all work now.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: