EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Replies / HiWhile coding if you make

HiWhile coding if you make

|

Microcontroller › PIC › Is that integer size would be differ for every 16bit,32bit controller › HiWhile coding if you make

March 21, 2018 at 7:11 am #14808
GANEEV SINGH
Participant

Hi

While coding if you make use of an integer variable then it's size will remain fixed, it will not change according to the microcontroller you use. Generally an unsigned it in allocated 4 bytes but what if you do not want that much space, well there is a provision in coding language to change the size of integer variable as per your requirements. 

So If you want to store values in integer variable upto 8 bits you can initialize your variable by writing uint_8t variable_name. Similarly for for 16,32 and 64 bit variable you will initialize variable like: uint_16t, uint_32t and uint_64t respectively. For signed integer variables you can omit u in the begining.

RSS Recent Posts

  • Help please! BLDC driver circuit using the IR2136s and the STP80NF06 MOSFETS November 8, 2025
  • need two ICs November 8, 2025
  • MLT-8530 Buzzer on ESP32: Why Is the Sound Output Lower Than Expected? November 8, 2025
  • Scope Clock CRT Z-Axis - Grid bias positive? November 8, 2025
  • Measuring controller current output with a meter November 8, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise