View Single Post
  #4   Spotlight this post!  
Unread 23-02-2007, 01:50
Shinigami2057 Shinigami2057 is offline
Slackware Is Your New God (Mentor)
AKA: Harry Bock
FRC #1350 (Rambots)
Team Role: Programmer
 
Join Date: Oct 2006
Rookie Year: 2006
Location: Johnston, RI
Posts: 106
Shinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really nice
Re: Programming with Java?

Quote:
Originally Posted by the_innovator View Post
Hi,

Our computer science department teaches Java to students. We're trying to integrate some robotics with the Object-oriented curriculum.

I'm curious to know if there is any way to have the students play with Microchip's microcontrollers and Java language, in order to program the robot...?

What are the limitations?
You have to keep in mind the nature of the user processor that is given to us - it is a PIC18F8722, which is 10MHz and has about 3900 bytes of static RAM. Java is one of the most bloated of all languages, especially in its implementations. You need very large class libraries for Java to run on any platform, and that just can't happen with the amount of program and data memory on the PIC18F. The code is very simple (IMO) as it is, and adding classes and interfaces and whatnot on top of it really defeats the purpose.

I also believe that the object-oriented paradigm really doesn't fit into robotics very well - it's a very functional kind of work, where flow control is far more important than encapsulation and abstraction. Your students would benefit more from learning C and lower-level constructs to give them a more well-rounded approach to programming in general.
__________________
One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs.