![]() |
Forum Index : Microcontroller and PC projects : Reading SD card.
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
Phil23 Guru ![]() Joined: 27/03/2016 Location: AustraliaPosts: 1667 |
After Just re-flashing it to 5.1 then back to 5.2 & configuring again, I can confirm that the above is not the case. Cheers. |
||||
Phil23 Guru ![]() Joined: 27/03/2016 Location: AustraliaPosts: 1667 |
Still not having any luck with this. Revisited it this morning.... Basically no SD card I have will work. Checked for shorts & dry joints as per matherp's suggestion & none found. Re-soldered pins just in case. Tried the SD card on the display; Reconfigured for no CD, no change. Full size card, 32Gig SDHC, Class 10 that just happened to be sitting by the laptop. Some occasions return "Unable to Access SD Card", other occasions it writes to the card & touch is lost. Tried the same card, display & code on the E100 this morning; 100% reliable; can't get a failure. Test portion of the Pump Demo is changed a little for feedback:- [Code]Case pb_test ' the alarm test button CtrlVal(led_alarm) = 1 GUI beep 250 Open "Test.txt" For Append As #1 Print "File Opened" Print #1, "Hello World", Time$ Print "Hello World", Time$ Close #1 Print "File Closed" [/code] Can hit the "Test" button multiple times & all records written are present on the card. Curious if the experiences Geoff mentions are on the E64 or other chips as well. Cheers Phil. |
||||
Phil23 Guru ![]() Joined: 27/03/2016 Location: AustraliaPosts: 1667 |
Hi all, I don't really understand what goes on inside these chips. Only that there's different capabilities on each pin & that they seem to be in groups internally; the RA, RB, RC designations etc. Thing I noticed between the E64 & E100 is the capabilities on some of the pins used is different. I won't even pretend to know what SOSC1 & USBID mean; just an observation that other might see as relevant or not. Cheers Phil. |
||||
Phil23 Guru ![]() Joined: 27/03/2016 Location: AustraliaPosts: 1667 |
Just noticed a strange anomaly... Touched the test button 1/2 a dozen times and I didn't loose the touch; No Changes; But no data written to the card; Which means the IRQ sub wasn't run; Card was inserted correctly; All GUI objects stayed active. Even touched the Test button a few time with the card out; GUI Stayed active, AND it didn't abort the code as expected due to no card present. Also indicating that the IRQ really wasn't being triggered. BUT, the USB port was in that state where you can't connect to it with MMchat or Teraterm. Com12 in my case, & it was present in Device Manager. Will try & reproduce it. Still using the USB on the E64. USB power to the MM; separated 3.3V supply to the display. Have also tried running it with no USB connection at all, just powering the MM with 5V in, & still the same failure. Phil. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10215 |
Phil Can you post a complete program and any associated files for the SD card. Please provide clear explanations of exactly what you are doing when the problem occurs and then I'm sure one of us can try and replicate. If there is a firmware bug it always helps Geoff to provide the simplest possible program that demonstrates the problem. The 100-pin and 64-pin do have different pin usage so it is not impossible that there is an interaction on the 64 that does not exist on the 100. Please make the demo program as simple as possible |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
Phil, In your list of 'steps' you mention 'card was inserted'. And at the end you say the issue is you lost comms with your computer. All this on an E64. Which PCB version? IF it is 1C then do you have the MCP120 supervisor reset device inserted? If you do, then this is your issue I reckon! Try disconnect the RST pin on the MCP and all will work fine. I may have missed your point here, but high level reading points to the above MCP 'issue' ![]() WW EDIT: I see you have other issues you are trying to 'fix'; but would be interested to know if you have the same issue with the MCP120 removed (or at least it's RST pin) |
||||
Phil23 Guru ![]() Joined: 27/03/2016 Location: AustraliaPosts: 1667 |
Hi Peter, When I originally struck the problem in my own code, I reverted to Geoff Pump Demo, page 36. I added a print line to print the switch position to the console, for feed back. Line 90. For testing writing to the card, I added lines to the Case statement for the alarm test button. Lines 94-103. [Code]Case pb_test ' the alarm test button CtrlVal(led_alarm) = 1 GUI beep 250 Open "Test.txt" For Append As #1 Print "File Opened" Print #1, "Hello World", Time$ Print "Hello World", Time$ Close #1 Print "File Closed" [/code] Pressing the test button should open the file, "Test.txt", and append "Hello World" & the date; then close the file. this also reports to the console. Both E64 & E100 are using the USB on the board. Both have RTC's. Full code below. Simply adds another line to Test.txt every time the test button is pressed. Thanks Phil. 2016-08-29_103249_Pump_Control_Demo_-_For_SD_Test.zip |
||||
Phil23 Guru ![]() Joined: 27/03/2016 Location: AustraliaPosts: 1667 |
|
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9590 |
PCB version is 1B if there is no USB jumper - J1. It should be this one here: ![]() ![]() This version of the PCB does NOT have the supervisory IC on the PIC32 MCLR line, so it won't be interfering with the SD card operation. At least we can rule that out. Watching this thread. Have been reading all your posts Phil, and others. If I have any suggestions, I will chime in, but at the moment I am stumped. If you really can't get any joy out of this one, PM me and I will arrange to send you another one - where I have tested the SD card fully first. The only thing I can suggest to check is that the soldering is OK on all the pins to the uSD socket - perhaps the solder has not correctly flowed there or something. Smoke makes things work. When the smoke gets out, it stops! |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10215 |
Phil Just run your program on my 64-pin backpack OPTION LCDPANEL SSD1963_5,L OPTION TOUCH 51,33,21 OPTION SDCARD 52 The SD card writes and touch both work until I get bored Looks like some sort of problem on your explore64 |
||||
Phil23 Guru ![]() Joined: 27/03/2016 Location: AustraliaPosts: 1667 |
Hi Peter, Difference I see to my own case is:= [Code]OPTION LCDPANEL SSD1963_5, LANDSCAPE OPTION TOUCH 51, 33, 50 OPTION SDCARD 12[/code] for the full sized card on the display; Or OPTION SDCARD 12, 14 When using the MicroSD on the MM's board. I have now tried moving a few connections around; Still no Successful outcome. So that should eliminate some hardware level issues. OPTION SDCARD 55 OPTION TOUCH 51, 21, 50 OPTION TOUCH 18, 21, 50 [Quote]Looks like some sort of problem on your explore64[/quote] Looking that way. I also have 2 CGmicroboard2's here, one with an IL9341 display & a scaled down version of the pump demo. Will try the same on that later & expect it will be successful. Thanks Phil. |
||||
Phil23 Guru ![]() Joined: 27/03/2016 Location: AustraliaPosts: 1667 |
|
||||
Phil23 Guru ![]() Joined: 27/03/2016 Location: AustraliaPosts: 1667 |
Just tried this no one of the CGmicroboard2's I have. Used the Pump Control demo that I monified for the 320x240 display. Added the test code to the alarm test button. First attempt just worked fine; can't get it to fail. As Peter did, I got bored pressing the button. Zero Failure. Cheers Phil. |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9590 |
Sounds suspiciously like a crook unit you have there. ![]() If you PM me or email me, I will arrange to send you a newer 1C version free. Strange...... ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2431 |
possibly not related, and i've only briefly dipped into this thread, but... i have found that when using a netbook (presumbaly same for a laptop) that when the netbook is running from the AC mains adaptor, an attached micromite becomes very sensitive to being touched. the reason for this is that most AC adaptors do NOT pass through a ground connection, leaving netbook and micromite floating up in the air at half mains voltage. there is NO current behind this voltage, so no safety risk, but the PIC32 is quite sensitive/vulnerable when in this electrical 'location'. for myself, i just unplug the AC (the netbook runs for 6 hours on batteries). others may have success with a bonding wire from computer to a good ground connection. cheers, rob :-) |
||||
panky![]() Guru ![]() Joined: 02/10/2012 Location: AustraliaPosts: 1114 |
Phil, I recently had a touch calibrate problem and it turned out to be a dry joint in the spi do line at the 470 chip. Looked fine even with a microscope but at Peter's suggestion, I decide to gently touched the pins with a hot iron - fixed. May net be related buts sounds like a h/w problem. panky. ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
I was suspecting pin 12 (as you were) but this has been eliminated with what you have posted above. One question, is the SD card / Touch issue occurring on either SD socket, or only on one socket? ![]() Worth running an iron around the PIC pins as panky suggests as I can't see it being anything else. WW |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4036 |
hmmmm.... doesn't it point to a problem other than that? I'm not sure exactly what but for example something not tied up / down / driven appropriately / etc. I'm thinking the PIC32 board should cope with such stray signals... John |
||||
Phil23 Guru ![]() Joined: 27/03/2016 Location: AustraliaPosts: 1667 |
Thanks, I gave that a try last night. A couple of bottles of "Flux"; (Read Beer), to steady the hand. Smallest tip I have is 0.8mm, but I was able to see that it was reworking each joint. Still no change. Phil. |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
Any clues here? |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |