Taka
Posts: 3
Joined: Tue May 30, 2017 2:59 pm

Pi vs Microcontroller? (+Interrupts)

Tue May 30, 2017 4:09 pm

Hello there :)

I am new here so hopefully I posted in the right place and that I did not miss any similar post.

Because I want to get used to Raspberry Pi, I thought writing some text about 'when to use the Raspberry Pi and when a microcontroller' would be a great idea.

My problem now is that I am still very new to this and I already read some articles and found out the different types of Raspberries but I still have no clue about how interrupts work.

Do you have any good sources for this topic or maybe you are an expert? I would be really glad to have some input for this topic.

Thank you very much,

Taka

W. H. Heydt
Posts: 11109
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Pi vs Microcontroller? (+Interrupts)

Tue May 30, 2017 6:47 pm

1. Start with a Pi3B (current "top" model).

2. Think of the Pi as a very tiny PC only running Linux, not Windows. That is, it runs a full operating system.

While you can program a Pi at the "bare metal" level (see the sub-forum under "Programming" for more on this), unlike a microcontroller, that is the exception, not the rule. You can write, compile and execute programs on the Pi, no other machine needed. On a microcontroller, you use a separate system (such as a Pi) to write and cross-compile your code, then download and execute it.

Taka
Posts: 3
Joined: Tue May 30, 2017 2:59 pm

Re: Pi vs Microcontroller? (+Interrupts)

Wed May 31, 2017 3:42 pm

Great, thank you! I didnot know your last information. Do you know where you have this from?

I am currently researching for some information on the "Broadcom BCM2837 chipset" and the "64-bit quad-core ARM Cortex-A53".
And now I feel like such a noob:
I know processors from the Computer and now there are suddenly two names listed for the RaspberryPi o.o

Thank you again for your help!
Taka

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24188
Joined: Sat Jul 30, 2011 7:41 pm

Re: Pi vs Microcontroller? (+Interrupts)

Wed May 31, 2017 6:25 pm

The BCM2837 System on chip processor has 4 A53 ARM cores, a GPU and a number of custom HW blocks all built on to the same silicon.

I think there is stuff on Wikipedia or similar ll about it - google should find something.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

W. H. Heydt
Posts: 11109
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Pi vs Microcontroller? (+Interrupts)

Wed May 31, 2017 9:50 pm

Taka wrote:Great, thank you! I didnot know your last information. Do you know where you have this from?
About being able to create microcontroller (specifically, Arduino) programs on a Pi and then downloading them? That's been discussed on occasion for some years and enough to fall into the "common knowledge" bucket.
I am currently researching for some information on the "Broadcom BCM2837 chipset" and the "64-bit quad-core ARM Cortex-A53".
And now I feel like such a noob:
I know processors from the Computer and now there are suddenly two names listed for the RaspberryPi o.o

Thank you again for your help!
Taka
BCM2837 is an SoC, not a chipset. BCM2837 is the product. ARM Cortex-A53 is a description/specification of part of what is in the BCM2837. The original version of the Pi2B used a BCM2836. The initial Model B and Model A, plus the existing B+, A+, Pi0, Pi0W and CM all use the BCM2835. (To avoid confusion, let me note that the CM3 and CM3L use the BCM2837.)

User avatar
Gavinmc42
Posts: 4064
Joined: Wed Aug 28, 2013 3:31 am

Re: Pi vs Microcontroller? (+Interrupts)

Thu Jun 01, 2017 12:31 pm

I started as a microcontroller guy but Pi's are so cheap it made sense to use them.
But I had to learn Linux and it seemed at times every single language invented.
Then I discover Ultibo, the Lazarus IDE is similar to micro IDE's.
Pretty much code on PC then write the new kernel.bin to a SDcard.
Or upload via USB (Zero,CM's) or network update/upgrade.......

However it is much more capable than Arduino.
Fast Interrupt request can be done, expert only at the moment?
https://ultibo.org/forum/viewtopic.php? ... &hilit=FIQ
Pi with Ultibo is sort of in-between Arduino and Linux, covering quite a lot of both.

It cannot do the accelerated video stuff or camera etc, but both and more maybe possible one day.
It has the advantage in that you don't need to read the datasheet like you must for micros.
And you don't need to learn that giant collection of stuff called Linux.

The Pi will never be as real time as a micro controller, but clever use of the existing hardware and smart software should get it close. Likewise not many microcontrollers have HDMI, VC4 GPU, dual CSI camera.....
Done a few projects now with Ultibo, kernel.bin <3MB, very much smaller than Raspbian.
So the line between Pi and Microcontroller just got blurred out of existence.

These days it is not a choice between which microcontroller do I need, it more like which Pi should I use.
Sometimes I have not yet mastered some Pi RT stuff and I have to add a tiny 8 pin microcontroller.
Usually a PSoC controlled connected via i2c. One day the Pi could even reprogram this PSoC.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

NotRequired
Posts: 196
Joined: Sat Apr 29, 2017 10:36 am
Location: Denmark

Re: Pi vs Microcontroller? (+Interrupts)

Thu Jun 01, 2017 2:16 pm

You can consider a microcontroller (like arduino's) like smart dumbness. The are excellent for reading sensors and reacting to the readings, eg. read a moisture sensor and adjust a (water) valve accodingly. They are also very often used for controlling lights (various LED implementations, strips, remotecontrolled bulbs) and so on. Microcontrollers can do their job with high accuracy while they consume very little energy - they may in fact run for a long time on simple batteries. There is info on the net where people have had an arduino running on as little as a single coin cell for over a year!!

Raspberry is an entire computer with CPU, GPU, RAM, Ethernet-controller, Wifi-controller (some models), USB-controllers and so on. This makes a Raspberry more capable of doing much more advanced tasks, but a Raspberry will require an operating system to run on it in order to do anything with it. This makes the Raspberry bulkier, less accurate and much less energy efficient - you will hardly be able to run a Raspberry on batteries for more than 12-24 hours unless the battery pack becomes impractical.

TLDR; Use a microcontroller where possible and a Raspberry where not! :)
Please do not ask questions in private messages, they will not help others.

W. H. Heydt
Posts: 11109
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Pi vs Microcontroller? (+Interrupts)

Thu Jun 01, 2017 2:55 pm

NotRequired wrote:You can consider a microcontroller (like arduino's) like smart dumbness. The are excellent for reading sensors and reacting to the readings, eg. read a moisture sensor and adjust a (water) valve accodingly. They are also very often used for controlling lights (various LED implementations, strips, remotecontrolled bulbs) and so on. Microcontrollers can do their job with high accuracy while they consume very little energy - they may in fact run for a long time on simple batteries. There is info on the net where people have had an arduino running on as little as a single coin cell for over a year!!

Raspberry is an entire computer with CPU, GPU, RAM, Ethernet-controller, Wifi-controller (some models), USB-controllers and so on. This makes a Raspberry more capable of doing much more advanced tasks, but a Raspberry will require an operating system to run on it in order to do anything with it. This makes the Raspberry bulkier, less accurate and much less energy efficient - you will hardly be able to run a Raspberry on batteries for more than 12-24 hours unless the battery pack becomes impractical.

TLDR; Use a microcontroller where possible and a Raspberry where not! :)
The comparison I worked out a few years ago was... Arduino for the brawn (motor control, sensor input, analog I/O...) and Pi for the brains (data analysis and control). They are not *competing* devices, but cooperative devices.

hippy
Posts: 6284
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Pi vs Microcontroller? (+Interrupts)

Thu Jun 01, 2017 3:22 pm

Taka wrote:I thought writing some text about 'when to use the Raspberry Pi and when a microcontroller' would be a great idea.
That comes down to which would be best for the task you were wanting to undertake and what the criteria for "best" is.

Certain tasks may lean towards favouring a micro, others may lean towards favouring a Pi, but there will often still be a case for going the other way.

There is no simple answer on which to choose except in the case where one cannot facilitate something which is required but the other can.

W. H. Heydt
Posts: 11109
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Pi vs Microcontroller? (+Interrupts)

Thu Jun 01, 2017 4:05 pm

hippy wrote:
Taka wrote:I thought writing some text about 'when to use the Raspberry Pi and when a microcontroller' would be a great idea.
That comes down to which would be best for the task you were wanting to undertake and what the criteria for "best" is.

Certain tasks may lean towards favouring a micro, others may lean towards favouring a Pi, but there will often still be a case for going the other way.

There is no simple answer on which to choose except in the case where one cannot facilitate something which is required but the other can.
I can give an example of a project-in-progress a friend of mine is doing the microcontroller/hardware side of for me... I use a Pi (with RPF display) as an alarm clock. It is connected to a 2x2 audio matrix switch with my wife's PC on the other input. Sometimes she forgets to switch the speakers back to the Pi in the evening and we don't get our "wake up call".

So... The idea is to create an audio matrix switch that can be manually controlled (so she can watch DVDs/streamed video/news reports/etc. on her PC at will) and also be remotely controlled so that cron jobs can set the speaker switches correctly for morning wake up. We located an 8x8 matrix chip that can be driven by a microcontroller. So the MC will take input from manual buttons and also be connected to the Pi over a USB link. Net result will be a "programmable" 4x4 stereo audio switch with one of the 4 outputs having a headphone amp. Any (of up to 4) inputs can be routed to any or all of the 4 outputs. The Pi will be able to set it to the desired configuration before the "alarm" goes off even if no one remembers to set it correctly.

Taka
Posts: 3
Joined: Tue May 30, 2017 2:59 pm

Re: Pi vs Microcontroller? (+Interrupts)

Tue Jun 06, 2017 9:15 am

Thank you very much guys!

With your articles and posts you gave me a nice overview :)
I think I will start start working a bit with those devices when my exames are all written :D

Thank you again very much^^

~Taka

ghellquist
Posts: 68
Joined: Thu Aug 02, 2012 8:47 am
Location: Stockholm Sweden

Re: Pi vs Microcontroller? (+Interrupts)

Tue Jun 06, 2017 10:01 am

There is a function I have contemplated to investigate.

The function isolcpus in Linux allows us to reserve one (or more) CPU-s. Since the rpi 2 and 3 has four CPU-s, we could reserve one for realtime work. A control loop could run there, more ore less isolated from the rest of the Linux system. The other three could run the rest of the system.

It would be a good idea to somehow measure the maximum latency to expect under worst case, i.e. with lots of interrupts going on and high load making the chip hot and therefore throttling down clock frequency.

/Gunnar

User avatar
Gavinmc42
Posts: 4064
Joined: Wed Aug 28, 2013 3:31 am

Re: Pi vs Microcontroller? (+Interrupts)

Tue Jun 06, 2017 10:50 am

4 cores is something I want to explore.
Say for a drone, one core for navigation, one for camera, one for 10 axis sensor control, one for RC/comms.
It has been done with microcontrollers but by code experts.

Linux OS can run on one core, leaving three to do ????
I am not good enough to do it on Linux but multi core stuff is easier on Ultibo, there is even an example.
Basically doing microcontroler stuff on a Pi.

Latency depend on the OS, with Raspbian RT preempt it is not as bad as it used to be :D
Throw away the OS and a good coder could do better?
Swap SD card and you are back to Linux or Riscos or......
What other SBC has that flexibility?
Lots, if they can get the support, it is all about the software support now, not the hardware so much.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

hippy
Posts: 6284
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Pi vs Microcontroller? (+Interrupts)

Tue Jun 06, 2017 1:24 pm

Gavinmc42 wrote:Basically doing microcontroler stuff on a Pi.
If one wants to use a Pi as much like a microcontroller as one can; it's always possible to run code only in the GPU and never even enable the ARM CPU(s).

User avatar
Gavinmc42
Posts: 4064
Joined: Wed Aug 28, 2013 3:31 am

Re: Pi vs Microcontroller? (+Interrupts)

Tue Jun 06, 2017 11:35 pm

If one wants to use a Pi as much like a microcontroller as one can; it's always possible to run code only in the GPU and never even enable the ARM CPU(s).
Sure, have you the source and compiler for the ThreedX RTOS on the VC4?
Then we can go back and hack all those old iPods etc that have VC1, 2, 3?
Not saying it cannot be done as others have done it and compilers are around now.
You do get the bit where I say I'm not an code expert just a hardware guy?

Unused hardware is a waste of silicon, if it is on the die I want to use it.
I just don't want to read the manual or even RE the manual for one chip or one family of chips.
Those things are just too big now and where is the full manual for the Pi?
And with high level tools who needs to read the manual to write an app?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

W. H. Heydt
Posts: 11109
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Pi vs Microcontroller? (+Interrupts)

Wed Jun 07, 2017 12:00 am

Gavinmc42 wrote: I just don't want to read the manual or even RE the manual for one chip or one family of chips.
Those things are just too big now and where is the full manual for the Pi?
Can't agree with you. If you want to understand something...read the manual. The problem of people asking questions that are trivially answered if you know your way around the manual spawned its own acronym: RTFM.

Back when I was programming on IBM mainframes, one manual that I always kept handy was "Principles of Operation", which--among other things--gave full descriptions of how every machine instruction worked. If I had had to chose between keeping my own copy of the PoP manual to hand and the programmers manual for the languge I was working in, I would have chosen the PoPs manual.
And with high level tools who needs to read the manual to write an app?
That's pretty much the whole idea behind high level languages, going all the way back to FORTRAN and the CODASYL committee in the 1950s. Somewhat more recently, the idea of platform independence has been added...although it never seems to be quite perfectly implemented.

asandford
Posts: 1997
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: Pi vs Microcontroller? (+Interrupts)

Wed Jun 07, 2017 1:16 am

This topic has been discussed many times before. Apples vs Oranges. They ae complimentary rather than competitive. I have many system that use the 'grunt' of the Pi to process the data coming from 'determinable' MCUs.

User avatar
Gavinmc42
Posts: 4064
Joined: Wed Aug 28, 2013 3:31 am

Re: Pi vs Microcontroller? (+Interrupts)

Wed Jun 07, 2017 2:39 am

Can't agree with you. If you want to understand something...read the manual
These is no one manual for the Pi's CPU chips.
It's in bits and pieces with stuff missing.

Microcontrollers have manuals, I have boxes of them, going back to 4004.
I have read them all, some 8 bit ones I nearly memorized.
These is so much stuff now in current SoC's, it is a collection of manual's.

So how is a newbie going to master the Pi? throw the non existent manual at him and say RTFM?
1) Oh, and here's the Kernel source, read that too. While you are at it, here is GCC, you may need version 4.9 or 6.2 or...
But most people use Python so here's that too...... Don't forget Bash, Awk, SED, they will come in handy...

2) Or here is IDE, here are some examples, load project, compile and run 1 minute later.

The second method is now available for Pi's. Is it an apple or orange?
Some sort of hybrid fruit --Rasapange?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Heater
Posts: 13924
Joined: Tue Jul 17, 2012 3:02 pm

Re: Pi vs Microcontroller? (+Interrupts)

Wed Jun 07, 2017 3:26 am

W. H. Heydt,
...RTFM....
How quaint. It must have been great when one FM would get you through an entire career :)

Having spent decades working in many programming languages and with many platforms and operating systems I have had to study dozens of manuals. I don't want to do that anymore. Not unless someone is paying. Or unless it is a manual for something genuinely new and interesting, not just yet another programming language, or yet another OS, or yet another processor architecture.

I have a dozen or so micro-controller developments boards and such kicking around. PIC, ATMEL, Cyprus, ARM, XMOS, etc, etc. Most of them are never going to see any action because life is too short to get to grips with yet another IDE, yet another bunch of registers, yet another instruction set, same old, same old, again and again.

And those FMs are huge now a days!

No, it's happy hacking, trial and error, a google search, stack overflow, a question on a forum. It's not efficient for everyone to wade through every damn FM.

Rant mode off.
Memory in C++ is a leaky abstraction .

W. H. Heydt
Posts: 11109
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Pi vs Microcontroller? (+Interrupts)

Wed Jun 07, 2017 4:07 am

Heater wrote:W. H. Heydt,
...RTFM....
How quaint. It must have been great when one FM would get you through an entire career :)
I trust you understand that, at one time, IBM was the secodnd largest publishing company in the world (the bigest was the US government). They didn't list manuals as being part of the "Systems Reference *Library*" for nothing. The PoPs manual was strictly the S/360 and S/370 *hardware* manual. It covered--as already mentioned--the instruction set. It also covered the details of the PSW, CSW, and CCWs, though those areas were rarely looked at by applications programmers. There were vast numbers of other manuals. I even found a bug which IBM declined fix, but changed a manual instead (they changed it say that what I had tried to do was unsupported by that access method in that language...I seriously doubt anyone here is interested in the details). I usually had 3 to 4 manuals at my desk, and I had access to many more on the occasions I needed them.

Heater
Posts: 13924
Joined: Tue Jul 17, 2012 3:02 pm

Re: Pi vs Microcontroller? (+Interrupts)

Wed Jun 07, 2017 4:19 am

W. H. Heydt,

Sorry, just having a little dig. I'm sure IBM published a lot. As it happens the only IBM manual I ever read was the BIOS reference for the original IBM PC. Which had a complete BIOS listing in the appendix. Those were the days.
Memory in C++ is a leaky abstraction .

W. H. Heydt
Posts: 11109
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Pi vs Microcontroller? (+Interrupts)

Wed Jun 07, 2017 4:24 am

Gavinmc42 wrote:
Can't agree with you. If you want to understand something...read the manual
These is no one manual for the Pi's CPU chips.
Are you seriously asserting that there are no manuals for the ARMv8 Cortex-A53 (or other cores used in various Pis)? I rather suspect you are mistaken in that. Now if you are asserting that there is no single manual that covers the totality of the SoCs used in Pis, I would partially agree with you. Much of the VC4 is proprietary. However, there are published interface specifications that you need to work with much of the VC 4. There is even a language specification that covers the major interface: OpenGLES, plus there is a work-in-progress driver for OpenGL. A modest search should turn up manuals to cover those languages.
It's in bits and pieces with stuff missing.
And? If you don't know what's in there and what the interface looks like, it may just as well not exist for you.
Microcontrollers have manuals, I have boxes of them, going back to 4004.
I have read them all, some 8 bit ones I nearly memorized.
MCs are a good deal simpler than SoCs. And, by the way, I don't recall Intel ever calling the 4004 a "microcontroller". It was a 4-bit computer originally designed to keep from having to design endless one-off calculator chips. I remember when they held a contest to see who could write the most complex program for the 4004...something Intel repeated with the 8008.
These is so much stuff now in current SoC's, it is a collection of manual's.
And this is a problem...why?
So how is a newbie going to master the Pi? throw the non existent manual at him and say RTFM?
One step--and, if needed--one manual at a time. You don't need to know the guts of the VC4 to learn how to program. You don't even need an ARM manual to learn how to program in anything other than the ARM assembly language. What you need is a manual on the language you are learning.
1) Oh, and here's the Kernel source, read that too. While you are at it, here is GCC, you may need version 4.9 or 6.2 or...
But most people use Python so here's that too...... Don't forget Bash, Awk, SED, they will come in handy...
Kernel source if you want to learn about the kernel (presumably after you have C solidly under your belt). Gcc source if you want to see how a complier is written (and I would point out that there are college courses on that as a specific subject). Python...yup there are manuals. Do you want to learn it without access to at leat one? As for the utlities...the programmers manuals for them are at your finger tips through the man command. Those specific one have entire works devoted to the ins and outs, since they are complex in and of themselves...shell programming (bash is *1* shell) is a pretty broad subject and there are manuals for bash...as well as sh, ksh, Bourne, csh, and probably others. You also missed both vi and emacs (not to pick sides...).
2) Or here is IDE, here are some examples, load project, compile and run 1 minute later.

The second method is now available for Pi's. Is it an apple or orange?
Some sort of hybrid fruit --Rasapange?
It may be just me, but I'd recommend that people learn how to work without IDEs first. You've been complaining about all the stuff hidden away where you can't get at it (mostly in the VC4). IDEs do that at a different level.

W. H. Heydt
Posts: 11109
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Pi vs Microcontroller? (+Interrupts)

Wed Jun 07, 2017 4:27 am

Heater wrote:W. H. Heydt,

Sorry, just having a little dig. I'm sure IBM published a lot. As it happens the only IBM manual I ever read was the BIOS reference for the original IBM PC. Which had a complete BIOS listing in the appendix. Those were the days.
Fair enough. I worked in shops that had microfiche of entire IBM mainframe operating systems. I knew one guy who looked through ti to find out how IBM had done a particular bit that he had needed to do himself in hopes of finding that IBM had done it better. He discovered that his solution was actually better code than theirs. He was rather perturbed...

I did one time actually sit down and read all the way through the programmers manual for the IBM 3800 Printing subsystem. Those manuals really were intended for reference, and not for reading.

User avatar
Gavinmc42
Posts: 4064
Joined: Wed Aug 28, 2013 3:31 am

Re: Pi vs Microcontroller? (+Interrupts)

Wed Jun 07, 2017 8:11 am

Having spent decades working in many programming languages and with many platforms and operating systems I have had to study dozens of manuals. I don't want to do that anymore. Not unless someone is paying.
Me neither, I put my time in, finding errata in chips and manuals.
Motorola really did not like me finding them, sort of ;)
Ex Motorola boss still headhunted me years later :lol:

But now it is time to have fun, to do stuff that years ago would have required RTFM or was impossible.
These days I google for answers and code snippets, sometimes even finding myself 6 months later :oops: .
There was no Google when I had to RTFMs decades ago.
The FM's were on paper, you could sit down in a comfy chair and read them.

Now it is PDF's and yes I do have the ARM 1176/A53 ref manuals and a few dozen other ARM manuals in PDF.
Plus a bunch of ARM's fluffy powerpoints, useful for clues.

Our eBookshelf on the work server is 16.9GB with 47902 files, 9320 folders, collected mostly in the last 5 years
PDF books in many Computer languages, Arduino, Pi mags/books, Agile methods, archived Mags like Circuit Cellar, Scientific American, Linux Mag...........

I am really, really tired of RTFM's.
If I can code Pi's like the micros I have done for decades without RTFM's I think that's a good thing.
Some people might even call that progress, Grumpy old men will call it cheating and taking the easy way.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

hippy
Posts: 6284
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Pi vs Microcontroller? (+Interrupts)

Wed Jun 07, 2017 10:47 am

Gavinmc42 wrote:
If one wants to use a Pi as much like a microcontroller as one can; it's always possible to run code only in the GPU and never even enable the ARM CPU(s).
Sure, have you the source and compiler for the ThreedX RTOS on the VC4?
Nope. I write GPU (VPU?) assembler, create a bootload.bin, boot and execute that.

I am not advocating using a Pi this way, was just noting that it can be, and that may fit some use cases.
Gavinmc42 wrote:Unused hardware is a waste of silicon, if it is on the die I want to use it.
I presume you mean "want to be able to use it". It doesn't worry me if there are things which cannot be used. That doesn't stop a Pi being used as if a micro, and most micros won't even have what cannot be used anyway. I don't see unusable silicon as a waste; at least no more of a waste than silicon which I am not using or don't want to use. I am happy to throw away half of anything so long as I get the half I want and the price is fair for getting that.

Return to “General discussion”