Hi. Can I use a sensor that has a 16-bit output data with the Arduino Uno, considering the fact that the microcontroller of the Arduino Uno is 8-bit? Can the Arduino Uno handle data higher than 8-bit coming in? If yes, how does the Arduino do that? Thanks in advance!
The Arduino, and all processors really, handle extended data by concatenating data words. An 'int' type which is usually the most common, has 16 bits. The word size varies according to which processor the particular Arduino uses.
What is your actual problem? Are you coding from scratch for a sensor that has no support?
Questions about anonymous hardware produce generic answers.
Almost certainly, but since you have omitted to give any details whatsoever (Web links are a start) about your application, there is clearly no way in the world to suggest how this might be achieved.
Yes.
I am using the MPU6050 sensor. It's not that I have encountered problems when using it, I just have to document, explain and justify everything that I am doing for my university project. When I searched the following question on google: "Why is arduino uno 8-bit?" I got this response:
"It is the size of the ALU (Arithmetic-Logic Unit) . If its 8-bit micro-controller it means that “ The maximum number of bits in which it can operate or execute any operation is 8-bit , that is the maximum size of the input that can be given to the micro-controller”."
That's why I wondered how it was possible that the Arduino Uno could handle the MPU6050 that outputs data that is much higher than 8-bit. So, it was more of a theoretical question than a practical one. Let me reformulate my question: The fact that the microcontroller is 8-bit, which limitation does it express for the user?
Thanks for your help.
The short answer: speed. To handle a 16 or larger data element, the processor has to make multiple accesses.
Thanks!
Sucks to Google.
Eight bits is the size of the memory units in the microcontroller. The ALU operates on the memory locations and uses one at a time so yes, it is designed to perform 8-bit operations.
But that has absolutely nothing to do with how you process actual data - you write code to process the data whatever it is. The code is written to do whatever is necessary to deal with the format of the data you have - that is the entire point of writing code.
Not really.
It is fast enough.
Thank you!
Until it isn't.
I agree with google. The "size" of a CPU has much more to do with the size of the ALU than the size of "memory units." Almost every modern CPU has "memory units" of 8bits ("byte addressability"), but that's completely separate from both the size of the ALU and the size of the memory bus. Several 16 and 32 CPUs can use "reduced size memory buses" to save costs (most famously the 8088 used in the original IBM PC), and many CPUs will fetch memory wider than the ALU width (notably many ARM chips will have "wide" access to flash for performance reasons, fetching 32 or 64bits even though the instructions are (mostly) 16bits. Plus most desktop PCs, although it gets very complicated.)
Thanks!
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.