Share this post

Link to post

Share on other sites

First of all, we don't help directly with homework, and that's what this sounds like. Second of all, your source code is poorly formatted (use the "source" and "/source" tags, replacing quotes with square brackets). Thirdly, your problem is poorly documented (what does "doesn't work" mean; what did you expect to see, and at what point during execution, and what did you see instead? In the case of a compiler error, what was the error and where was it?)

Provide more specific information and somebody might be able to give you some guidance, but it's highly unlikely that anybody is going to come along and correct your code wholesale for you. That's your job.

Share this post

Link to post

Share on other sites

You realize there are forums from Microchip specifically for your choice of micro controller, right? That said, I doubt even they will take the time to figure out what's going on without you doing a little bit more work on narrowing the problem down.

0

Share this post

Link to post

Share on other sites

As for the hardware, it is working. I am only having problems with the software.Regarding my project, they are not my homework. I hope i can help the blind more as the market has very few deice that can help the blind to find their direction. So this is my project work.

I am looking for help here because i don't know much about C language and i still trying to learn more about it.

Share this post

Link to post

Share on other sites

Finding the correcting the faults in your code isn't as simple as reading it over and easily finding it. Depending on the fault you'd probably need to read the datasheets for the digital compass and the voice record/playback chip and look at the circuit diagram (to see how the PIC is actually connected to everything else).

Personally I suggest getting an oscilloscope or logic analyser hooking it up to your circuit and seeing if the various pins are outputting what you think they're outputting (i.e. to start recording on your voice chip, you might hold some pin high and put an address to record the voice to on some other pins, so when you press the record button see if this happens, and if not work out why not). You can also run your code in the MPLab emulator, of course it won't emulate the stuff external to the PIC but you should be able to at least see if it's doing the correct things with the pins. You can also get in-circuit debuggers which can help a lot.