0% found this document useful (0 votes)
9 views

Final_Data_Type_Sizes_Microcontrollers

The document provides a comparison of data type sizes for microcontrollers including Arduino, STM32, and PIC. It details the size in bytes and value ranges for various data types such as bool, char, int, long, float, and double across the different microcontrollers. Notably, STM32 supports larger data types like uint64_t and int64_t, which are not available in Arduino and PIC.

Uploaded by

dodaihoc439
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Final_Data_Type_Sizes_Microcontrollers

The document provides a comparison of data type sizes for microcontrollers including Arduino, STM32, and PIC. It details the size in bytes and value ranges for various data types such as bool, char, int, long, float, and double across the different microcontrollers. Notably, STM32 supports larger data types like uint64_t and int64_t, which are not available in Arduino and PIC.

Uploaded by

dodaihoc439
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Data Type Sizes for Microcontrollers (Arduino, STM32,

PIC)

Size (Arduino Size Size (PIC


Data Type AVR (STM32 Value Range
32-bit) 8-bit)
8-bit)

bool 1 byte 1 byte 1 byte false (0) or true (1)

char 1 byte 1 byte 1 byte -128 to 127

unsigned 1 byte 1 byte 1 byte 0 to 255


char

byte 1 byte 1 byte 1 byte 0 to 255 (same as unsigned char)

int 2 bytes 4 bytes 2 bytes -32.768 to 32.767 (Arduino. PIC).


-2.147.483.648 to 2.147.483.647
(STM32)

unsigned 2 bytes 4 bytes 2 bytes 0 to 65.535 (Arduino. PIC) and


int 0 to 4.294.967.295 (STM32)

long 4 bytes 4 bytes 4 bytes -2.147.483.648 to 2.147.483.647

unsigned 4 bytes 4 bytes 4 bytes 0 to 4.294.967.295


long

float 4 bytes 4 bytes 4 bytes ±3.4028235E+38 (6-7 decimal


places)

double 4 bytes 8 bytes 4 bytes ±3.4028235E+38 (Arduino AVR. PIC).


±1.7976931348623157E+308
(STM32)

uint8_t 1 byte 1 byte 1 byte 0 to 255

int8_t 1 byte 1 byte 1 byte -128 to 127

uint16_t 2 bytes 2 bytes 2 bytes 0 to 65.535

int16_t 2 bytes 2 bytes 2 bytes -32.768 to 32.767

uint32_t 4 bytes 4 bytes 4 bytes 0 to 4.294.967.295

int32_t 4 bytes 4 bytes 4 bytes -2.147.483.648 to 2.147.483.647

uint64_t N/A 8 bytes N/A 0 to 18.446.744.073.709.551.615


(STM32 only)

int64_t N/A 8 bytes N/A -9.223.372.036.854.775.808 to


9.223.372.036.854.775.807 (STM32
only)

You might also like