I have way to many types of microcontrollers ;) Most of them are pic's
and AVR is the second in line (followed by hitachi/renasas and arm),
none of which I program in asm.
The last few day I have been playing around with USB on an 18F4550.
This was my intention a long time ago, but was recently triggerd by
the statement of Bert on the jallist that he hoped someone could
supply him with an usb lib, since the specs are rather intimidating.
And I was just thinking how I could ask a (political incorrect)
question that I came accros in the process when Seb's question came
along.
The good part of the message is that I have USB running - a virtual
com port is coupled to the pic. In my first attempt I used the windows
standard interface (CDC) - this does work okay but (due to a driver
bug in windows) does not support RTS properly (and that is mandatory
for the project at hand). So I switched to simulate an FTDI chip
(HID). This works okay but is not suiteble for distribution due to
license limitations of the windows driver.
So again - I have USB running on a pic... but not with JAL. I used the
Microchip C compiler, it's libraries and examples posted on the
Microchip forum. These libraries contain a lot of 'knowledge': struct
etc and - depending on the chip - specific code is selected and
settings are choosen. I think this can be reversed engineered and
recoded in JAL for a specific chip, but this will take quite some
effort. And what would the result be? A library that provides part of
the functionality of the orignal framework, for less chips. And in
addidtion there is the need for maintenance of these libraries (where
Microchip maintains the C-libs).
So what is the added value? Shouldn't we just advice people to use the
microchip compiler when they run USB (or even any code) on an
18F-chip? And what is the added value of a JAL compiler for AVR, over
the existing C++-compiler?
Don't get me wrong: I like JALV2 and I think it does a great job for
16F chips which - due to their architecture - don't have a proper C
compiler available at a resonable price. And if you have experience
with JAL, it is also a logical choice when you start a similar project
on an 18F chip. But beyond this?
I would like to hear your opinion about this.
Joep
2009/2/7 Joep Suijs <jsu...@gmail.com>:
Joep Suijs wrote:
> Don't get me wrong: I like JALV2 and I think it does a great job for
> 16F chips which - due to their architecture - don't have a proper C
> compiler available at a resonable price.
Depends what you call 'proper' and 'reasonabe price'. I have been using
(the demo versions of) the CC5x and CC8E compilers with pleasure (in a
Windows emulator). It generates pretty tight code. I converted a
program for the 16f88 from CC5X to JalV2: the hex file grew by 50%. I
have sent the program to Kyle to show which improvements of code
optimisation could be possible.
CC%x has no libraries: you have to learn/do everything yourself, which
is a good learning experience!
I have also been looking at SDCC, but it is not very actively
developed.... I intended to build an OS/2 version of it but got stuck.
> And if you have experience with JAL, it is also a logical choice when
> you start a similar project on an 18F chip. But beyond this?
Because the majority of examples are using C, there is no real choice.
And I also want to build a USB device like you. Can I 'borrow' your code?
Regards, Rob.
--
Rob Hamerling, Vianen, NL (http://www.robh.nl/)