Computer doesn't work with CF card
Computer doesn't work with CF card
Currently I am building simple, modular 6502 computer. At this point it runs EhBasic using serial terminal.
At this point my main goal is to configure and run peripherals on my I/O board - beside UART there is a GPIO, timer, 8242 keyboard controller and CF card slot. Yesterday I decided to try with a Compact Flash card.
Card socket is connected directly do the system bus (I have an additional logic generating !RD and !WR signals for Intel bus devices), according to schematic from this page. Everything works fine when the card slot is empty. But when I try to power the computer with the card inserted, it doesn't work. There is either nothing or some random characters on my terminal, instead of standard EhBasic cold/warm boot message.
At first I thought that it might have been because uninitialized card, so I put proper code (initializing card in 8bit mode) at the beginning of EhBasic init section. I didn't change anything.
I checked it with two SanDisk cards. First one is plain 1GB model. The second one is an industrail grade 32MB model. Neither of them works.
Any idea what may be the cause of this weird behavior?
At this point my main goal is to configure and run peripherals on my I/O board - beside UART there is a GPIO, timer, 8242 keyboard controller and CF card slot. Yesterday I decided to try with a Compact Flash card.
Card socket is connected directly do the system bus (I have an additional logic generating !RD and !WR signals for Intel bus devices), according to schematic from this page. Everything works fine when the card slot is empty. But when I try to power the computer with the card inserted, it doesn't work. There is either nothing or some random characters on my terminal, instead of standard EhBasic cold/warm boot message.
At first I thought that it might have been because uninitialized card, so I put proper code (initializing card in 8bit mode) at the beginning of EhBasic init section. I didn't change anything.
I checked it with two SanDisk cards. First one is plain 1GB model. The second one is an industrail grade 32MB model. Neither of them works.
Any idea what may be the cause of this weird behavior?
Last edited by Atlantis on Mon Oct 28, 2019 2:13 pm, edited 1 time in total.
Re: Computer doesn't work with CF cart
Hi, Atlantis. Congrats on getting EhBasic running!
As for the Flash problem, the behavior you describe could be caused by improper chip-select to pin 7 of the Compact Flash card, resulting in it being active at the same time ROM or RAM is active, and thus interfering. What sort of address decoder have you provided to generate the chip-select? And do you have a 'scope or logic probe with which to observe the chip-select signal?
There are other possible causes, of course. What's the clock rate of your computer? Have you provided bypass capacitors? And what's the construction technique -- are you using a solderless breadboard, for example?
A schematic and some photos would be helpful. (And this is a good time to remind everyone that when you post on this forum you're allowed to attach images.
This is a more convenient solution than posting the images on a third-party site, and it's also more permanent.)
-- Jeff
As for the Flash problem, the behavior you describe could be caused by improper chip-select to pin 7 of the Compact Flash card, resulting in it being active at the same time ROM or RAM is active, and thus interfering. What sort of address decoder have you provided to generate the chip-select? And do you have a 'scope or logic probe with which to observe the chip-select signal?
There are other possible causes, of course. What's the clock rate of your computer? Have you provided bypass capacitors? And what's the construction technique -- are you using a solderless breadboard, for example?
A schematic and some photos would be helpful. (And this is a good time to remind everyone that when you post on this forum you're allowed to attach images.
-- Jeff
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
https://laughtonelectronics.com/Arcana/ ... mmary.html
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: Computer doesn't work with CF cart
Following Jeff's idea... 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. If your computer still doesn't power on, then you likely have a problem with the data and/or address lines.
Regards, KM
https://github.com/floobydust
https://github.com/floobydust
Re: Computer doesn't work with CF cart
Can you reset your board? It's possible power-on reset is broken with the CF card in, but a re-reset will work. On similar lines to above, check your power rail voltage and your bypass capacitors - the CF card might be very demanding or very noisy on the rails.
Re: Computer doesn't work with CF cart
Dr Jefyll wrote:
Hi, Atlantis. Congrats on getting EhBasic running!
As for the Flash problem, the behavior you describe could be caused by improper chip-select to pin 7 of the Compact Flash card, resulting in it being active at the same time ROM or RAM is active, and thus interfering. What sort of address decoder have you provided to generate the chip-select? And do you have a 'scope or logic probe with which to observe the chip-select signal?
As for the Flash problem, the behavior you describe could be caused by improper chip-select to pin 7 of the Compact Flash card, resulting in it being active at the same time ROM or RAM is active, and thus interfering. What sort of address decoder have you provided to generate the chip-select? And do you have a 'scope or logic probe with which to observe the chip-select signal?
I measured voltage at CF CS line when card should be inactive. It is 5V.
Quote:
There are other possible causes, of course. What's the clock rate of your computer?
Quote:
Have you provided bypass capacitors?
Quote:
And what's the construction technique -- are you using a solderless breadboard, for example?
- Attachments
-
- 6502_io_ board.pdf
- (47.93 KiB) Downloaded 312 times
-
- 6502_cpu_board.pdf
- (89.4 KiB) Downloaded 299 times
Re: Computer doesn't work with CF cart
Could it be the NMOS CPU and a CMOS CF disagreeing about voltage levels ?
Re: Computer doesn't work with CF cart
Martin A wrote:
Could it be the NMOS CPU and a CMOS CF disagreeing about voltage levels ?
1) There are 74HCT245 chips buffering address bus just before system bus connector (memory chips are connected directly do CPU).
2) Address decoding is done with HCT chips.
3) !RD and !WR signals are also generated with HCT logic.
So only data bus is not buffered.
Memory chips are also CMOS, there is no problem.
I am not the first person who uses CF card with retro hardware...
Re: Computer doesn't work with CF cart
What kinds of tools do you have for investigating? Logic probe, oscilloscope, bus pirate, logic analyser...
Re: Computer doesn't work with CF cart
BigEd wrote:
What kinds of tools do you have for investigating? Logic probe, oscilloscope, bus pirate, logic analyser...
I can use proper digital oscilloscope, but it requires visit in local hackerspace.
Answering earlier question: I tried to manually reset computer. It didn't help.
Re: Computer doesn't work with CF cart
Even with only 8 bits of data capture, it might be useful to watch the databus for a few tens of cycles after reset. And then watch some control signals and then some address bus signals. That is, see if the CPU is executing code at all, with the CF in place. Of course, you can compare traces with and without the CF. (If you have only 8 bits, you might want to capture clock and sync and read-not-write together with a nibble of the databus, and then collect the other nibble in a second run.)
If you can manage to collect a bit more than 8 bits of data capture, I very much recommend using hoglet's decoder:
https://github.com/hoglet67/6502Decoder/wiki
viewtopic.php?p=60330#p60330
If you can manage to collect a bit more than 8 bits of data capture, I very much recommend using hoglet's decoder:
https://github.com/hoglet67/6502Decoder/wiki
viewtopic.php?p=60330#p60330
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: Computer doesn't work with CF cart
If your I/O select is high on the CF card, then you might want to use a logic analyzer or scope on the data and address lines to see if one or more are getting locked into a state.
Also, your posted CPU schematic PDF is the same as the I/O schematic, except that part of the right side dropped to a second page.
Also, your posted CPU schematic PDF is the same as the I/O schematic, except that part of the right side dropped to a second page.
Regards, KM
https://github.com/floobydust
https://github.com/floobydust
Re: Computer doesn't work with CF cart
floobydust wrote:
Also, your posted CPU schematic PDF is the same as the I/O schematic, except that part of the right side dropped to a second page.
BTW maybe it is in fact a power issue? Maybe 100nF bypass capacitor isn't enough and I should add some 22-47uF tantalum in close vicinity of CF card?
- Attachments
-
- 6502_cpu_board.pdf
- (39.1 KiB) Downloaded 292 times
Re: Computer doesn't work with CF cart
Nice looking project!
As for troubleshooting, floobydust had a good suggestion. "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. If your computer still doesn't power on, then you likely have a problem with the data and/or address lines."
Given that two different memory cards produce the same result, this might seem like a pointless exercise. But IMO it's still worth doing.
BigEd also had a good suggestion, but IMO it's best to try simpler measures firstly.
Thanks for providing schematics. Can I suggest you alter them to better identify the chips? "IC3" or "U$1" doesn't necessarily mean much to me!
Ideally, an actual part number would be included, and/or a comment such as "keyboard controller" etc. Also, it'd be appreciated if the schematic can be rendered in monochrome, as some people have difficulty reading schematics that use color.
-- Jeff
As for troubleshooting, floobydust had a good suggestion. "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. If your computer still doesn't power on, then you likely have a problem with the data and/or address lines."
Given that two different memory cards produce the same result, this might seem like a pointless exercise. But IMO it's still worth doing.
BigEd also had a good suggestion, but IMO it's best to try simpler measures firstly.
Thanks for providing schematics. Can I suggest you alter them to better identify the chips? "IC3" or "U$1" doesn't necessarily mean much to me!
-- Jeff
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
https://laughtonelectronics.com/Arcana/ ... mmary.html
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: Computer doesn't work with CF cart
Atlantis wrote:
floobydust wrote:
Also, your posted CPU schematic PDF is the same as the I/O schematic, except that part of the right side dropped to a second page.
BTW maybe it is in fact a power issue? Maybe 100nF bypass capacitor isn't enough and I should add some 22-47uF tantalum in close vicinity of CF card?
Also note that the DS1813 reset chip comes in several trip levels, i.e., when the voltage gets too low, it holds the reset low. Check which one you're using and ensure it's coming off reset.
For examining power lines, an analogue scope is just a very handy tool, as you can easily see any noise, etc. that is on the power lines.
PS - agree with Jeff... nice looking project
Regards, KM
https://github.com/floobydust
https://github.com/floobydust
Re: Computer doesn't work with CF card
I already tried several different solutions:
1) Trying yet another CF cards, including 1GB Kingston and even 4GB Seagate Microdirve HDD.
2) Adding 10uF monolithic + 22uF tantalum capacitors near card slot.
3) Using fuse rated for larger currents (in case if there was a voltage drop)
I've found article which mentions similar problem:
https://ciernioo.wordpress.com/2015/02/ ... face-card/
Maybe it is in fact caused by the lack of buffer on the data bus? Maybe I should design CF card module with proper buffering?
1) Trying yet another CF cards, including 1GB Kingston and even 4GB Seagate Microdirve HDD.
2) Adding 10uF monolithic + 22uF tantalum capacitors near card slot.
3) Using fuse rated for larger currents (in case if there was a voltage drop)
I've found article which mentions similar problem:
https://ciernioo.wordpress.com/2015/02/ ... face-card/
Maybe it is in fact caused by the lack of buffer on the data bus? Maybe I should design CF card module with proper buffering?