6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Sep 20, 2024 11:39 am

All times are UTC




Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
PostPosted: Mon Nov 04, 2019 9:48 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
floobydust wrote:
you could easily tie /CS0 high (bypass your select logic) and see if you still have a problem. This would simply have the CF card on the data and address bus, along the WR and RD signals.
Forgive me returning to this point, Atlantis, but I'm unclear on whether the matter has been settled. Did you actually try this? I didn't notice any specific mention.

Here's a more detailed explanation of what I'm thinking. AIUI, the computer is always OK except when the CF card is plugged in, and then it's never OK. The card's /Chip-Select has been measured, and seems to be high. (I'm not sure what instrument you used for the measurement, but some instruments are inappropriate, and all can suffer from human factors and even outright flukes. Myself, I would simply tie /CS high and thus remove any doubt.)

Alright, so let's say the /CS pin on the socket is tied high and the computer still fails; it will only work if the card is physically removed from the socket. Here's one theory to explain that.

Trouble in a new project often is the result of a wiring error. The CF card itself probably has several pins which serve as Ground, and all these pins are connected together... inside the CF card itself. So, suppose on the CPU side there's a data line (or other) which, due to error, connects to a socket pin which in turn is bused together with the other Grounds inside the CF. That means the data line (or whatever) gets shorted to Gnd whenever the card is plugged in. But the short disappears if the card is physically removed from the socket.

Other example are possible. If I were in your place I'd check the wiring. And/or do some single-stepping right from reset, or get a LA trace from reset as Ed suggested.

Have fun and keep us posted!

-- Jeff

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 05, 2019 8:55 am 
Offline

Joined: Tue Jun 19, 2018 8:28 am
Posts: 122
Dr Jefyll wrote:
Here's a more detailed explanation of what I'm thinking. AIUI, the computer is always OK except when the CF card is plugged in, and then it's never OK.


Exactly.

Quote:
The card's /Chip-Select has been measured, and seems to be high. (I'm not sure what instrument you used for the measurement, but some instruments are inappropriate, and all can suffer from human factors and even outright flukes.


I used multimeter to measure voltage on CS line. It was 5V (well, 4.98V to be precise...) so in high state.

Quote:
Myself, I would simply tie /CS high and thus remove any doubt.


Ok, I admit that I didn't check it yet. I simply assumed that CS line is not a cause of that problem, after measuring voltage. I will check it, just to be sure.

Quote:
Trouble in a new project often is the result of a wiring error. The CF card itself probably has several pins which serve as Ground, and all these pins are connected together... inside the CF card itself. So, suppose on the CPU side there's a data line (or other) which, due to error, connects to a socket pin which in turn is bused together with the other Grounds inside the CF. That means the data line (or whatever) gets shorted to Gnd whenever the card is plugged in. But the short disappears if the card is physically removed from the socket.


This theory makes sense, but I checked connections on my schematic multiple times. It looks identical to the one from this site. So if if there is no error there, the only explanation will be that some neighboring pins are bridged somewhere. But I also examined connections under magnifying glass and everything looks fine.

Well... There is one difference. In my circuit pin 45 (LED ACTIVITY) is not connected. I assumed it is just an output and left in unused. Is it possible that this is the cause of my problem?

Quote:
And/or do some single-stepping right from reset


Unfortunately my design doesn't include single stepping possibility.


Attachments:
cf.png
cf.png [ 10.87 KiB | Viewed 967 times ]
Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 05, 2019 1:26 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Atlantis wrote:
I used multimeter to measure voltage on CS line.
OK, well, that tells us the CS line was high most of the time. :wink: But it's not a reliable test. If the line had sparse pulses to the low state then the multimeter wouldn't reveal this. A 'scope or logic probe, or your Logic Analyzer, would be a better instrument to use. Or, as I said, just tie the line high. Let us know how that works out. :)


Quote:
Unfortunately my design doesn't include single stepping possibility.
It's pretty easy to hack together an external circuit to generate single-step pulses, which then serve as the Clock signal for your board. Garth has info on this near the bottom of this page.

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 06, 2019 3:18 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1382
I’ll ask the obvious... are you sure that all lines that are grounded, are in fact tied to ground and the same for for VCC? I’ve seen cases where ground, supply voltage and signal lines appear to be connected but had some level of resistance which caused issues. It worth doing a test and ensure that the connections are solid and will conduct some level of current as well.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 06, 2019 9:45 pm 
Offline

Joined: Tue Jun 19, 2018 8:28 am
Posts: 122
floobydust wrote:
I’ll ask the obvious... are you sure that all lines that are grounded, are in fact tied to ground and the same for for VCC?


As you can see on the schematic above. If there is no faulty connection, everything should be fine.

Anyway, I tried to tie CompactFlash CS0 signal permanently to the VCC, with 1k pull-up resistor. It didn't change anything. Computer still doesn't work when the cards is inserted into the slot.


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 07, 2019 5:52 am 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1382
Okay, so let's try this another way....

In short, if you don't plug in a compact flash card, the system is fine and it boots up. If you do plug in a CF card, it doesn't boot up. So, there just aren't that many variables to resolve.

1- Address lines: - ensure they go where they're supposed to go and they are wired correctly.
2- Data bus lines: - the same as above.
3- Selects lines: Check both CS0 and CS1, in short, tie both to Vcc without resistors and check to make sure they are held high.
4- WR and RD lines... make sure they are not being held in a state when you have CF card installed (or disconnect them and tie the CF lines high).
5- Make sure the lines held high via resistors are in fact at a high voltage level when the CF card is plugged in.
6- Make sure the lines held low (to ground) are in fact at a low logic level when the CF card is plugged in.

While you're schematic shows Vcc (+5) and Gnd, no pins are identified as going to the CF socket. Double-check your PCB layout and ensure the lines are correctly routed to the CF socket. If you have all ground, Vcc, data, address lines connected correctly, and have both CSx lines held high, there's no reason it should prevent the system from booting. If it still does, you likely have a wiring error to the CF socket.

I would also tie pin 45 to a resistor and LED for an access indication... if it lights up when you plug in the card, then it's being accessed and you have something to chase after.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 07, 2019 7:54 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
floobydust wrote:
If you have all ground, Vcc, data, address lines connected correctly, and have both CSx lines held high, there's no reason it should prevent the system from booting. If it still does, you likely have a wiring error to the CF socket.
Also, if the card itself is fried (internal shorts) then that'll bring the system down, even with /CS tied high.

Earlier it was mentioned that two cards are available. It's possible both are defective, but let's assume at least one of them is OK (although we don't know which one). So, here's a reminder: when you do a new test (such as with /CS tied high), run the test twice -- once with each card. Otherwise the result may be misleading.

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 07, 2019 11:07 am 
Offline

Joined: Tue Jun 19, 2018 8:28 am
Posts: 122
About the PCB design, it looks like this.


Attachments:
cfpcb.png
cfpcb.png [ 176.24 KiB | Viewed 860 times ]
Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 07, 2019 11:47 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
I think I saw in a previously linked article that someone had trouble with 2 CF cards but was OK with a third. So maybe trying out only two cards isn't enough - maybe you need quite a spread to find one which works. Something about the timing, or the pinout, or the power, which makes some - maybe most - CF cards uncooperative.

Something is certainly wrong, and it's not obvious what. In such cases, it's always worth revisiting assumptions and previous observations, because it's quite possible that something you believe to be true isn't so, and that's a big clue to the underlying fault. Of course, every time you review the design, you are likely to conclude that all is well - it's just that this isn't helpful, when you know that all is not well.


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 07, 2019 2:39 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1382
Atlantis wrote:
About the PCB design, it looks like this.


Well, the PCB layout looks correct, good news there!

There is the slight chance of a hairline short between pins 2 and 26 however. Note that when the CF card is inserted, it grounds pins 25 and 26. As these are not connected to anything, a slight short between pins 26 and 2 would result in databus D3 shorted to ground. It's worth taking a closer look there just to be safe. The same can be the case on the opposite side, with pins 25 and 49, but that "shouldn't" keep the board from booting up.

Beyond this, perhaps you really do have two defective CF cards.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 07, 2019 8:50 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
floobydust wrote:
Double-check your PCB layout and ensure the lines are correctly routed to the CF socket.
Yes. And remember, as part of the double-check, to verify that the layout for the CF socket hasn't accidentally been created backwards -- a mirror image. That kind of error can arise due to confusion between the component-side view of an item and the copper-side view.

Don't forget to also question the documents you're using for reference, as they may happen to be easily misread or, in rare cases, just plain incorrect. In a head-scratching case like this, I would consult a second document for verification.

( Cautionary tale: in this post on CBM Hackers, Jim Brain wrote... )
Quote:
"I had been using the following datasheet for the 6509 reference: http://archive.6502.org/datasheets/mos_6509_mpu.pdf

Which is linked from Wikipedia, and from the 6502.org web site.

which shows pin 40 as PHI2_IN, and pin 38 as PHI1_IN

But, the p500 schematics on Zimmers.net shows them reversed:

http://www.zimmers.net/anonftp/pub/cbm/ ... 01of15.gif

[ ... ]

Thus, it appears the official datasheet is wrong, and has been wrong for 40 years.

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Fri Nov 08, 2019 7:48 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1382
There's one other possible gotcha as well. You can get an inverse socket. If you look closely at compact flash media, there is a slot down each side, but they are different widths. This is how the media is keyed to the socket. Some manufacturers make an inverse socket, where the slot keys are reversed, so the media pops in backwards, i.e., flip it over and insert it.

Based on the PCB layout, pin 1 is towards the right side, looking from the back where the socket is soldered to the PCB. Based on this, the label on the top of the CF card would be showing when inserted, even with the socket on the back side of the PCB. If this is not the case, then it's an inverse socket and there's a (big) problem!

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 09, 2019 1:57 pm 
Offline

Joined: Tue Jun 19, 2018 8:28 am
Posts: 122
Things are getting even weirder. I decided to solder different CF card slot. So I removed the old one and cleaned pads with solder wick. Using the opportunity, I inspected pads with magnifying glass. There was no sign of short circuit between neighboring pads.
After mounting new socket nothing had changed. Computer behaves in exactly the same way as before...


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 09, 2019 2:18 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1382
Well, if you've verified that all the connections are correct for the CF card (not an inverted socket, etc.), then I suppose it's possible that you have two defective cards. Do you have the option to try the CF cards with a modern PC via something like a USB adapter? Or even an older CF to IDE adapter (I have a couple of these which are useful from time to time).

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 09, 2019 2:23 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Atlantis, can we be certain it's not the case that the old CF socket and the new one you installed are both inverse?

Knowing how tricky it can be to write (and to read) a physical description like the one floobydust provided, maybe you should provide us with a photo of the card in the socket. Then he can directly determine whether you have the inverse style. Just a suggestion. :)

If the sockets really are OK then I agree the next theory to consider is that you have two defective cards.

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 86 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: