|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#3
|
||||||
|
||||||
|
Re: Displaying a 16 bit integer on PIC 16F877?
More important then knowing the type of PIC is what compiler you are using.
In C18 %ld prints in hex and expects a long (32 bits) while an int is 16 bits In a compiler for your computer, both an int and a long are 32 bits, and both %d and %ld would print the same thing with both. Other compilers (especially embedded compilers) will all have small variations like that, that you can only learn about by reading the manual. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| pic: Feeling a bit Blue | Steve W | Extra Discussion | 3 | 28-10-2007 23:54 |
| pic: A "Bit" of a problem. | Herodotus | Extra Discussion | 26 | 11-10-2007 01:53 |
| 16 bit math on PIC | sciguy125 | Programming | 17 | 07-10-2005 02:57 |
| integer division | ImmortalAres | Programming | 5 | 11-07-2005 21:19 |
| Integer Number | powercat | Programming | 2 | 18-02-2003 11:26 |