From: Sebastien L. <seb...@gm...> - 2010-07-23 07:58:26
|
Hi Paul, Thanks for your reply 2010/7/20 Paul Stoffregen <pa...@pj...> > > > Very briefly, Firmata is built on top of the Arduino functions like > pinMode, analogWrite, digitalRead, etc. The pins as accessible via Firmata > protocol usually correspond to the pins as implemented by Arduino, but in > some cases special mapping is needed. Not all pins support all features, > and Firmata needs to know which do. Arduino also lacks some important > information Firmata needs. The hardware abstraction layer provides all > this, so (hopefully) StandardFirmata can be easily ported to any new boards > which work with Arduino. I had a brief look at boards.h, it's more clear now :) Just some comments: TOTAL_ANALOG_PINS must not exceed 16, but some microcontrollers (eg.many PIC) can have way more than 16. Why is there such limitation ? > > > > Since I'm implementing Firmata for Microchip PIC (using Jalv2 language), >> this sounds interesting to me >> > > As a practical matter, StandardFirmata and the Firmata library are written > in C++, built on top of the Arduino system, which is really just C++ > libraries as far as we're concerned. If you're working in Jalv2, a > completely different language, much of this may not be very useful for you. > It may end up being simpler to just reimplement the Firmata protocol, > perhaps specific to only your target hardware, or maybe with a similar > abstraction layer? > I used Arduino/Firmata code to convert it to Jalv2, and noticed some hard coded logic related to pins. When converting, I tried separate generic and specific stuff, this could lead to a kind of very "light" hardware abstraction layer too... http://code.google.com/p/jaluino/source/browse/trunk/lib/firmata.jal + pin mapping: http://code.google.com/p/jaluino/source/browse/trunk/lib/jaluino_medium_pinmap.jal > Could someone enlighten me ? >> > > I hope this helped. :-) > It did, thanks ! cheers, Seb |