Go Down

Topic: First microcontroller board (Read 10307 times) previous topic - next topic

Horace

I've been looking at Arduino for my first microcontroller board and it looks great, but I have just one concern.

I like assembly programming, will I be able to program in AVR assembly directly?  Can I use this board as a normal AVR development board in addition to using the IDE and high level language?

mellis

Sure, you can use assembly.  The Arduino software (IDE) doesn't really support assembly (though you should be able to do it with inline assembly in a .c file), but the hardware will run anything (any .hex file) you give it, and there's a makefile to build and upload code from the command line.

Horace

Oh good, I was hoping for that answer :)

Besides not being able to use (many?) other AVR chips in the board, I don't see a single downside to Arduino.  Plus it's full of open source goodness that gives me that fuzzy feeling.  I'll go order one now.

xSmurf

Assembly you said heh? Maybe you could come into the project by releasing a little tutorial/howto on getting started with Assembly on an AVR for the ASM neophytes? I can't speak for others but I'd totally digg it! Learning assembly is one of the reason I got into uC's, I just never ended up doing it :/
"Pilots believe in a clean living... they never drink wisky from a dirty glass."

Horace

Absolutely.  I'm going to order from Sparkfun tomorrow (looks like they just got some more in, I could have sworn they were out yesterday), so I hope to be hacking on it by next week.  After I figure out the AVR tools and how to get files programmed, I'll write up a document.

xSmurf

Ladyada has a bunch in stock too if ever Sparkfun is out again tomorrow.

http://www.adafruit.com
"Pilots believe in a clean living... they never drink wisky from a dirty glass."

Horace

Oh cool, that site has some other stuff I'm interested in.  I might as well get a minipov kit while I'm at it.  I can modify it to make one of those super-cool spinning POV clocks.

xSmurf

#7
Aug 29, 2007, 07:16 am Last Edit: Aug 29, 2007, 07:17 am by xSmurf Reason: 1
If you're really getting into uC's and will want to use the chip standalone (without the arduino board but with the arduino API/bootloader) it might be worth investing in a programmer kit (which ever suits your needs will do, parallel probably being the easiest. She has some nice kits, that's for sure :)


Don't forget you can also just make your own if you have some spare parts :p
"Pilots believe in a clean living... they never drink wisky from a dirty glass."

Horace

I saw the schematic for the parallel programmer.  Is that all that's needed, or is there more circuitry on the Arduino related to programming?  If that's all that's needed for programming AVR chips, I don't think I'll even need a kit.  I saw similar plans for a serial programmer with just a few zener diodes (even better, I wonder if I even have a parallel port on my new machine?).

But anyway, I'll be playing with the Arduino for a while first.  I think I can live with the rather small bootloader program on there.

xSmurf

#9
Aug 29, 2007, 08:14 am Last Edit: Aug 29, 2007, 08:16 am by xSmurf Reason: 1
It is. Happy Programming! :D

(I bought a USBTiny as I don't have a Parallel port EDIT: And I was lazy :p)
"Pilots believe in a clean living... they never drink wisky from a dirty glass."

Horace

OK, ordered.  I went ahead and ordered some ATtiny13's as well, see if I can get those programmed.  No dev board goodness, but I think I'll be able to get them working.

digital_killer

I think the answers to Horace's question answered this, but I want to be double sure...

I want to get into the micro controllers, and have decided on the AVR. If I start out with the Adruino, could I later use the board as a AVR development platform. I.E. remove the boot loader, and use WinAVR and straight C or C++ and gcc to code? or would I have to get a new board?

Thanks!

mellis

You can indeed.  When it comes down to it, there's just an ATmega chip on the board, you can do whatever you want with it.

wjbite

#13
Apr 10, 2010, 04:09 am Last Edit: Apr 10, 2010, 04:48 am by wjbite Reason: 1
Well I have somewhat the same question, so I will try to wake up this sleeping thread :) Yikes - over three years old!
A am going to try to move from MicroChip PIC and MPLAB IDE to Arduino and the Arduino IDE.
I am using Ubuntu Linux version of the Arduino (0018) IDE, RBBB, BBB, and USB-BUB boards.
I have lots of experience with PICs and MPLAB. Mostly with assembly language.
I look at the manual and help for Arduino IDE help and I don't see an easy way to put assembly language in with the Arduino Ccode. I have some applications that I am sure will require the precise timing and speed of assembly language. I would like to write a mix of C and assembly and be able to call functions written in assembly from the C functions.
Is there an easy way to add that functionality to the Arduino IDE?
I would appreciate it if someone could point me to the information that I need to do this.

Thanks,
Walt Bankes

westfw

For small amounts of code with timing-critical/etc issues, you can use inline assembler within gcc:

http://www.cs.mun.ca/~paul/cs4723/material/atmel/avr-libc-user-manual-1.6.5/inline_asm.html

Example:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1257722764

There is currently no way to include "pure assembler" files within an Arduino sketch.

Arduino is not a particularly nice environment for writing assembler code (the gcc inline assembler does not match the Atmel assembler, and there is no debugger or simulator.)


Go Up