Use of java and other languages

Go To Last Post
18 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Do java and other languages have support with microcontroller programming ? If please elaborate

This topic has a solution.

Salman

Last Edited: Sun. Mar 12, 2017 - 06:17 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What does Google say? (search: programming microcontrolers in java)

 

http://stackoverflow.com/questio...

 

 

What other languages are you looking into?

 

JIm

 

If you want a career with a known path - become an undertaker. Dead people don't sue! - Kartman

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

First define "microcontroller" ;-)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Java - lejos
Javascript - Espruino
Python -micropython
Lisp -ulisp
.......

As Cliff mentions -'microcontroller'. This might range from a device with 1k of flash and 32 bytes of ram to many megabytes of flash and ram. Depending on your exact 'microcontroller' this might limit your choices.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Atmel"s mcu

Salman

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

salmanma6 wrote:
Atmel"s mcu

Read the information in the link I posted.  If you are referring to the AVR line of MCU's then Java and the like are not a good fit.

 

JIm

If you want a career with a known path - become an undertaker. Dead people don't sue! - Kartman

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Again, Atmel make a wide range of microcontrollers. For example, Lejos runs java on a SAM7

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Atmel make Cortex A that are quite capable of running Linux and hence just about every programming language ever invented.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

C# - .NET Micro

.NET Micro Framework

http://netmf.github.io/

Central hub for .NET Micro Framework core development community

Welcome to the .NET Micro Framework

The Microsoft® .NET Micro Framework combines the reliability and efficiency of managed code with the premier development tools of Microsoft Visual Studio® to deliver exceptional productivity for developing embedded applications on small devices. The Microsoft .NET Micro Framework SDK supports development of code, including device I/O, in the C# language using a subset of the .NET libraries, and is fully integrated with the Microsoft Visual Studio® development environment.

...

It's currently on a competitor's ARM Cortex-M.

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:
Python -micropython

salmanma6 wrote:
Atmel"s mcu
... nee Microchip

https://github.com/micropython/micropython/blob/master/README.md

...

  • pic16bit/ -- a version of MicroPython for 16-bit PIC microcontrollers.

...

"Dare to be naïve." - Buckminster Fuller

Last Edited: Sun. Mar 12, 2017 - 08:50 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

... and brainf*ck too...

 

JW

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Why ask such easy to find stuff?

https://duckduckgo.com/html?q=%2...

I seached for "arm" here because I assumed something like java would hardly be usable on an 8-bit AVR

(Even though I've never used it).

 

Others seem to concur:

 

http://electronics.stackexchange...

Say someone was selling a big floating skirt and some long poles they said you could use with your car to go fishing on a lake. After struggling for three days to put it on, you get about 15 feet into the lake before your car flips over and sinks. You're dad's going to be -really- pissed. You had passed up the local boat shop with a nice canoe. The canoe is the micro's C compiler, and the floaty car with sticks is Java on an 8-bit microcontroller. Luckily, this didn't happen... you're asking us where you can find the floats. So, as your dad, let me say "What are you thinking?! Get a canoe!" – darron Dec 15 '10 at 20:44

Paul van der Hoeven.
Bunch of old projects with AVR's:
http://www.hoevendesign.com

Last Edited: Fri. Mar 17, 2017 - 11:33 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jgmdesign wrote:
If you are referring to the AVR line of MCU's then Java and the like are not a good fit.

Does that include Javacard?  There were some/many forays into Javacard some years ago.  Google uncovers a couple mentions:

https://books.google.com/books?i...

https://books.google.com/books?i...

 

The Javacard specs fit microcontrollers fairly well.

 

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

theusch wrote:
The Javacard specs fit microcontrollers fairly well.

From what little was in those two pages, it does not appear that the AVR did very well, but again not much written in those few sentences.  In the 'big picture' maybe other micros can work with it.

 

I will say I know nothing of Javacard and my comment above is based on the two links.

 

Jim

If you want a career with a known path - become an undertaker. Dead people don't sue! - Kartman

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jgmdesign wrote:
From what little was in those two pages, it does not appear that the AVR did very well, but again not much written in those few sentences.

Note that in the first link, the further research work was done with a production/commercial card already containing a Javacard implementation.

 

Javacard probably passe now.  And AVR8 is also, for new initiatives.

 

But going back to what I posted in 2004...

http://www.avrfreaks.net/comment...

 

--Even Sun recognizes some of the points brought up here. An excerpt from the Sun JavaCard 2.1.1 spec:
http://www.informatik.uni-augsbu...

"This chapter describes the subset of the Java virtual machine and language that is supported in the Java Card 2.1.1 platform.

2.1 Why a Subset is Needed
It would be ideal if programs for smart cards could be written using all of the Java programming language, but a full implementation of the Java virtual machine is far too large to fit on even the most advanced resource-constrained devices available today.
A typical resource-constrained device has on the order of 1K of RAM, 16K of nonvolatile memory (EEPROM or flash) and 24K of ROM. The code for implementing string manipulation, single and double-precision floating point arithmetic, and thread management would be larger than the ROM space on such a device. Even if it could be made to fit, there would be no space left over for class libraries or application code. RAM resources are also very limited. The only workable option is to implement Java Card technology as a subset of the Java platform.

2.2 Java Card Language Subset
Applets written for the Java Card platform are written in the Java programming language. They are compiled using Java compilers. Java Card technology uses a subset of the Java language, and familiarity with the Java platform is required to understand the Java Card platform."

 

Hmmm--"1K of RAM, 16K of nonvolatile memory (EEPROM or flash) and 24K of ROM. " Sounds like an AVR to me. :)

 

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There's a whole class of language developers than think a "small memory footprint" is something like 256k of code and 64k of data.  There's a set of somewhat Arduino-like boards set up to run C#, for example ("Netduino" is one brand.)  They advertise up to 384 kB code space and 164 kB of RAM, but they run on a good-sized CM4 chip with at least 512k flash and 256k of RAM, so I tend to get stuck on the "at least 128k of Flash and 92k RAM *just for the runtime support*.  Java ME (Micro Edition) was like that too: "starting as low as 128 KB RAM and 1 MB of Flash/ROM" - Yeah.

 

Of course, then I look at the $40 price tag and feel like a dinosaur for allowing the overhead to bother me...  :-(

 

The big problem with AVR-like microcontrollers seems to be RAM.  "modern" languages throw RAM at their data like it was free.  I mean, it's just fine if an empty string requires 40 bytes, right?  That's swell in an all-ram system, or on a microcontroller with lots of RAM, but it doesn't work very will with
old style micros (AVR, 8051, PIC, etc) that prefer to give you lots of code space and just a little bit of RAM.

 
   
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

westfw wrote:
There's a set of somewhat Arduino-like boards set up to run C#, for example ("Netduino" is one brand.)
GHI Electronics in Michigan is another one.

One of the MPU is a SAM9.

GHI Electronics

GHI Electronics

  • Home
  • Catalog
  • .NET Micro Framework  Product Selector

https://www.ghielectronics.com/catalog/netmf

...

SAM9X35

...

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

westfw wrote:
There's a set of somewhat Arduino-like boards set up to run C#, for example

   

That's the Microsoft .NET micro framework - mentioned in #9