This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Write data in file using "fopen( )" in C51 - µVision2

Hello everybody giving a helping hand,

got me some trouble here. I was making a program that reads out the duty cycle of an ADXL202 sensor. Everything works, except the part were i want to print my data in a file using this :

 FILE *stream, *fopen();

                 if ( (stream = fopen(...)) != NULL)
                                 fscanf(stream,''%s'', string);

Ok this is were my problems start. The compiler gives me the error that he doesn't know this type FILE ore the function fopen (). This seems to be logical to me since i looked in my stdio.h header and found nothing really according to that declaration.
Is there a posibility that this is stored in another source file or does not exist???
Or .... how do i get my data's in a *.txt file ???

Thanks for the help i'm about to receive :))

P.S: Im using a 80C535 µC, sorry for not mantuening

Parents
  • Yes thank you but that is what im doin' right now. Its this thing that bothers me. I must record data, insert it in the excel file (with csv) and than do the table ( or diagram, or whatever you wanna call him ). If there is a posibility i would like to jump over these steps and make a direct connection to the serial port and transform the values directly into an diagram. That Windmill thing ain't working because it costs money witch i don't have and the free version is a joke. I heard it could be done with the macros in excel but i have no idea how to do this. If anybody has an idea or an webpage with the macro language or a done program it would be great....
    Thanks

Reply
  • Yes thank you but that is what im doin' right now. Its this thing that bothers me. I must record data, insert it in the excel file (with csv) and than do the table ( or diagram, or whatever you wanna call him ). If there is a posibility i would like to jump over these steps and make a direct connection to the serial port and transform the values directly into an diagram. That Windmill thing ain't working because it costs money witch i don't have and the free version is a joke. I heard it could be done with the macros in excel but i have no idea how to do this. If anybody has an idea or an webpage with the macro language or a done program it would be great....
    Thanks

Children