broadening my scope
tobdec
Posts: 267
What do you guys think of the ATmega168 as a next step from the bs2? Not that theres nething wrong with my bs2 I just want to learn different languages and mcu's for a better understanding of it all.
Comments
Atmel offers their free coding tools, and there's the gcc toolchain, of course. There are some people that use the Arduino IDE (which extends gcc), but code in straight C. The IDE will create the hex files, which you then download via a programmer. For programmers there are a bunch in the $20 or $30 range. I have one from Pololu that's not bad.
It can be, er, um, a learning experience setting all this up. After doing it you get to appreciating the ease of getting started with something like the BS2.
-- Gordon
The Propeller is a great chip for robots. I'm often frustrated reading Robot, Servo or Nuts & Nuts articles as the author struggles with keeping jitters out of their servos or they have some other timing problem that could have been easily solved with a Propeller.
I confess, I also plan to learn to use AVR's chips.
@Leon, Is "AVR Dragon" really needed for occasional programming? I'm willing to pay for programming tools if needed but I'd prefer free software if it's good enough.
Duane
http://forums.parallax.com/showthread.php?113091-ULTIMATE-List-of-Propeller-Languages&highlight=ultimate
You can learn one language and move on to 174 others.
I haven't used Catalina (for propeller programming) as I program the propeller only in assembler: the REAL only language that provides an alternative to a penitential robe ;-) . BTW, the propeller offers many advantages over an ATMega but they are really different beasts!
The AVR Dragon is an useful programming/debugging board, at some point you may need such capabilities.
Mind you with a Prop on the bench and the simplicity of programming in Spin/PASM with the Prop Tool or BST or PZST IDE's you may forget all about moving to C.
As for the AVRs I would get the biggest ones you can find and use the free avr-gcc C compiler. I have had good luck using a simple home made programming circuit and the free PonyProg download software.
You can even make a USB avr programmer out of a few resistors connected to a small avr and the avr-usb software.
I suggest using them both. Sometimes they work well together as
well as separately. You might get more bang from the very similar
328p though...more flash.
I'd use WinAVR/GCC for the atmegas and Catalina for the Prop.
That way you will be learning C for both chips :-)
There are some very inexpensive USB programmers for the Atmel
chips available on ebay. We are talking 7-15 USD delivered.
I like combining the ATmega1284p and the Prop.
The 1284p has 128K of flash, 16K ram 4K eprom.
And runs at 20MIPS at 5v down to 4MIPS at 1.8v
costs 5.00 USD ea
And yeah ATmega1284p is a good choice as well for a uC. Comes in a Dip40 package so it's hobbyist friendly.
the particular uC you are working with. It is not an absolute must
though. Much good work can be done without low-level knowledge
of the uC. However, if you need to work near the limits of the uC a
working knowledge of asm can make the difference. C is very very
good but once in a while you must use asm to squeeze out that
last bit of goodness. I use C for probably 95%+ of my coding and
asm for the interrupt code that needs to do its job very quickly.
Once you know one flavor of asm then the skills quickly transfer
to any other uC. I learned asm on the 8 bit PIC uC. When I moved
to the Atmel chips it only took a few days to pick up that dialect
of asm. Asm on the Prop is really fun! there is a lot of power in each
32bit instruction...it's so versatile that you have to pay close attention
or you overlook ways to optimize your code.
For a beginner I have come to the conclusion that the best way to instruct
is to have a primer that starts from the very elementary steps of binary
math and logic and proceeds by giving simple and very detailed examples
of code and hardware using both C and asm to do the exact same tasks.
Learning C and asm side-by-side just makes sense to me. And if you already
know C or asm then the side-by-side examples make learning the other
language much easier.
The Prop1 and 2 could benefit from a primer that had examples of C, SPIN and
PASM for every exercise. For these uC's you really need a knowledge of all
three languages to do the best work possible.