Search:

Type: Posts; User: Clearner123

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    3,770

    Why Boolean data type not used

    I find that most of programmers do not use the boolean data type. If i know that my data can be 0 or 1, if i use boolean i will save memory but still it is not used much. What are the disadvantages?
  2. Replies
    7
    Views
    5,614

    #include int main() { int...

    #include <stdio.h>
    int main()
    {
    int number=0;
    char digit=0;

    while(1)
    {
    printf("Enter the digit\n");
    scanf("%c",&digit);
  3. Replies
    7
    Views
    5,614

    #include int main() { int...

    #include <stdio.h>
    int main()
    {
    int number=0;
    char digit=0;

    while(1)
    {
    printf("Enter the digit\n");
    scanf("%c",&digit);
  4. Replies
    7
    Views
    5,614

    I am really sorry how that mistake happened. I...

    I am really sorry how that mistake happened. I will try with the changes.
  5. Replies
    7
    Views
    5,614

    Number Convert function

    Write a function int convert () that reads a decimal number one character(digit) at a time, terminated by a blank, and returns the value of that number.
    I am trying to write program for above

    ...
  6. Replies
    17
    Views
    11,715

    How to identify the end of array

    I have written the following code to identify the end of array


    #include <stdio.h>
    unsigned int array[20]={21,22,23,12,1,0,6,7,'\0'};
    int main()
    {
    // Write C code here
    unsigned int...
  7. Replies
    1
    Views
    1,868

    CAN Message Transmission Logic

    Hi,
    I need to transmit data over CAN, but i am really struggling to organize the software flow. The below is the prototype function to transmit


    void CanTransmit(uint8_t *TxData)
    {
    }

    The...
  8. Replies
    2
    Views
    1,633

    Logic for Message Timeout

    I am struggling to write the logic for CAN message timeout. I am trying to avoid global variables, i have added the attachment, please advise me a good method. I also need to check the message...
  9. Replies
    4
    Views
    1,403

    Number of Condition inside if statement

    I have been assigned to review the below code and update for the changes.


    if(condition1>val1 && condition2<=val2 && cond3>val3 && cond4<val4 && cond5==val5 && cond6==val6 && cond7==val7 &&...
  10. Replies
    1
    Views
    2,069

    USB write blocker project

    Hi,
    Need some advice, I need to do a USB write blocker software, I wanted to know how complicated it is? Which programming language to use? I have never done this kind of programming. Please help.
  11. Replies
    2
    Views
    3,264

    Design of a project

    I am referring to a micro controller based embedded C programming. Most of the time the processor i am working with has very limited time, where the number of tasks are more, for example
    a. Analog...
  12. Replies
    1
    Views
    1,965

    Doubt on function routine

    i have a function


    void SendData(sint32_t data)
    {
    Transmit();
    }


    One problem i am seeing is i need to send data of max size of uint32_t and also a function requiring to transmit a data...
  13. Replies
    4
    Views
    3,580

    Yes I receive data, I had problems receiving for...

    Yes I receive data, I had problems receiving for higher values, then I figured one mistake of argument, I defined as uint instead of the signed. I am having difficulty in transmitting new line hence...
  14. Replies
    4
    Views
    3,580

    I have multiple doubts, hopefully i can get...

    I have multiple doubts, hopefully i can get clarified here



    int16 datatotransmit[100];

    int main()
    {
    while (index <= 90) /*transmitting 90 elements of datatotransmit array */
    {
  15. Replies
    6
    Views
    4,621

    Why do you think so, any reason?

    Why do you think so, any reason?
  16. Replies
    6
    Views
    4,621

    MSB and LSB of the signed value

    I am getting really confused now, if i have a signed value for example -634, what will the MSB and LSB of the number?
  17. Replies
    4
    Views
    3,580

    Understanding the sprintf function

    I want to transmit a variable over UART and also LCD, the UART is a generated function with argument of uint8_t, the data i need to transmit is both signed and unsigned and it is 16 bit. How do i...
  18. Replies
    7
    Views
    4,194

    I hope, this is what you mean? void Rms(uint16...

    I hope, this is what you mean?

    void Rms(uint16 rawcount_16)
    {
    uin32_t l_temp_square_u32=0;
    int32_t l_temp_offset_s32=(int32_t)rawcount_16;
    l_temp_offset_s32 -= 512;
    l_temp_square_u32 =...
  19. Replies
    7
    Views
    4,194

    Ok one point i forgot to mention is that rawcount...

    Ok one point i forgot to mention is that rawcount can be maximum is 1024.
  20. Replies
    7
    Views
    4,194

    Ok i understand now it shall be like this ...

    Ok i understand now it shall be like this


    void Rms(uint16 rawcount_u16)
    {
    uint16_t l_temp_rawcount_u16 = 0;
    uint32_t l_temp_square_u32=0;
    int32_t l_temp_offset_s32 =0;
    l_temp_rawcount_u16 ...
  21. Replies
    7
    Views
    4,194

    I tried with the following code void...

    I tried with the following code


    void Rms(uint16 rawcount)
    {
    uint16_t l_temp_rawcount_u16 = 0;
    uint32_t l_temp_square_u32 = 0;
    int16_t l_temp_offset_s16 = 0;
    l_temp_rawcount_u16 =...
  22. Replies
    7
    Views
    4,194

    Signed and Unsigned Variables

    I am trying to calculate the RMS value, but i need to offset by 512,
    I get the raw value from 0 to 1024, i need subtract 512 from this number and then square the number, but i get warnings


    ...
  23. Replies
    1
    Views
    4,422

    Understanding the Code

    I saw the code


    typedef signed int SFRAC16;
    #define Q15(Float_Value) \
    ((Float_Value < 0.0) ? (SFRAC16)(32768 * (Float_Value) - 0.5) \
    : (SFRAC16)(32767 * (Float_Value) +...
  24. Replies
    4
    Views
    6,601

    New Kind of Typedef

    I have seen this type declaration. Can someone explain me this


    typedef unsigned int uint16;
    typedef uint16 Buf[32][8];
    Buf buf1;


    I slightly modified the variable names....
  25. Transmit Data using Motorola and Intel Format

    I am facing serious problem of understanding and confusion of Motorola and Intel formats. My requirement is I have to transmit 8 bytes of data using CAN communications it is serial communication....
Results 1 to 25 of 35
Page 1 of 2 1 2