I have been looking into micro-controllers and was wondering if the majority of them are C/C++ based? I am quite proficient in java and want to ask you guys if anyone knows of a good cost efficient, java-based micro-controller I could look into.
All answers are appreciated!
Yes, Java can work with microcontrollers. Probably the best way to have Java work with microcontrollers is to use Java on top of an operating system based PC or Android device and use it to communicate to the wireless or wired connected microcontrollers that directly control motors, sensors and other custom hardware.
Now, microcontrollers are not uniform and vary in power, memory, and many other features. So adopting the JVM (java's virtual machine) for them is not easy even when possible.
On the basis of Service Provider or Vendor the types of microcontroller are: 1) AVR: AVR microcontroller is developed by Atmel service provider, AVR architecture is based on the Harvard architecture. It is based on Reduced Instruction Set Computers (RISC). AVR is not an acronym it is just a name given to the RISC architecture based microcontroller.
That is not to say though, there is java used in the microcontroller world. Very convoluted though, android runs on some java which in the lowest end possible uses a ARM processor (its up to you to decide if you really want to call that a microcontroller). So all in all, yeah I would recommend that you learn C.
The difference between a language like java (or c#) and a lower level language like c or c++ is the fact that they have a virtual machine. This has many advantages, like making the application platform-independent. But it also means that each platform has to have the vm for it.
Now, microcontrollers are not uniform and vary in power, memory, and many other features. So adopting the JVM (java's virtual machine) for them is not easy even when possible. Most of the time its just impossible - most of the uc have very low memory capacity (part of what makes them cheap) - this would make fitting any general-purpose JVM there impossible, not to mention also with the application code.
I am aware of some partial-implementations of java for microcontrollers. For example "java-based" sim cards (which have a very small controller inside) are there, but they have a very limited version of java.
So basically I think your best bet to write "embedded java" (especially if you're a novice) is to work on top of microcontrolers that are basically a small fully functioning computer, that runs a proper OS that already has a JVM. Just look into one of the new "micro computer" open source projects like raspberry pi or beaglebone. Both cost around 2x of an arduino and are much more powerful.
Hope I helped.
Have a look at the Java-ready STM32 microcontrollers or Renesas RX.
As an alternative, you can run a stripped-down JVM on AVR/Arduino using Haiku-VM, NanoVM or uJ.
You can also write Arduino sketches in Java and cross-compile them to C using VBB.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With