embeded/AVR (ATmega,ATtiny)2011. 3. 12. 22:13
WINAVR로 프로그램을 하긴 했지만, sizeof로 일일이 확인해본게 아니라 긴가민가 했는데
일단 ATMEGA128은 8bit 프로세서이고, int 형은 2byte이다.

ATmega128   8-bit AVR Microcontroller, 128KB Flash, 64-pin
                   View Parameters

[링크 : http://blog.daum.net/lucifer_blog/38]

 The concept is quite simple. The file types.h includes the ANSI-required file limits.h. It then explicitly tests each of the predefined data types for the smallest type that matches signed and unsigned 1-, 8-, 16-, and 32-bit variables. The result is that my data type UCHAR is guaranteed to be an 8-bit unsigned variable, INT is guaranteed to be a 16-bit signed variable, and so forth. In this manner, the following data types are defined: BOOLEAN, CHAR, UCHAR, INT, UINT, LONG, and ULONG.

Posted by 구차니

댓글을 달아 주세요