Search:

Type: Posts; User: stahta01

Page 1 of 20 1 2 3 4

Search: Search took 0.03 seconds.

  1. x++; The malloc return value was stored in...

    x++;


    The malloc return value was stored in X; changing the value of X results in the value being destroyed!

    Tim S.
  2. Please do not destroy values returned from malloc...

    Please do not destroy values returned from malloc commands!

    Use a second pointer that you then change instead!

    Tim S.
  3. Without you posting code! I see no way anyone on...

    Without you posting code! I see no way anyone on this website who does not use your IDE to help you!

    Tim S.
  4. You can ignore my post I was thinking you were...

    You can ignore my post I was thinking you were using the Code::Blocks IDE; since what you stated you did sounded like an Code::Blocks option.

    Since, I have no knowledge about either your code or...
  5. Whenever you are using an Code::Blocks custom...

    Whenever you are using an Code::Blocks custom makefile project, you need to look inside the makefile for the cause and solution of the build problems.
    Only after the build works from the command...
  6. Links that might help understand the differences....

    Links that might help understand the differences.

    C Preprocessor Directives - C and C++ Syntax Reference - Cprogramming.com
    Tutorials - C Preprocessor Tricks - Cprogramming.com

    To me a macro...
  7. Replies
    3
    Views
    158

    You are using the compiler or your IDE wrong. ...

    You are using the compiler or your IDE wrong.

    If compiling on the command line post the commands you are using.
    If using an IDE post information about your IDE.

    Tim S.
  8. What is Context Switching in Operating System?...

    What is Context Switching in Operating System?

    Context switch - Wikipedia

    How you are going to do context switching is likely a very important thing to decide.

    Tim S.
  9. The first task is to describe the problem you are...

    The first task is to describe the problem you are trying to solve.
    Then, describe each part/step/sub-task of the problem.

    Of the three you listed (flowchart, block diagram, state diagram); block...
  10. Replies
    9
    Views
    331

    That is my guess; but, I have found my guess are...

    That is my guess; but, I have found my guess are often wrong about which optimize option causes a GCC program bug/crash.

    Tim S.
  11. Replies
    9
    Views
    331

    I did not see the problem with "-Og" can anyone...

    I did not see the problem with "-Og" can anyone else confirm this?
    MSys2 GCC 10.3.0
  12. Replies
    9
    Views
    331

    Correction it did have the bug; I forgot to set...

    Correction it did have the bug; I forgot to set optimize option on first test


    gcc.exe (Rev5, Built by MSYS2 project) 10.3.0


    Tim S.
  13. Replies
    7
    Views
    270

    For, While and Do While Loops in C -...

    For, While and Do While Loops in C - Cprogramming.com

    I would likely use a for loop.

    Tim S.
  14. Replies
    20
    Views
    725

    Dynamic memory means you can change the amount of...

    Dynamic memory means you can change the amount of memory at run-time. Non dynamic called by you static memory (I do not consider this 100 percent correct) is fixed/set at compile time. As you write...
  15. Replies
    20
    Views
    725

    Pointers in C - Cprogramming.com...

    Pointers in C - Cprogramming.com

    The above link might help.

    The words "stack" and "heap" are important to understand.

    And, you need to know when the program will know the size at compilation...
  16. Replies
    20
    Views
    739

    Nop, you are not understanding that an function...

    Nop, you are not understanding that an function prototype is not an full function.

    Edit: The website says it is possible; but, I think an C expert would say it may just be allowed by some C...
  17. Replies
    20
    Views
    739

    file1.c extern int add(int a, int b) { ...

    file1.c


    extern int add(int a, int b)
    {
    int c;
    c = a+b;
    return c;
    }
  18. It built and ran okay; but, I do not remember the...

    It built and ran okay; but, I do not remember the ability of going backwards with the arcade unit.
    And, I am not certain about the force field; but, you likely played it on a game station instead of...
  19. Because if you do it that way; the compiler...

    Because if you do it that way; the compiler checks for mistakes like type changes and typos; when in the future the program is modified it helps from spending hours looking for stupid mistakes.
    ...
  20. extern int x; Put the above code in a header...

    extern int x;

    Put the above code in a header file.

    Include the header file by the two .c files.


    int x;
  21. Replies
    10
    Views
    475

    LATAbits.LATA15 = 1; May also need to...

    LATAbits.LATA15 = 1;


    May also need to change both of LATA to zero.
    The chip I used did not have LATA so, this is a wild guess on my part.

    Tim S.
  22. Replies
    10
    Views
    475

    // Set all analog pins to be digital I/O ...

    // Set all analog pins to be digital I/O
    AD1PCFG = 0xFFFF;


    Try adding the above in the main chip init area of your code.
    I think RA14 and RA15 are analog inputs; but, it been almost a...
  23. Replies
    10
    Views
    475

    Edit: After researching the docs it looks like...

    Edit: After researching the docs it looks like you are maybe correct.

    Edit2: I missed seeing "Hardware clear at end of eighth bit of master receive data byte." I wonder if I was on the wrong page...
  24. Replies
    10
    Views
    475

    This looks wrong in I2C_Wait_For_Idle ...

    This looks wrong in I2C_Wait_For_Idle


    while(I2C1CON & 0x1F);

    Should it not be


    while(I2C1STAT & 0x1F);
  25. Replies
    10
    Views
    475

    Are you talking hardware analyzer or software? ...

    Are you talking hardware analyzer or software?

    You are talking about using pins
    66 SCL1/INT3/RA14
    67 SDA1/INT4/RA15
    correct?

    Tim S.
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4