Monday, May 24, 2010

How do I communicate over serial with an ARM processor in C?

I'm using a TS7200 found at: http://www.embeddedarm.com/epc/ts7200-sp...





All I've ever done with C is software, no hardware interfacing. I'll be communicating to a Garmin 301 Geko GPS on com port 1 in linux. All it has to do is to read data, not transmit.





I know that I wont get exactly what I need, but I can't find much on the internet to help me. Does anyone have a good site to look at?





Thanks for your help,


Brandon

How do I communicate over serial with an ARM processor in C?
I would go to a more experineced place on the internet then Yahoo! forum for C help. try developer fourms for linux only


Am trying to write java code to read n write bits at the parallel port of a computer.how can i do it on linux?

the motive is to be able to read and write bits at the parallel port using a JAVA application on a linux platform... i need to know how to get the permission ant control from the OS, i am able to do it in C using ioperm....

Am trying to write java code to read n write bits at the parallel port of a computer.how can i do it on linux?
Or may be you can contact a java expert. Check websites like http://getafreelnacer.com/
Reply:Mr. Rai try this link for PARALLEL PORT ADDRESSES








http://www.captain.at/parallel-port.php





IBM site





http://www.ibm.com/developerworks/java/j...





HOW TO CD-Writing





http://www.faqs.org/docs/Linux-HOWTO/CD-...

dracaena

Build a hierarchical tree, without using DOM,schema, and sax using expat parser and c?

I've been experimenting with the jclark's expat parser. I compiled it on linux, and it works just great. However, finding tags and data by implementing the callback functions in c language is cumbersome. Has anybody written code that uses the expat callback's in such a way as to build a hierarchical tree, without using DOM,schema, and sax, that can be traversed.My purpose, just enough to traverse branches and find leafs of a xml documents without using DOM, schema, and sax, and i also want help regarding how to convert a xml document to a hierachical tree which contains tags values. thanks

Build a hierarchical tree, without using DOM,schema, and sax using expat parser and c?
but what you're describing more or less is the same like a DOM, right? a hierarchical tree of xml data.





have a look at the link below, it's the Simple C Expat Wrapper which builds a DOM-like structure, maybe it can help you.


I am working on my first useful program in c! this is how far I got with it and I got stuck?

It is a calculator! And I am trying to make it give me a message when you input letters instead of numbers!








How would u write the whole program using functions????





this is the code! i use linux and the gcc compiler














#include %26lt;stdio.h%26gt;





int main( )


{


int z;


int x;





printf( "This is my first useful program ever created in C" );


printf( "\n" );


printf( "\n" );


printf( "Note that this calculator will subtract and divide the first integer by the second one" );


printf( "\n" );


printf( "\n" );





printf( "Input your first integer to be calculated:" );


scanf( "%d", %26amp;z);





printf( "Please input the second one:" );


scanf( "%d", %26amp;x);





printf ( "Added: %d \n", z + x );


printf ( "Subtracted: %d \n", z - x );


printf ( "Multiplied: %d \n", z * x );


printf ( "Divided: %d \n", z / x );


}

I am working on my first useful program in c! this is how far I got with it and I got stuck?
Two ways.





Check the return type. Look at http://www.cplusplus.com/reference/clibr... (scanf). It returns an int, which actually means something. Check if that integer matches EOF, and if it does, you know it failed to read in the input.





Only a beginner is excused from not checking for errors. Understand how the library functions work. If they set an error bit or return something on error, check for that.





The other way is to use fgets and strtol. Use fgets to take an input into a string. Then attempt to convert using strtol.
Reply:You will find lots of useful c programming sourcecode @ www.easytutor.2ya.com
Reply:Well, I'm not going to write the code for you--but one way you can figure out if inputs are characters or numbers, is to check its ascii code. If the ascii code of the input from the user is not that of a number, than return an error message.

morning glory

How to create our own library file and header file from c (OS is windows xp)?

I want to know how to create our own library file and header file in c.





i use turbo C and the os is windows xp.


i could find the command equivalent of 'ar' command in Linux (archieve command) same in Windowz xp





thanks

How to create our own library file and header file from c (OS is windows xp)?
hi,





first you can create header file by ( .h ) extension.for example triq.h in this file you can write what (functions) you wants in the header file.





second you can store this ( .h ) file extension in to header files location.





then crate c program and include this header file.thats all..bye
Reply:create files





bob.h


bob.c





In bob.c put:





#include "pathto\bob.h"





your c code here


Which is harder to learn Java or C++ ?

I would rate myself as a beginner/intermediate VB.NET programmer - very good at scripting with VBScript.





So I haven't really touched on either Java or C++ or any "real" programming since I personally consider VB.NET cheating as you're really just drawing and filling in the gaps with code you can search for online!!!!


Could someone recommend to me one or the other ? my destination platform would be both Linux and Windows.





Thanks in advance !!!!

Which is harder to learn Java or C++ ?
As far as object orientated programming goes, the fundamentals are very similar. I learned c++ first, and found it harder to learn that java. But that could have been because it was my first language.





What I am certain of though, is that java is much more sought after now than C++. So it may be more beneficial for you to learn that first.





As far as compilers go, for just starting off in object orientated programming, then you might want to go for a compiler called "bluej". It's a very simple GUI interface, to get you used to classes.





After that I would move on to netBeans IDE 6.0....and stick with it.
Reply:As long as you're comfortable with object orientated programming I think you'd find both languages about the same to learn.





In terms of jobs (if that's what you're thinking of), people seem to want Java programmers more than C++ programmers nowadays, and C# is an even better bet.
Reply:C++ is harder to learn, because most of the low level things found in C++ like pointers, garbage collection are handled automatically in java. Java programs can run on any platform that has a JVM (java virtual machine).
Reply:I'd say java because the polarity of the script certification does not interface with the trajectory of the triple mainframe processor.


Which is the best windows based c++ compiler?

I have been using g++ compiler that is available on linux. now I am switching to windows. And I want to do programming in the same way I used to do on g++. suggest me windows based c++ compiler that has this feature.

Which is the best windows based c++ compiler?
I have no experience in development on Linux platform.


To develop on Windows, i have used Microsoft Visual C++ (Most recommended for professional development).


Another recommended compiler is using the Borland C++ Builder.
Reply:Visual Studio seems to be the best on the windows platform. Borland's IDE was okay aswell, but i'm not sure if they still ship and or support it.