Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] Sd Card issues with Pic184520

Status
Not open for further replies.

mectrojohnny

Newbie level 2
Joined
Aug 20, 2015
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
20
Greetings all, I am just delving into sd/Mmc with pic18f4520, I have read tons of library and gotten some example files from online, The hex files from these files works quite well but should I edit even a single Lcd Line char, the whole thing stops working. Pls the whole thing is really driving me not for a long time now, find attached a sample file form Tareq Domi i got


and proteus simulation

Tareq file.jpg

and my edited file.


and proteus simulation

my file.jpg

The line edited was just to change from " Lcd_Out(1,1,"Fat Init ok"); to Lcd_Out(1,1,"SD WORKING"); in the attached rar to test it.

Thank you in anticipation
 

Can you please explain what you mean by "...stops working"?
Also can you compile the code (unaltered) and run that or does it only work with some pre-compiled version of the program? (Some of the image files have dates that are about 18 months earlier than the source file.)
Finally does this work in real hardware? If so then it could be a bug in the simulator.
Susan
 

Thank you, " By stopped working," I meant Lcd goes blank, Micro controller port shows inactivity and no sign of communication b/with SD and pic and I am just working with simulation now, not yet built the hardware, You can also just open the test. rar files and edit anything in the c files and simulate to have a clearer picture of what am saying. Thank
 

I don't have Proteus (I don't like simulators and I do my development work with the Microchip IDE and compilers, but that is just my preference).
Looking again at your code, where is your main loop? Without it the program will "end" (something that an embedded application should never do) and return the the default C runtime. Not known MikroC I cannot say what will happen then but other default C runtime code will reset the device and then call the 'main' function again. This would result in an endless loop where nothing would appear to happen.
I suspect that the hex file you used (which you say was working) contained the main loop but the code you have tried to update and compile does not.
Susan
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top