Sorry got that the wrong way round should be
0x0102 or in binary 0000 0001 0000 0010
Search found 4 matches
- 08 Jan 2010 02:31
- Forum: mikroC PRO for PIC General
- Topic: Convert Hex to BCD code B
- Replies: 3
- Views: 3463
- 08 Jan 2010 02:25
- Forum: mikroC PRO for PIC General
- Topic: Convert Hex to BCD code B
- Replies: 3
- Views: 3463
- 08 Jan 2010 01:52
- Forum: mikroC PRO for PIC General
- Topic: Convert Hex to BCD code B
- Replies: 3
- Views: 3463
I assume you want to split an 8 bit value into 3 decimal numbers ie max size is 255 then try something like this this char Digit[3]; Digit[0] = freqH / 100; //Divide by 100 Digit[1] = (freqH % 100) / 10; //Remainder Divided by 10 Digit[2] = (freqH % 100) % 10; //Remainder of Remainder Divided by 10 ...
- 08 Jan 2010 00:40
- Forum: mikroC PRO for PIC General
- Topic: Declaring an array sized to a variable?
- Replies: 1
- Views: 1348
Variables are not normally allowed when declaring arrays because the compiler needs to know how big the array is so that it can allocate memory for the array. Also variables are usually initialised to 0 by the compiler otherwise they could contain garbage this would mean that your array could start ...