Reputation: 21
I want to write MIPS
assembly codes. Does atmel avr microcontrollers support MIPS (just like PIC microcontrollers) or do I have to use avr assembly anyway.
Upvotes: 1
Views: 1637
Reputation: 2820
the answer is no you can't write MIPS assembly codes for avr microcontroller because assembly language is tightly coupled to cpu architecture ... and avr not based on MIPS architecture
if you like to write your code in assembly .. you have to learn the cpu instruction sets provided by the cpu manufacturers for each cpu families you target ! ... so as you said you have to learn avr assembly
if you target avr families
the first 6 chapters of this book: the avr microcontroller and embedded systems using assembly and c by mazidi
avr freaks websit will help you
AVR Assembly playlist on youtube
if you like to write the code only once and run it for different cpu with little modification just use C /or C++ languages instead of assembly
Upvotes: 1
Reputation: 22308
You seem to be a bit confused about microcontrollers and architectures. I think it would be better to give you some good starting points:
The Atmel AVR site. Documentation, errata, specifications, examples, etc. You could cut your teeth of AVR-8 (8 bit), or AVR-32 (a better choice if you are familiar with MIPS, etc.)
There are plenty of toolchains, etc., available from the site. However, you can cross-compile GCC for AVR, provided you've built the binutils for AVR.
You need a C library, somewhat less functional than a hosted C library, but which builds with multiple targets depending on which 8-bit AVR architecture you're using.
Finally, you need to be able to flash a microcontroller with your program. e.g., avrdude.
I have up-to-date build instructions for a (Unix/BSD) AVR development environment if you want to save some trial and error on this path.
--
There's your software done. So far, all of this is free. Now you need a programmer for the transfer, from DIY in-serial programmers to sophisticated STK programmers. I don't have as much experience with AVR-32, so if you need something comparable to MIPS, maybe that's a better choice. All the same, creating little AVR-8 devices taught me a lot, and demystified a lot of embedded development for me.
Furthermore AVR is licensed to product a range of ARM micros. Perhaps a better choice than MIPS unless you're stuck with it.
BTW, PIC is terrible from a developer's point of view.
Upvotes: 5
Reputation: 111
PIC32 is a Microcontroller family that uses MIPS as a CPU core. However Attiny ATmega and ATxmega uses AVR as a CPU core. AVR and MIPS are different Instruction set architecture therefore you cannot use the same instructions
Upvotes: 3
Reputation: 235
MIPS assembly language is specific to the MIPS architecture. To the best of my knowledge, Atmel AVR devices do not directly support the MIPS instruction set. I would recommend learning the instruction set for the AVR specifically, if you're planning on working with AVR's.
If you're more concerned with programming MIPS assembly and less concerned about physical hardware, then I would look at a Virtual MIPS environment. I took a course focused around MIPS assembly, and we used a java-based emulator called MARS:
http://courses.missouristate.edu/kenvollmar/mars/
If you're looking for programmable MIPS hardware, I'm not sure what's available.
I hope this helps.
Upvotes: 3
Reputation: 39
Basic families AVRs are generally classified into six broad groups: tinyAVR — the ATtiny series 0.5–16 kB program memory 6–32-pin package Limited peripheral set megaAVR — the ATmega series 4–512 kB program memory 28–100-pin package Extended instruction set (Multiply instructions and instructions for handling larger program memories) Extensive peripheral set XMEGA — the ATxmega series 16–384 kB program memory 44–64–100-pin package (A4, A3, A1) Extended performance features, such as DMA, "Event System", and cryptography support. Extensive peripheral set with DACs Application-specific AVR megaAVRs with special features not found on the other members of the AVR family, such as LCD controller, USB controller, advanced PWM, CAN, etc. FPSLIC (AVR with FPGA) FPGA 5K to 40K gates SRAM for the AVR program code, unlike all other AVRs AVR core can run at up to 50 MHz [5] 32-bit AVRs Main article: AVR32
Upvotes: 3