8BitChip Forum

Sinclair => Hardware => Topic started by: msolajic on 15-04-2012, 16:51:01

Title: Simple CF interface
Post by: msolajic 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.
Title: Re: Simple CF interface
Post by: Petari 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.
Title: Re: Simple CF interface
Post by: msolajic 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.
(http://fotkica.com/thumbs3/1_tmb_47735425_IMG_20120509_202333.jpg) (http://fotkica.com/slike.php?slika=1_47735425_IMG_20120509_202333.jpg)(http://fotkica.com/thumbs3/1_tmb_47735425_IMG_20120509_202349.jpg) (http://fotkica.com/slike.php?slika=1_47735425_IMG_20120509_202349.jpg)
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.
Title: Re: Simple CF interface
Post by: Petari 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 .