|
Page 1 of 2 |
Author |
Message |
Grogster
Admin Group
Joined: 31/12/2012 Location: New ZealandPosts: 9063 |
Posted: 11:35pm 18 Oct 2015 |
Copy link to clipboard |
Print this post |
|
Hi all.
Is there any chance another parameter could be added to the OPTION SD CARD command, to nominate an I/O pin which would go high briefly whenever the SD card is accessed.
...like the Maximite used to have... Smoke makes things work. When the smoke gets out, it stops! |
|
kiiid
Guru
Joined: 11/05/2013 Location: United KingdomPosts: 671 |
Posted: 11:49pm 18 Oct 2015 |
Copy link to clipboard |
Print this post |
|
You can solve this in the hardware. Just add a LED which will be on when the /SEL line is low
http://rittle.org
-------------- |
|
Grogster
Admin Group
Joined: 31/12/2012 Location: New ZealandPosts: 9063 |
Posted: 12:07am 19 Oct 2015 |
Copy link to clipboard |
Print this post |
|
Excellent idea kiiid.
Should have thought of that myself, actually.....
Problem solved. Smoke makes things work. When the smoke gets out, it stops! |
|
kiiid
Guru
Joined: 11/05/2013 Location: United KingdomPosts: 671 |
Posted: 01:21am 19 Oct 2015 |
Copy link to clipboard |
Print this post |
|
This is the simplest possible solution. I have used it many times
http://rittle.org
-------------- |
|
Grogster
Admin Group
Joined: 31/12/2012 Location: New ZealandPosts: 9063 |
Posted: 02:27am 19 Oct 2015 |
Copy link to clipboard |
Print this post |
|
Lovely. With your permission, I will steal this circuit for my needs. Smoke makes things work. When the smoke gets out, it stops! |
|
kiiid
Guru
Joined: 11/05/2013 Location: United KingdomPosts: 671 |
Posted: 03:23am 19 Oct 2015 |
Copy link to clipboard |
Print this post |
|
Feel free
http://rittle.org
-------------- |
|
Grogster
Admin Group
Joined: 31/12/2012 Location: New ZealandPosts: 9063 |
Posted: 09:11pm 14 Jan 2016 |
Copy link to clipboard |
Print this post |
|
@ kiiid - I have just got around to testing this idea out, and it causes the MM+ to refuse to see the SD card. If I remove the pullup and short out the LED so that CS is connected directly to the MM+ as in Geoff's circuit, the card is accessible and works fine, but the resistor and LED on CS cause the MM+ to report: 'SD card is not accessible.'
Do you have any other ideas or mods I could try?
Perhaps a higher value of resistor?
...perhaps it needs transistor isolation.
I guess what is PROBABLY happening, is that when the MM+ pulls the SD_CS line low to enable the card, this lights the LED, but in doing that, it must not be pulling SD_CS low enough as far as the card is concerned, so it ignores the MM+ trying to talk to it(as it is treating this situation as CS not being low), and the MM+ times out with the error message. Smoke makes things work. When the smoke gets out, it stops! |
|
kiiid
Guru
Joined: 11/05/2013 Location: United KingdomPosts: 671 |
Posted: 11:08pm 14 Jan 2016 |
Copy link to clipboard |
Print this post |
|
Hm... that is interesting. Did you measure the voltage on the CS pin?
Have you tried to leave the resistor, but short the LED only and see what will happen? Then we can think a bit more... This is strange because I have used this method before and it worked just fine. But we must find the cause in your case. http://rittle.org
-------------- |
|
Grogster
Admin Group
Joined: 31/12/2012 Location: New ZealandPosts: 9063 |
Posted: 11:30pm 14 Jan 2016 |
Copy link to clipboard |
Print this post |
|
Have you used this method with the MM+?
I'm just wondering if it is one of those rotten things that works fine on one platform, but not on another. Smoke makes things work. When the smoke gets out, it stops! |
|
kiiid
Guru
Joined: 11/05/2013 Location: United KingdomPosts: 671 |
Posted: 12:06am 15 Jan 2016 |
Copy link to clipboard |
Print this post |
|
Yes, with MM+... what is your LED? http://rittle.org
-------------- |
|
Grogster
Admin Group
Joined: 31/12/2012 Location: New ZealandPosts: 9063 |
Posted: 01:10am 15 Jan 2016 |
Copy link to clipboard |
Print this post |
|
I'm using a 1206 SMD LED. I have removed the LED and the 1k pullup for now, but I will perform the following test:
1) Replace the LED and 1k with new ones
2) Reconnect to the MM+
3) Connect the CS line to a standard I/O pin
4) Set that pin low to hold the CS line low.
At this point, the LED should be lit, and I will measure the voltage on the CS pin on the SD-card socket with respect to ground.
EDIT: Here is a shot of my SD-card carrier. I note I have forgotten the 100k to deck you have on your design.... Would this be the cause?
Edited by Grogster 2016-01-16 Smoke makes things work. When the smoke gets out, it stops! |
|
kiiid
Guru
Joined: 11/05/2013 Location: United KingdomPosts: 671 |
Posted: 01:11am 15 Jan 2016 |
Copy link to clipboard |
Print this post |
|
Leave the pullup in place, just shorten the LED. What is the result? http://rittle.org
-------------- |
|
Grogster
Admin Group
Joined: 31/12/2012 Location: New ZealandPosts: 9063 |
Posted: 01:14am 15 Jan 2016 |
Copy link to clipboard |
Print this post |
|
Acknowledged - will do - stay tuned.
Also, I note your R11 is a pullup to CD2, not deck, so ignore what I said about that. Smoke makes things work. When the smoke gets out, it stops! |
|
Grogster
Admin Group
Joined: 31/12/2012 Location: New ZealandPosts: 9063 |
Posted: 01:33am 15 Jan 2016 |
Copy link to clipboard |
Print this post |
|
UPDATE
YES - SD card WORKS with the LED shorted out, and 1K still in place. Smoke makes things work. When the smoke gets out, it stops! |
|
robert.rozee Guru
Joined: 31/12/2012 Location: New ZealandPosts: 2289 |
Posted: 01:56am 15 Jan 2016 |
Copy link to clipboard |
Print this post |
|
i'm pretty sure that pin 2 of J2 should be connected to the other side of the LED. that is, the -SEL output from the MX470 connects directly to pin 2 of J2, and an LED in series with a resistor (3k3 recommended) is connected between 3v3 and -SEL.
cheers,
rob :-) |
|
Grogster
Admin Group
Joined: 31/12/2012 Location: New ZealandPosts: 9063 |
Posted: 02:02am 15 Jan 2016 |
Copy link to clipboard |
Print this post |
|
Hey Rob.
I will do a quick hack on the PCB and test that idea. Smoke makes things work. When the smoke gets out, it stops! |
|
Grogster
Admin Group
Joined: 31/12/2012 Location: New ZealandPosts: 9063 |
Posted: 02:16am 15 Jan 2016 |
Copy link to clipboard |
Print this post |
|
LED lights, stays on, and MMBASIC crashes.
Remove SD card, and re-insert, and MMBASIC restarts.
CS is connected directly to MM+ pin 12, LED+1k8 resistor between 3v3 and CS.
LED is out until you ask for something like FILES command, then LED lights(which would be right - CS line should be low to select the SD-card), but stays on at that point and MMBASIC falls over.
At 3v3, I would expect that 1k8 is a good enough value.
Perhaps the easiest solution to this problem is transistor isolation....
EDIT: Cycled power, and now it is working.
LED lights when commands like FILES are issued, which is what I wanted, and it goes out when that is complete. MMBASIC not locking up anymore. Perhaps it was just a one-time thing?Edited by Grogster 2016-01-16 Smoke makes things work. When the smoke gets out, it stops! |
|
robert.rozee Guru
Joined: 31/12/2012 Location: New ZealandPosts: 2289 |
Posted: 02:22am 15 Jan 2016 |
Copy link to clipboard |
Print this post |
|
a transistor, or even just a buffer would be a good solution, though i wouldn't have expected a LED + 1k8 resistor to cause problems unless the timing on the -SEL line is extremely tight. try a 10k resistor and see what happens - the LED will only light dimly, but it is a start. |
|
Grogster
Admin Group
Joined: 31/12/2012 Location: New ZealandPosts: 9063 |
Posted: 02:24am 15 Jan 2016 |
Copy link to clipboard |
Print this post |
|
Rob - please see my edit to my post above, but the experimentation continues..... Smoke makes things work. When the smoke gets out, it stops! |
|
robert.rozee Guru
Joined: 31/12/2012 Location: New ZealandPosts: 2289 |
Posted: 02:40am 15 Jan 2016 |
Copy link to clipboard |
Print this post |
|
oops, you were editing while i was typing! have noticed before, that once you've started editing a post new postings can be added by others without disrupting or preventing your editing.
odd that it started working, but stranger things have happened at sea!
you don't perchance have a digital scope there do you? it would be interesting to capture the -SEL (CS) pulse happening, along with the SPI clock line to see how much leeway there is between the -SEL signal being asserted and data communications with the card starting. similarly, the time between communications finishing and -SEL being released.
my suspicion is that (a) -SEL is controlled entirely at the discretion of the MM firmware, and (b) that the timing is a tad tight at one end or the other. note that different SD cards will have different requirements regarding the margins required - so whereas some cards may be ok, others will fail to function. i have seen such problems in a real-world product that a company i worked for shipped out to customers. our solution at the time: customers were told they should only use cards 'certified' (and sold) by us!
if it is just a timing issue, it can almost certainly be fixed by geoff with a few strategically placed NOP instructions.
cheers,
rob :-) |
|
|
Page 1 of 2 |