embed « bit « C Data Type Q&A

Home
C Data Type Q&A
1.binary
2.bit
3.byte
4.char
5.character
6.decimal
7.Development
8.float
9.hex
10.integer
11.prime
12.random
13.struct
C Data Type Q&A » bit » embed 

1. C Training on 16-bit microcontrollers    stackoverflow.com

My company is transitioning from assembly coded microcontrollers to C. We are considering Microchip, Atmel, Renasas, et. al. for future projects using C code. Are there good training resources ...

2. clear code for counting from 0 to 255 using 8-bit datatype    stackoverflow.com

I was wondering if there is a clean way of counting from 0 to 255 using an 8 bit datatype, something like:

for(uint8_t i(0);i<=255;++i)
{
    ....
}
This obviously will not work ...

3. How to get value from 15th pin of 32bit port in ARM?    stackoverflow.com

I am using an IC, DS1620 to read 1 bit serial data coming on a single line. I need to read this data using one of the ports of ARM microcontroller ...

4. Finding out no bits set in a variable in faster manner    stackoverflow.com

Possible Duplicate:
Best algorithm to count the number of set bits in a 32-bit integer?
Finding out the no. bits sets in a variable is easier. ...

5. Macros to set and clear bits    stackoverflow.com

Im trying to write a few simple macros to simplify the task of setting and clearing bits which should be a simple task however I cant seem to get them to ...

6. What does the C compiler do with bitfields?    stackoverflow.com

I'm working on an embedded project (PowerPC target, Freescale Metrowerks Codewarrior compiler) where the registers are memory-mapped and defined in nice bitfields to make twiddling the individual bit flags easy. At the ...

7. Address 0 being overwritten by NULL pointer on HCS08    stackoverflow.com

On my 8-bit Freescale HCS08 micro, whenever I call a library function that returns values to pointers I pass it, and I don't really want them, I threw in a NULL, ...

8. Adding 64 bit support to existing 32 bit code, is it difficult?    stackoverflow.com

There is a library which I build against different 32-bit platforms. Now, 64-bit architectures must be supported. What are the most general strategies to extend existing 32-bit code to support 64-bit ...

9. How to read two 32bit counters as a 64bit integer without race condition    stackoverflow.com

At memory 0x100 and 0x104 are two 32-bit counters. They represent a 64-bit timer and are constantly incrementing. How do I correctly read from two memory addresses and store the time as ...

10. Is this a 64bit write operation in C    stackoverflow.com

I have written a function that needs to do a 64bit initialisation of memory for an embedded device. Can anyone tell me if this function will carry out this task?

void ...

11. What is the fastest way to rotate the bits in an 8x8 block on bits?    stackoverflow.com

I'm not sure the exact term for what I'm trying to do. I have an 8x8 block of bits stored in 8 bytes, each byte stores one row. When I'm finished, ...

12. storing signed short in the lower 16 bits of a an unsigned int    stackoverflow.com

I'm programming C on an embedded system. The processor architecture is 32 bits (sizeof(int) is 32 bits, sizeof(short) is 16 bits). There is a 32-bit variable that is a ...

13. Is bit twiddling a good test for embedded engineer    stackoverflow.com

I am questioning candidates for embedded software engineers (in our company we use mostly C, sometimes C++). I usually give to the candidate a bit twiddling question. I do not mention that ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.