Compatibility between Arduino Uno and ATmega 1284 chip

Go To Last Post
14 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I wanted to buy a 32x32 dot matrix from adafruit for a school project; however, their libraries only work on the Arduino Uno and Mega. But, I only have access to an ATmega 1284 chip.

So, my question is why wont their libraries just work if the Arduino Uno  runs on the same RISC Architecture as the atmega 1284, and they both can run C code. 
I looked at could not find any answers to this question. My assumption is that the pins are simply located in different positions so I can change that accordingly.

Any information would be greatly appreciated!
Sorry if I made any mistakes in my question, it is my first time posting and have only been working with micro controllers for around six weeks.

Edit:

Nevermind I figured out. Arduino has its own enviornment on top of atmega chips.

This topic has a solution.
Last Edited: Wed. May 17, 2017 - 07:09 AM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Microchip should adapt all their AVR chips to the Arduino IDE, and a good number of their PIC chips too. 

 

In the 20th century, people learned how program the peripherals on the CPU core, and this skillset was based on the CPU core.  You had to learn an entire new set of interfacing parameters for every new CPU that you worked with.  Consequently, many people simply learned the CPU that their company was currently using.  There would be your Z80 guys, your 6502 guys, your Intel guys, etc...

But in the new era, you learn how to integrate your design application ideas to a standardized set of virtual peripherals, like the Wire.h library for I2C and the Serial.h library for , uh,  serial stuff.  If you're lucky, the chip manufacturer will provide a way to integrate your standard Arduino libraries to their new CPU chip design.   CPU makers have come to understand that having a standardized language [C++] for all CPUs is more important than the capacities and inner workings of the new CPU design.  That's the reason that you don't have to learn a new programming language with each new CPU design, as you used to have to do when most programming was done in assembler.  The Arduino system extends this concept to the on-chip peripherals, and simple quasi-standardized programming constructs.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Wow thank you for the in-depth response!
It was so much more than what I was expecting!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bob,

 

Welcome to the Forum.

 

It 's good to hear you are taking a micro class in school.

 

If you wish to purchase some inexpensive Arduino boards have a look at the Banggood Electronics site.

Their high quality knock-offs are incredibly cheap, especially if they are on sale.

 

For example, an Arduino Nano costs $3.29, or 3 for $8.55.
while an Arduino Uno Revision3 costs $4.29 USD.

 

I can't come close to building them for that price!

 

Good luck with your project.

 

Fill your location in under your "Profile".

 

JC

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Simonetta wrote:
Microchip should adapt all their AVR chips to the Arduino IDE, and a good number of their PIC chips too.

Strictly, it's Arduino that would be adapted - not the chips.

 

But why stop at AVR and PIC ?

 

What about the 8051s ?

 

And, of course, the ARMs - all the Cortex-M, at least.

(for Cortex-A, Linux would be the way to go).

 

Yes, Microchip do/did have an Arduino-alike for some of their PICs, and there are a couple of Cortex-M-based Arduino ports 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you JC, it seems like a plesant place so far.
And yeah It is an intro to embedded systems class, it is one of my favorite this quarter.
Thanks for the heads up. Ill check out that webisite for parts.

Last Edited: Wed. May 17, 2017 - 07:14 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just stumbled upon that recently as well Kartman. But I just realized that I think it would be cheating to use those libraries. I think my professor wants us to use state machines and build everything up ourselves. So I will probably drop down to an 8x8 matrix instead and do the coding myself for the matrix functions

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bob_saget wrote:
I think my professor wants ...

Rather than guessing, why not actually ask him ?!

 

It is always wise to clarify requirements before proceeding!

 

It may gain you points for having taken some initiative and thought about options ...

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bob_saget wrote:
I just stumbled upon that recently as well Kartman. But I just realized that I think it would be cheating to use those libraries. I think my professor wants us to use state machines and build everything up ourselves. So I will probably drop down to an 8x8 matrix instead and do the coding myself for the matrix functions

 

Yes, you have many options, even for how to drive the LED matrix. Should you use a Darlington array like the ULN2803, a high power shift register like the STPIC6D595, or a specialized chip like the MAX7219 (or the Chinese ones from Titan Micro or Holtek)?

 

Each will have different wiring and programming requirements. I think you need to decide this first, maybe ask you prof for advice (my opinion: for learning purposes, I'd go with the shift register).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"  But I just realized that I think it would be cheating to use those libraries. "

 

Well, if you clearly state you used an existing  library (and perhaps comment it/ simplify it), your teacher might think :

 

(a) you do not reinvent a rolling, good quality wheel (just keepin parts of your unique, uncloned brain for more creative tasks)

 

(b) you understood other people's work (and code you did not write/you wrote 3(0)* monts ago might be difficult to understand, perhaps more difficult than writing ex nihilo)

 

(c) you are open to good ways of coding (if a beginners codes too much, he gets accustomed to his clumsy ways of writing : looking way other people code -with working solutions- does not harm in my opinion

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

dbrion0606 wrote:
your teacher might think

Again, don't guess what he might think - ask him!!

 

Remember: he is the one leading you on this journey - if you take side tracks, you may waste time and/or miss important points.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just asked him and I am allowed use the LED matrix and their libraries. 
Thanks for the advice everyone!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@awneil:

It depends the way one asks. If one thinks it would be kind of cheating and asks "May I cheat with arduino?", the answer will be "of course, no". OTOH, if one has some more positive ideas about arduino (not reinventing wheels, reading working source and trying to understand it), the answer is less predictable (but it can be a blunder if one's teacher does not know ... what arduini are; a French electronic teacher did not know, though arduini are sold in every electonic parts store I know and journals about arduino can be found in every railway station; the weirdest was he wanted to learn C++ -and Arduino has a simplified C++ ....).