free 8051 Microcontroller Projects AVR PIC Microcontroller Projects Tutorials Ebooks Libraries, interfacing tutorials, lcd tutorial, stepper motor, dc motor 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems

 
8051 microcontroller 8051 microcontroller
Forums

Moderators: Ajay, Junied , abbas1707, Arun Kumar V, pdi33, Shailesh NAYAK, ۞ TPS ۞, shyam, sashijoseph
Author Post
gaza2k1
Tue Feb 26 2008, 05:17AM
 User Offline
Registered Member #6288
Joined: Tue Feb 26 2008, 05:09AM

Posts: 1
Thanked 0 times in 0 post
Hi all,

Im in the final stages of a project and have hit a big glitch need your help! please

I have the arm evaluator 7t connected to a pc running metrowerks codewarrior.
I am trying to open a text file hosted on the pc hard drive

When i try and run my code in the emulator mode (armul) the code works fine the file is found and ll is well. However when i run the same code on the arm board it runs and says it cant find the file. The code in question is:-

CODE:
FILE *file_ptr;
        int address[2014], value[2014], i, j;
        file_ptr = fopen("M:\\Documents\\final project local\\book1.txt","rt");
        if (file_ptr !=NULL)
                {
                        printf("settings file found\n");
               
               
                        for (i = 0; i < 2014; i++)
                                {
                               
                                        fscanf(file_ptr,"%x",&address[i]);
                                               
                                }
               
                        fclose(file_ptr);
                                               
                }
                else
                printf("file not found\n");

}


any ideas??? thanks



[ Edited Tue Feb 26 2008, 10:32AM ]
Back to top


shyam
Tue Apr 15 2008, 06:04PM

 User Offline

Registered Member #2984
Joined: Mon Aug 06 2007, 11:33AM

Posts: 723
Thanked 107 times in 103 posts
well the function calling seems ok..
some more details wud have been better... cud u give a little more insight of the system?
which uart are u using hope u r using uart1 instead of uart0... u will nwwd the right handshaking to read the file properly also
M:\\Documents\\final project local\\book1.txt is a long enough address try
something shorter and without spaces in between

ex k:\\project\\test.txt

plz check n reply


lProgress is not made by early risers or hard workers, but by LAZY people, trying to find easier ways to do the same........
Back to top


 

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System

8051 Microcontroller Projects 8051 AVR tutorials PIC microcontroller, 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems