Free Alternative to PicBasic?

That doesn't seem to be a reasonable option. The ones I saw were $6 plus another $6-$10 shipping. Might as well buy the whole board for $20 shipped.

I couldn't find mention on the website... Can the 2009 board use the usb for anything other than loading code? If you can put that puppy in host mode and all the support code exists in the library, interesting possibilities happen.

Reply to
mike
Loading thread data ...

g

ight

Arduino needs two chips (FTDI232 and Atmega168).

formatting link
e=3DSTRK:MESELX:IT

works with single chip AT90USB162

Fully compatible with free AVRStudio 4 and WinAVR.

Reply to
linnix

...

I am jumping into a thread that I have been following only sporadically, so perhaps you already know that your original C program would probably have been fast enough if you had passed the structures by reference (address, pointer), and not by value. Pass by value is the default in C for structures.

Pass-by-reference also saves stack space. Anecdote: in my former job we were developing an Ada program using the GNU Ada compiler (GNAT) and were passing lots of large records (the Ada term for C's struct) between procedures. In Ada, the compiler chooses between pass by value or by reference for record-type parameters (you can of course force pass by reference if you wish). Ada compilers usually choose to pass records by reference.

Our program worked fine until we upgraded our compiler; it turned out that the compiler developers had changed their minds to take the C approach and to pass records by value, which meant that the program now needed about 10 MB of stack when compiled with the new compiler. Well, once we understood the problem we just let it have more stack space; it was a batch program and not time- or space-critical.

The next version of the compiler went back to pass by reference for record parameters.

--
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
       .      @       .
Reply to
Niklas Holsti

It's fun to be able to run up a program in, like, an hour, push it into the Arduino in seconds, and watch it go. I break with Arduino pretty soon after that, because their packaged solutions are too -- packaged. For example, you can get a well-made Ardumoto "shield" board that will stack on an Arduino main board and run 2 DC motors or the 2 windings of a stepper motor through an L298 H-bridge. You can't really stack a second Ardumoto to control a second stepper, because the L298 control lines route straight back to the selected processor pins, with no room for patching or jumpering, so running a second independent shield takes cutting and carving. Making up a prototype board with an ATmega and L298's is just as simple.

Maybe this is endemic to open hardware -- what you get for nothing is somebody else's solution to somebody else's problem. Can make for interesting reading, which is good, but once a project starts to develop you wind up solving your own problems yourself, just like the old days.

Mel.

Reply to
Mel

They don't use a bus system for the "shields"? This sounds like a bad idea.

--
Frank Buss, http://www.frank-buss.de
piano and more: http://www.youtube.com/user/frankbuss
Reply to
Frank Buss

Ah shipping - the last ones I got were with some other parts so the minimal shipping covered it all. I guess quantity 1 the shipping could double the price.

At startup the bootloader looks for a particular input on the serial port. If it doesn't see it it just jumps to the application address (which hopefully has some previously loaded code). If it sees the code load sequence it loads the code and jumps to it. In either case the application code is now free to use the serial port/USB interface.

The IDE has a simple serial monitor so I usually click the Upload button to load the code and then the Serial Monitor button to see what it is doing (well if I'm using the serial port in the application).

Reply to
Dennis

I didn't mean to convey that. The Diecimila main board has 2 8-pin receptacles that carry 14 I/O lines, GND and the AREF line, and 2 6-pin receptacles that carry 6 analog inputs plus RESET, GND, and various power. Shield boards plug into these, and by using long-pin receptacles on the shield you can have pins to connect to the main board on the bottom of the shield, and receptacles on the top for more shields. Effectively those stacks of receptacles create a bus. The problem is on the Ardumoto itself. The DIRA, DIRB, PWMA, and PWMB inputs to the L298 go directly to buss'ed I/O pins 12, 13, 3, and 11 on the receptacle with direct and hard-to-break traces. Stacking a second Ardumoto connnects its inputs to the same I/O pins, so it can't run independently of the first without performing some surgery.

Mel.

Reply to
Mel

With a bus I mean something like ISA, where all boards have some addresses and share the same data lines, but this would be difficult with PWM outputs, which needs to be connected to one board all the time. But you are right, some problems would be solved if the shield boards would provide a patch field, default connections with some 0 ohm resistors, so that you can choose which lines of the Arduino are hardwired to which boards by solderings some wires, which would work even with multiple boards of the same type.

--
Frank Buss, http://www.frank-buss.de
piano and more: http://www.youtube.com/user/frankbuss
Reply to
Frank Buss

There are NO 8-bit ro 16-bit microcontrollers with host mode capability.

Most 32 micros do not have host mode either.

hamilton

Reply to
hamilton

I got all excited about the arduino and set an alarm so I could snipe one on ebay this evening. Decided to read the Atmega328 manual while I wait. The architecture reminds me of the 8051. I really liked the vectored interrupts...but things started to go down hill from there. I want more I/O pins. I liked the built-in voltage reference until I learned that it's

+/- 10%...that's worse than the VCC accuracy that the PIC uses. And the A/D is specified for Vref = 4V. Not any mention (anywhere that I could find) of the A/D specs for Vref = the reference voltage.

I'm sure it has its advantages for some classes of application, but for what I'm doing, I can't see any advantage worth learning a whole new architecture and language and toolset.

Won't be no sniping today...

Reply to
mike

ng

might

the

n after

ple,

otor

o

back

so

g up a

p you

t.

At90usb646 has 56 I/Os.

at

Because you are getting it wrong. The absolute value may be 1.1V +/-

0.1V, but +/- 0.001V delta. Once it's calibrated, its 99.9% accurate.

You need to read/learn more first.

Reply to
linnix

ting

I might

to the

oon after

ample,

motor

to

ht back

g, so

ing up a

lop you

ne

ait.

Sorry, only 48 I/O (vs. 33 for 16F877A)

that

Reply to
linnix

Yes, and my car has more wheels. That's equally irrelevant. The point is not whether one can buy a bigger chip. I'm discussing what's on the $20 arduino board.

That's new info, thanks. I searched what appears to be the 448 page datasheet. The ONLY mention of the reference I found is in table 28.7

1v-1.2v. Woulda been nice for them to print the stability numbers.

I still think that's horrible. 30 years ago, I could buy a 5% zener diode.

Nor did I find anything about calibrating the reference. You'd think they could calibrate it the way they do oscal. Yes, I can calibrate my program to use a stable reference of any value. I'll have to think more about whether I can do that reasonably with integer math. My gut tells me that's gonna make the quantization error non-uniform. Maybe I don't care.

Makes a lot more sense on a production line where you can calibrate each one. For hobby use, not so much advantage.

I think I've already learned enough to look elsewhere. Arduino doesn't appear to be a good fit for me. I have no incentive to force-fit it.

>
Reply to
mike

sting

I might

nto the

soon after

xample,

n

r motor

o to

ght back

ng, so

king up a

s

elop you

one

wait.

ed

e that

-

ode.

Zener diodes are easier to trim than micros.

I can get you 1% accurate AVRs. We can calibrate them and store the reference data in EEPROM.

hey

to

But still less than 1%.

Just need to read the reference value from EEPROM.

It save you the external voltage reference.

or

Doesn't make sense to rule out the AVR based on internal reference, which is not even in the PIC16F877A.

Just get the chip, I have At90usb646 (64K Flash, 4K Sram and 2K EEPROM) for $6.

Reply to
linnix

the

after

motor

back

a

you

Wrong conclusion. I'm not ruling it out because of any one feature. I'm deciding not to proceed at this time because, for my applications, "I can't see any advantage worth learning a whole new architecture and language and toolset." Conclusion might be different if I didn't already have a development infrastructure for PICs.

The thread has deviated from its original path...finding a free alternative high level language for programming PICs. That's ok, I've learned a few things in the process.

Reply to
mike

Have you tried the rather nice mikrobasic?. It is free for up to something like 2000 line of code, so if you projects tend to be smaller than this give it a wizz. I think the full version with lifetime upgrades/support is something like £80.

formatting link

Phil

Reply to
Phil Jessop

resting

ut I might

into the

y soon after

example,

an

per motor

oto to

aight back

ring, so

Making up a

is

or

evelop you

.

pe one

I wait.

ored

ere that

+/-
.

.7

diode.

k they

ave to

for

w

ve

Not really, AVR has free HLL gcc ports (Fortran, C, ADA. etc). WinAVR is the window version of gcc-avr. AVR is very popular for this reason, although ARM is catching up. However, for small low power 8 bits, AVR is ideal.

Reply to
linnix

Thanks for the link. I downloaded the stuff and will take a look. The 2K limit is too restrictive. Although most of my programs are only a few dozen lines of BASIC, by the time the compiler links in all the libraries, they push the 2K limit.

I always chuckle at "lifetime support". Who's lifetime? In 1980, I had a checking account that paid 7% interest compounded daily on your account balance "for life". When the market tanked, the bank folded. Next day, a different bank opened in the same building with the same employees. They even seamlessly took over my account as a service to me....minus the interest...

Their licensing scheme is also to restrictive. Locked to a single computer. They have lots of nice words on how you just call up and get a new key if you need it. That works only as long as there's someone answering the phone. I try not to get involved in anything that restrictive. It's not unusual for me to use the same tool for 20 years. If you have a DELL computer with a DELL reinstall disk, M$ can disappear from the face of the earth and you can still reinstall the OS and it will work unrestricted forever. That's the way ALL software should be.

Anyway, most attractive-looking option at this point is Great Cow Basic.

Reply to
mike

I can understand how you feel, but my own experience with mikroelectronica has been excellent. I actually bought my original Mikrobasic package back in

2004, have upgraded the version many times, and have also gone through several PC's in the process. I just drop an email to them and always get a reply/new key within a few hours. They are a Romanian outfit but quite a large company and have never failed me in 6 years. I am in the UK and use it to earn a living.

I have absolutely no relationship with the company apart from a single purchase in 2004 but feel I have to give them credit where it is due. An excellent company to deal with whose product range in my opinion is extremely good value and customer after sales service second to none.

Phil

Phil

Reply to
Phil Jessop

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.