Leonardo + MIDI + Interrupts

Hey guys,

I am currently working on a piece of code generating MIDI clock signal and I got into some trouble after uploading code to Leonardo. It worked flawlessly on Uno, but no luck with Leonardo. Even the MIDI example from the library doesn't work.

Link to the library:
https://github.com/FortySevenEffects/arduino_midi_library/tree/release/4.0

Could it be related to the new methods of dealing with serial communication? I don't see the TX/RX diodes blinking for example.

Also I've read somewhere that Arduino 1.0 doesn't support software interrupts? Is that true? I am using Timer1 library in my code for purposes of precise clock and this would ruin my project.

Thanks a lot for any help.

Read this http://arduino.cc/en/Main/ArduinoBoardLeonardo

Could it be related to the new methods of dealing with serial communication? I don’t see the TX/RX diodes blinking for example

I hope so this is your problem

Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data using the ATmega32U4 hardware serial capability. Note that on the Leonardo, the Serial class refers to USB (CDC) communication; for TTL serial on pins 0 and 1, use the Serial1 class.

mrkva:
Also I’ve read somewhere that Arduino 1.0 doesn’t support software interrupts?

Software interrupts? What are they?

Is that true?

No.

Sorry, I mean internal interrupts controlled by the timer overflow.
I found this information in few blog posts, e.g.

And what are the RX/TX leds representing now? Communication on Serial or Serial1?

That's a fairly old post (Jan 2012) and refers to IDE 1.0 not 1.0.1 which is the one that supports the Leonardo.

Judging by the schematic the Tx and Rx LEDs are on pins PD5 and PB0 so I suppose whether they turn on or not is under software control.

And what are the RX/TX leds representing now? Communication on Serial or Serial1?

EDIT:Follow nick reply

That's a fairly old post (Jan 2012) and refers to IDE 1.0 not 1.0.1 which is the one that supports the Leonardo.

Judging by the schematic the Tx and Rx LEDs are on pins PD5 and PB0 so I suppose whether they turn on or not is under software control.

Yes, Nick right

The RX and TX LEDs on the board will flash when data is being transmitted via the USB connection to the computer (but not for serial communication on pins 0 and 1).

One more question:
I am using LCD display using pins 4, 5, 6, 7, 8 and 9, and I'd also like to use one timer for triggering interrupts. What would be the best way to approach this?

Thank you

I'm not sure I understand the question. Timers don't have to affect pins if you don't want them to.