2n2222 Inverter circuit

I’ve got USB MIDI chip, TTL compatible, which connects to USART pins on Arduino. Sending MIDI data from Arduino to that chip (which in turns sends received data to PC via USB) works without any additionalo circutry. However, MIDI Out on that MIDI chip is marked as active high, while AVR USART pins are active low, therefore, in order to send data to Arduino via that chip, I need some kind of inverter. Official documentation for that chip recommends 7400 NAND gates. I’ve tried that and it works without any issues. However, given that 7400 is a 16-pin DIP with 4 NAND gates, most of that chip is left unused, so I figured I could use 2N2222 transistor as inverter circuit. Since I know virtually nothing about transistors, I have no idea how am I supposed to connect. it. I found this circuit somewhere on internet, however that didn’t work (RX LED on Arduino isn’t flashing at all). I’m guessing I should change the resistor values to something else, any advice?

That should work just fine, I've used the same myself. Check the pinout of the transistor, pins may be swapped.

Yes it should but...

I now wonder if you connected it up properly...

What, like connecting two inputs on a NAND gate together and using the output as the inverted signal? http://www.ti.com/lit/ds/symlink/cd4093b.pdf

Or just using an inverter? http://www.ti.com/lit/ds/symlink/cd40106b.pdf

Am I missing something?

Both available in DIP at digikey for 52 cents.

I connected the AVR RX pin to wrong place, ugh. Working now! With NAND solution I simply connected one input of gate to +5V, and the other was TX pin from MIDI chip. USART RX pin was connected to NAND gate output.

kustom: I need some kind of inverter. .... I found this circuit somewhere on internet, however that didn't work (RX LED on Arduino isn't flashing at all).

It should work.

User error - gets you every time!