Author Topic: Simple CF interface  (Read 6799 times)

0 Members and 1 Guest are viewing this topic.

Offline msolajic

  • Administrator
  • *****
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Join Date: Aug 2010
  • Posts: 6
  • Country: cs
  • Gender: Male
Simple CF interface
« on: 15-04-2012, 16:51:01 »
I've made the simple CF interface from http://zx48.8bitchip.info/zxcf.htm and it works only halfays - it can load form CF but not save to CF.
Tried with standard & big sector LBA roms, it just won't work.
Any ideas?

Update 16.04.
Tried with a second CF card, writing works but some data corruption occurs (on a standard screen maybe 8 bytes are corrupt). But reading doesn't work reliably on this card. Anything I've tried to load just crashes the Speccy.
« Last Edit: 16-04-2012, 22:39:00 by msolajic »


Offline Petari

  • Administrator
  • *****
  • Thank You
  • -Given: 2
  • -Receive: 56
  • Join Date: Aug 2010
  • Posts: 609
  • Country: 00
Re: Simple CF interface
« Reply #1 on: 09-05-2012, 17:37:51 »
This is very likely signal timing problem. When I designed simple CF IF, I had only 128MB Sandisk card. But most of newer CF cards requires ATA3-4 spec. signal timings. Old micro's buses can not deliver it - mostly writing is problem, because write line on IDE closes too late, when data on data bus is not reliable anymore. Solution against it is adding monostable, which will shorten write signal, so it closes while data is still valid. 
I need to make docs for this and put it online ...

What are card brands and types you used ?  And I'm not sure that reading is really problem with second card. Did you write with Speccy, or with PC ?   Of course, even reading may be unreliable with some cards. IF is very simple, so don't expect miracles.

Offline msolajic

  • Administrator
  • *****
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Join Date: Aug 2010
  • Posts: 6
  • Country: cs
  • Gender: Male
Re: Simple CF interface
« Reply #2 on: 09-05-2012, 20:47:10 »
I have used three cards so far, a Kingston 2GB card, and two Cisco Systems branded 64MB cards, of which one is manufactured by SanDisk. Both cards were initially written on the PC by means of Drive Image, with the sample 128MB image from the site.
Reading them back on the PC works with no problems. Reading on the Spectrum works flawlessly with the Kingston one, but fails randomly with both of the Cisco cards.
Writing to the cards doesn't work on the Kingston card. Nothing new appears in the catalogue.
At first I thought that writing fails on Cisco cards, corrupting a byte or two in each KB, but after transferring the saved data to PC it loaded back in emulators correct.
After some fiddling with the interface I've built, it became obvious that by touching the PCB tracks "improves" reading to a point that no corruption appears. If I hold my finger across the CF connector, sometimes it would load the file correctly. It must be some stray capacity messing the signals up, because I've designed the PCB in a hurry, and there is a lot of "vias" made from thin enameled copper wire.
Here are the pictures.

Those two resistors are pullups, for which I thought would increase stability, but they didn't work. Also, a blob of solder was used on the CF connector to connect a line that I forgot to connect to ground.

Offline Petari

  • Administrator
  • *****
  • Thank You
  • -Given: 2
  • -Receive: 56
  • Join Date: Aug 2010
  • Posts: 609
  • Country: 00
Re: Simple CF interface
« Reply #3 on: 11-05-2012, 10:58:14 »
What will likely fix unreliable reading:  add one thantal cap. of about 10-22microF  + ceramic of 100-220nF  between  power (+5V) and GND of CF socket.
I'm on doing fixing for Kingston card writing problems .