ATTiny13

I have a decent basic grasp of Arduino (Uno R3), did some small projects.

I would like to dig deeper now, learn assembler (I will be learning C/C++ : if your going to suggest C I am already starting) so I can explore more.

I do not want to use the ATTiny13 in the Arduino environment. I just want it to be a stand alone so I learn how the .ASM files, .O and so on are made, work, etc and also not to take the chance of screwing up my IDE. My choice.

Does anyone know of a “bundle” for the Tiny13 that has a dev board, USB cable (so can edit headers, .ASM in a text editor, etc) as a complete kit? So I can compile, see my intermediary files, play with memory / registers and so on. Also: basic beginners book.

Again: for learning purposes … so I can experiment and learn how registers work, MOV, POP, ORG and so on…

Thanks.

On second thought: might it be best to stick with the ATmega328P chips rather than start with a new one (Tiny13)? The Arduino IDE already has the .ASM compiler, etc... Would this be a better move to learn?

For the purposes of learning assembly it makes no difference. With the exception of a handful of instructions, all AVR processors are the same.

The differences are in the peripherals. An ATtiny13, for example, has no USART (no serial port).

I suggest you start with "inline assembly". The syntax is a pain but the path is less entombed in undergrowth.

Coding Badly: To keep life simple at this early stage, would it be better for me to just play with the ATmega328P chip since Arduino is already available for it? In other words will it be simpler for me to do assembler out of Arduino to that chip, than to set up Atmel developer studio (for use with the tiny13), etc?

CB has stated by far the simplest way to get started with AVR assembly. Learn the ~120 instructions once and you know all the processors, only the details change, the core (CPU) remains the same.

If you really want to take off the training wheels and you use a Windows machine, download the full AVRStudio and get to work. The next thing you will need will be some means of debugging your code since the simplest mistakes with assembly are next to impossible to to troubleshoot without real tools. Sometimes a serial port will suffice, other times an honest to goodness real debugger with break points and memory examination is what you need. An AVRDragon is probably the cheapest real Atmel product you could buy, there are some knock-off Chinese devices out there but I don’t know what works or doesn’t.

I would continue to use Uno clones or mini’s since they have ISP pins and they’re disposable. It would be a bit of a wall to hit trying both assembly and attinys at the same time, IMO. Stick with what you know/have and build on that.

SamBrownADK:
Coding Badly: To keep life simple at this early stage, would it be better for me to just play with the ATmega328P chip since Arduino is already available for it?

Yes.

In other words will it be simpler for me to do assembler out of Arduino to that chip, than to set up Atmel developer studio (for use with the tiny13), etc?

Yes.

Two examples to get you started…

Search for “asm volatile”.

You can also install this add-in to the IDE for the smaller 8 bit chips https://github.com/SpenceKonde/ATTinyCore

ATtinyCore Universal

This core supports the following processors - essentially every ATtiny processor that makes sense to use with Arduino. Click the processor name for part-specific information:

might it be best to stick with the ATmega328P chips rather than start with a new one (Tiny13)?

Yes. Very much so.

Consider getting one of the Atmel Xplained Mini Development boards, but includes a debug chip (rather like the Arduino Zero) (there’s one of the ATmega328p that is essentially arduino-like.)

I’d avoid the tiny13 entirely; it’s a very old chip, and isn’t that much cheaper than more modern replacements.
For example, and ATtiny814 has 8k of flash and a slew of peripherals, and is only $0.10 more than a tiny13 at digikey (q11)

I'm not arguing the case for ATtiny13, but there is a well done Arduino hardware package for it: https://github.com/MCUdude/MicroCore

Huh. How did I pick an example that isn't suppored by This other Arduino Core Package

Thank you everyone! I will stick with mucking around with the 328P... their very cheep. If I destroy one its not the end of the world..

It also keeps me learning one chip rather than two.. and having one IDE (Arduino and the command line tools like avrdude.exe and so on) ragther than an entirely new IDE (the Atmel studio).

Thanks for the advice!

When I am done, I will probably be the only woodsman around who also programs in asembler. LOL

To confuse you I would propose just opposite: ATTiny13(A) is a good chip available in DIP from eBay super cheap. It is small and cannot do much, have only few peripherals. You can program in assembler for it because you cannot expect some extra complexity anyway.

How I did learn to use assembler: Read disassebly of a simple program written in C and try to understand it. Simple means super simple, i.e. read ADC, do some math with it and turn on/off LED depending on result. Write something in assembler yourself (I use Atmel Studio). Try to understand how to add inline assembly to C.

Surely you are not the only one who will write in assembler. For simple tasks C often generates very stupid code.