Open salocinx opened 2 years ago
Hi,
Thanks for the effort. I have tested with four different cards. Three of them works with a 2GB FAT-partition on both SDBox V1 and V2/Mini. The most compatible one is the one in the middle because it didn't need the 10k pull-up resistor fix on the MISO-line on V1. The other two needed the pull-up fix. The one that I didn't get working was a 4GB card called Intenso that I tried formatting with different smaller partitions but none worked, this card https://www.reichelt.com/de/en/microsdhc-card-4-gb-intenso-intenso-msdhc4g-p83730.html
Hi. Thanks for the info! Others are welcome to share their experience as well :-) I will do some testing and post the results here for further discussion as soon as I find some spare time.
No problem. For what it's worth...I think that Niklas bought the exact same type of Kingston 8GB card as I did and formatted it 2GB FAT and he didn't need to do the pull-up MISO resistor fix on V1, so I guess you can't always rule out a whole model. Perhaps cards are different inside too?, I don't know.
Hi,
Thanks for the effort. I have tested with four different cards. Three of them works with a 2GB FAT-partition on both SDBox V1 and V2/Mini. The most compatible one is the one in the middle because it didn't need the 10k pull-up resistor fix on the MISO-line on V1. The other two needed the pull-up fix. The one that I didn't get working was a 4GB card called Intenso that I tried formatting with different smaller partitions but none worked, this card https://www.reichelt.com/de/en/microsdhc-card-4-gb-intenso-intenso-msdhc4g-p83730.html
I'm getting various results (SDBoxV2) with different MicroSD cards from NOT A DOSDISK to NO DISK FOUND. Used The Netac 8GB to like shown on your picture. Any thoughts ?
No problem. For what it's worth...I think that Niklas bought the exact same type of Kingston 8GB card as I did and formatted it 2GB FAT and he didn't need to do the pull-up MISO resistor fix on V1, so I guess you can't always rule out a whole model. Perhaps cards are different inside too?, I don't know.
That's exactly one of the problems, these SD cards don't follow any precise specification. I lately read this lecture paper and he states:
... which working with is kind of painful as a lot of times SD cards do not behave as theoretically described on sdcard.org or for example in SanDisk’s ambiguous documentation…
I will try to collect some flow-charts for different SD cards, maybe we can make the SD.c
a little bit more compatible/robust. However, I have a SanDisk MicroSD card here, which works perfectly fine on my A600 & A1200, but having lots of troubles on my A3000 & A4000 for example. So I suspect that there is another, OS or Kickstart related issue; beside the different SD card types themselves.
No problem. For what it's worth...I think that Niklas bought the exact same type of Kingston 8GB card as I did and formatted it 2GB FAT and he didn't need to do the pull-up MISO resistor fix on V1, so I guess you can't always rule out a whole model. Perhaps cards are different inside too?, I don't know.
That's exactly one of the problems, these SD cards don't follow any precise specification. I lately read this lecture paper and he states:
... which working with is kind of painful as a lot of times SD cards do not behave as theoretically described on sdcard.org or for example in SanDisk’s ambiguous documentation…
I will try to collect some flow-charts for different SD cards, maybe we can make the
SD.c
a little bit more compatible/robust. However, I have a SanDisk MicroSD card here, which works perfectly fine on my A600 & A1200, but having lots of troubles on my A3000 & A4000 for example. So I suspect that there is another, OS or Kickstart related issue; beside the different SD card types themselves.
Thanks! I did have a version 1 SDBox but that sometimes gave read/write errors on the Amiga when using. I'm testing the V2 SDBox now on several amiga's and differnt microsd cards, but without any good luck.
...lots of troubles on my A3000 & A4000 for example. So I suspect that there is another, OS or Kickstart related issue; beside the different SD card types themselves.
@salocinx
Hi, do you also have a SDBox-Mini to try with?. Does it give the same result? otherwise, I could send you one if you want to do some more extensive testing on all the different Amiga machines.
If there is a problem with the MISO-line on V2/Mini I have thought of a possible fix to use a 74AHCT1G125 (https://www.diodes.com/assets/Datasheets/74AHCT1G125.pdf) instead of the 74LVC1G17 (https://www.diodes.com/assets/Datasheets/74LVC1G17.pdf) because I think HCT actually is better for level conversion 3V3->5V in this case since 2V is enough to indicate a high which will be bumped up to VCC (5V) by the buffer. I have a hunch that maybe 74LVC1G17 powered by VCC (5V) isn't optimal detecting a high level from "all" MicroSD-cards. Regardless, this should solve the ICSP-programming problem of the SDBox-Mini if pin 1 /OE on the IC is held high (with for example a simple jumper to VCC) during programming the output pin (MISO) will be in high impedance state and should not interfere with the flashing of new firmware.
Unfortunately 74AHCT1G125 is also affected by the ongoing chip shortage right now... https://eu.mouser.com/ProductDetail/Diodes-Incorporated/74AHCT1G125SE-7?qs=MKoP7Oyr0W4eY8Y5O8oLCg%3D%3D
For the Arduino/ATMega328 I think VIH -- Minimum INPUT Voltage level to be considered a HIGH is 0.6*VCC equals around 3V on the ATMega328 when VCC is 5V. https://learn.sparkfun.com/tutorials/logic-levels/all#arduino-logic-levels
Regards, J
@jbilander : No I don't have a SDBox Mini yet. If you don't mind I would be happy to get one. I live in Switzerland, not part of the EU, but I also have a friend's German address if that's easier. I would be happy to include it into my tests. How should we exchange our mailing addresses?
Thanks for the explanation. This sounds like an idea we really have to check out :-D ! Too bad 74AHCT1G125SE-7 is currently sold out. Either we try it with another package type, like SOT25 instead of SOT353 for testing purposes, or we give aliexpress a chance. I can order both and send you some samples, no problem. I have to order some parts to finish my Re-Amiga 1200 project anyway.
I also recently noticed that something has changed with the Arduino Nano Clones. I built quite some Plipbox's throughout the past years and I never had real problems by powering them through VIN with a 9V/1A power supply unit. But these "new" Arduino Nano clones only work with USB power. After checking many things, including replacing the AMS1117 voltage regulator with a better solution; I finally desoldered the ATMEGA 328p chip from an "old" working Arduino Nano clone to the "new" Arduino Nano clone. Then the Plipbox began to work again as usual. So something with MCU has changed on these clones. I also noticed, that both VCC and GND, even AVCC are internally connected on the "old" ones, whereas they are not on the "new" ones. So I manually connected these pins together on the "new" one, but without success, still not working when powered by VIN. I also mention this story because it's the same with the SDBox and these "new" clones, it only works when powered by regulated 5V USB. Funny enough, that the old/better ATMEGA 328p chips were those which have been refurbished, i.e. sanded and newly painted; the new ones look untouched.
@salocinx
Cool, I'll send you one, just email me your shipping address to: jorgen.bilander at gmail com It doesn't matter for me Germany or Switzerland but perhaps there are customs problems (import duty and fees) when sending to a swiss address? Do you also need a 5V-from-floppy-port-cable? One of these:
Maybe it could be useful when testing too. Normally the Amigas 5V is somewhat lower around ~4.8V under load. Perhaps it's also of interest to test powering the SDBox this way since using a bad/noisy external power for SDBox I guess could affect things.
I will think a little more about the 74AHCT1G125SE-7. There is also a ...126 that is exactly the same but active high (OE) instead of active low (/OE) on pin 1. Ordering ICs from AliExpress is always a little bit of gamble if you are going to get real or fake chips.
Thanks for the info regarding the clones.
@jbilander : Great, I would be glad if you could send me one of the parallel port power cables to test with. I sent you an email. I will test with the current setup and when 74AHCT1G125SE-7 becomes available again, I can do further testing on the machines I encountered problems.
Here are my promised test results. The MicroSD cards used are the following:
I tested with SDBox Mini and SDBox v2. The 2GB MicroSD was not working on any Amiga. The other two worked fine on A1000, A500, A2000, A600 and A1200 with different Kickstart, Workbench and CPU models. I was not able to make it work on any A3000 nor A4000.
I will try to acquire some more different MicroSD card brands do to further testing.
Unfortunately 74AHCT1G125 is also affected by the ongoing chip shortage right now...
Maybe you should consider using different level shifter like FET based one with almost no propagation, for e.g. SN74CBT3245CPWR
You can also build your own level shifter using BSS138 transistor
Isn't it a bit overkill with bidirectional FETs when only unidirectional lines needed, don't you think?, but feel free to redesign if you want to. I'll soon make a try with these: Mouser has 74AHCT1G126GW125 in stock (1156 pcs at the time of writing): https://eu.mouser.com/ProductDetail/Nexperia/74AHCT1G126GW125?qs=P62ublwmbi%252BsCpFPoi5fgw%3D%3D
I have a couple of these on order so I will soon be able to test if they'll work. I have also updated the SDBox Mini-PCB (I called it Revision 2B) with a jumper setting and a pull-up resistor for pin 1 OE, which I hope will solve the problem with flashing new firmware to the AVR. By setting a jumper block on (grounding OE) while programming it should put the output pin in High-Z and not drive the line and cause any conflict with the SPI-communication from the ICSP-header, I hope, and then you just remove the jumper for normal operation again.
It's not overkill because FET level-shifters are bi-directional by design (i don't know if there are uni-directional versions at all), they're just easy to use have close to 0ns propagation and for few MHz you can even use simple and cheap transistor based variant (there is a module for Arduino with those even).
I'm often using LVT245 even for uni-directional shifting because they're usually same price as LVT244 and sometimes cheaper.
It's not like i'm pressing you to pick one, i'm just saying that sometimes it's better to look for something standard and widely used even if you're going to use 50% of it's capabilities, some good headaches could be circumvented and you're not swimming in tons of different IC's in your home.
Yeah, I mean overkill in the sense of expensive...with a $0.46 74AHCT1G126 we will get proper level shifting 3V3->5V of the MISO-line. HCT has 2V as minimum input voltage to be considered a HIGH and will shift the output to VCC. With CBT they will drive with 3V3 which can be rather tight when used with the Arduino. Minimum INPUT Voltage level to be considered a HIGH is 0.6*VCC equals around 3V on the ATMega328 when VCC is 5V.
Also the FET-bus will not solve the problem with flashing fw on the SDBox-Mini where the MISO-line is driven (by the pull-up resistor pin 7 on SD-card) and hence conflicts when the ICSP-header is used for flashing. With 74AHCT1G126 and its OE-pin we will have a way to set the output pin 4 in high-impedance during programming. At least that's the theory, we'll se how it works out...
I think it should solve it because it is basicly an open-drain with pullup (it doesn't have direction select pin, yet it is bi-directional), current buffer is interferring with programming because it drives full 5V or GND, so programmer can't break through such strong driving, you have to put it to high-impedance. FET drives only GND strong.
With 74AHCT1G126 you just have to pulldown OE with resistor and connect it to pin 14 in parallel port, or alternatively use reset pin (if i remember correctly classic programmers are are holding this signal active during programming).
Flashing of the AVR on the SDBox-Mini is done like this:
and curently U4 cannot be in there when flashing, but with this new updated design:
and 74AHCT1G126 in U4 in place of 74LVC1G17. I should be able to easily ground the OE (pin 1) with a 2.0mm jumper-shunt on JP1 during flashing...and then remove it when done.
It is also a solution :)
I am going to perform some extensive testing on many different Amiga systems with different SD card types. Which is the most compatible SD card brand so far, according to your experience?