Will an Arduino UNO be able handle this? - Page 1
Forum section: electronics / general

author: Fantasma25
author_rank: Regular Contributor
timestamp: May 13, 2015, 04:43:56 pm
content: Hello! I'm working on a MIDI Sequencer project with an Arduino. I'm using the following modules.- Arduino UNO.- Adafruit VS1053 Audio Module (it handles all the midi samples and stuff).- Nokia 5110 Monochromatic display with SPI comm (to show the menus).- 2 Rotary encoders with push button and RGB LEDs.- Adafruit Trellis I2C Button padMy question is do you think the arduino will be able to handle it? What it needs to do is to navigate through menus while playing a sequence, change the tempo of the sequence and all that stuff. The buttonpad works as an I2C slave and it doesn't have the ability to interrupt the MCU, so I have to poll its status all the time. Also, I only have 2 interrupt pins on the UNO, so I'll also have to poll the status of the rotary encoders. What do you think? Should I scale up to a bigger MCU? I know you'll probably say that it can be done with an efficient assembly code, but I don't really want to mess with assembly since it will get very complicated very fast, and it will be very hard to maintain...

author: PaulAm
author_rank: Frequent Contributor
timestamp: May 13, 2015, 05:09:22 pm
content: Can you shoehorn all of that into 32K of flash? If you use libraries, they will also take up space and you can use up your available space quickly. Maybe you can fit it in, maybe you can't. I have no idea what your code looks like. If you're doing development, I'd start with a larger processor (mega2560) just to make your life easier.

author: igendel
author_rank: Frequent Contributor
timestamp: May 13, 2015, 05:23:52 pm
content: As PaulAm noted, the code size may be an issue here if you use standard libraries.Except for the MIDI stuff (which I'm not really familiar with), your input and output work at human time scales, so you can probably space apart the polling, display commands etc.a lot.The ATmega328 on the Arduino Uno can handle port interrupts, which fire when any pin in a specific port changes - it's up to you to write the code that will tell you which pin it was. With this you can handle the encoders, but you'll have to dig into the datasheet for that...

author: Fantasma25
author_rank: Regular Contributor
timestamp: May 13, 2015, 05:30:37 pm
content: Quote from: PaulAm on May 13, 2015, 05:09:22 pmJust the Nokia 5110 Library uses 57% of the program space :s (without any custom graphics, although they can be added on a separate memory, but that's more work...). So far I only have a rough code of the sequencer, but I'm about to start designing a PCB for it.Quote from: igendel on May 13, 2015, 05:23:52 pmMIDI is just serial at a weird baud rate, but I would have to use software serial because it becomes problematic to program when you have stuff connected to the HW serial pins (0 and 1)...What do you think about the launchpads from TI?

author: glynd
author_rank: Newbie
timestamp: May 13, 2015, 05:42:28 pm
content: If you are happy with the Arduino, just jump up to the Mega with 256k of flash.It's really hard to beat the Arduino dev tools for actually getting something done!

author: igendel
author_rank: Frequent Contributor
timestamp: May 13, 2015, 05:42:44 pm
content: Quote from: Fantasma25 on May 13, 2015, 05:30:37 pmHmmm, yes, that's the price of libraries straight off the interwebsQuote from: Fantasma25 on May 13, 2015, 05:30:37 pmWatch out, the Arduino's default SoftwareSerial is very limited. Wouldn't trust it above 19200 BAUD, probably even less. See here:http://www.idogendel.com/en/archives/374There's quite a range of launchpads, from the MSP430G2 which are weaker than the Uno to the newest MSP432 beasts. I guess the higher-end ones can handle the job easily, but programming and finding resources for them is less trivial than for Arduino. You can ask at 43oh.com .

author: Fantasma25
author_rank: Regular Contributor
timestamp: May 13, 2015, 05:57:46 pm
content: Quote from: igendel on May 13, 2015, 05:42:44 pmHehe yeah, the good thing is that it already has functions for drawing lines, circles and charactersQuote from: igendel on May 13, 2015, 05:42:44 pmYeah, I think MIDI baud rate is about 31,250 baudI have played with a Hercules Launchpad before and I really liked it... It was not as easy to program as the arduino, since the compiler I had was for C (although I don't know if there's a C++ compiler), but it came with a program called HalCoGen, where you could set up graphically everything hardware-wise (like the IO pins and so on) so that made it easier...

author: Roeland_R
author_rank: Regular Contributor
timestamp: May 14, 2015, 11:26:50 am
content: You could also use 2 arduno's. One for display handling if memory is the problem. Another possibility is programming it in assembler using atmel studio. Programs are much smaller, writing your own drivers however is a lot of work. I recently made my first spi program in assemler for the uno. Now i will start driving several displays with it. A lot of programming, but nice to do.

author: senso
author_rank: Frequent Contributor
timestamp: May 14, 2015, 11:59:29 am
content: That is one hell of a bloated lib!