Some problems

This is a discussion on Some problems within the C Programming forums, part of the General Programming Boards category; Hi everyone. Thanks in advance for the questions i'm about to post, sorry to bother if the questions are to ...

  1. #1
    Registered User
    Join Date
    Jul 2007
    Posts
    26

    Some problems

    Hi everyone.

    Thanks in advance for the questions i'm about to post, sorry to bother if the questions are to redundant or lame.

    C language is all the same irregardless of which type of compiler you are using right?.

    eg. I'm using a MPLab.IDE. but I want to work on/edit a file that has a different header.

    #include <avr/io.h>
    #include <avr/signal.h>
    #include <avr/iom16.h>

    I am suppose should change it to

    #include <p.18f4520.h>
    void Init_LCD(void);
    void W_ctr_8bit(char);
    void W_data_8bit(char);

    I'm unsure of which header files to call or include. If i want to compile it using MPLab IDe.

    Please help. Thanks alot

  2. #2
    int x = *((int *) NULL); Cactus_Hugger's Avatar
    Join Date
    Jul 2003
    Location
    Banks of the River Styx
    Posts
    902
    C language is all the same irregardless of which type of compiler you are using right?.
    In theory, the answer might be yes. In practice, no. There are various differences and quirks between compilers, unfortunately. Well written code can avoid the majority of difficulties, however.

    Your question is a bit vauge, and I'm lost as to what you want to accomplish. What headers you include depends on what you're trying to accomplish. The headers/functions you mention seem fairly non-standard, and since you said MPLab, what platform are you coding for? If it is out of the ordinary, you might try to find resources specific to whatever you're working with - check manuals, vendors, etc.

    Give us a wee more info/restate your problem; what do you have now, what equipment you're using and what you want to accomplish.
    Last edited by Cactus_Hugger; 07-23-2007 at 12:52 AM.
    long time; /* know C? */
    Unprecedented performance: Nothing ever ran this slow before.
    Any sufficiently advanced bug is indistinguishable from a feature.
    Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
    The best way to accelerate an IBM is at 9.8 m/s/s.
    recursion (re - cur' - zhun) n. 1. (see recursion)

  3. #3
    Registered User MacNilly's Avatar
    Join Date
    Oct 2005
    Posts
    306
    Quote Originally Posted by danko View Post
    Hi everyone.

    Thanks in advance for the questions i'm about to post, sorry to bother if the questions are to redundant or lame.

    C language is all the same irregardless of which type of compiler you are using right?.

    eg. I'm using a MPLab.IDE. but I want to work on/edit a file that has a different header.

    #include <avr/io.h>
    #include <avr/signal.h>
    #include <avr/iom16.h>

    I am suppose should change it to

    #include <p.18f4520.h>
    void Init_LCD(void);
    void W_ctr_8bit(char);
    void W_data_8bit(char);

    I'm unsure of which header files to call or include. If i want to compile it using MPLab IDe.

    Please help. Thanks alot
    Ok, you don't "call" header files. You #include them. What I see here is one include statement of a file named "p.blahblah.h" and 3 function prototypes declared. If you are using a LIBRARY then you need to read the documentation of the library to see how stuff works. IF you have a question regarding syntax you could ask but I see nothing here that is a problem...

  4. #4
    Registered User
    Join Date
    Jul 2007
    Posts
    26
    Um, I wanted to detect the signals from my sensor(LM35DZ).
    send it into my Chip ADC Port.
    after which, the results displayed on the LCD. be it in hex or converted already.

    #include <avr/io.h>
    #include <avr/signal.h>
    #include <avr/iom16.h>

    "should i read up on the avr compiler to know what are they including, than convert it using the MPLab IDE library files?. that does the same function?"

    >what platform are you coding for?
    um? platform?. *confused*

    thanks again!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. No clue how to make a code to solve problems!
    By ctnzn in forum C Programming
    Replies: 8
    Last Post: 10-16-2008, 02:59 AM
  2. C Pointers Problems
    By mhelal in forum C Programming
    Replies: 8
    Last Post: 01-10-2007, 05:35 AM
  3. String Manipulation problems -_-
    By Astra in forum C Programming
    Replies: 5
    Last Post: 12-13-2006, 04:48 PM
  4. contest problems on my site
    By DavidP in forum Contests Board
    Replies: 4
    Last Post: 01-10-2004, 08:19 PM
  5. DJGPP problems
    By stormswift in forum C Programming
    Replies: 2
    Last Post: 02-26-2002, 03:35 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21