Interfacing Arduino Micro with another digital device

I have an Arduino Micro, and an RN-52 Bluetooth Audio module that I want to control from the Arduino.

The RN-52 is a 3.3V device, and can be controlled over a UART Interface when pin GPIO9 is pulled low.

It also has an 'event' signal on GPIO2. GPIO2 floats high (3.3V) and goes low for 100 ms when an event happens. At this point I'm supposed to enter terminal mode by pulling GPIO9 low, waiting for 'CMD', entering 'Q\r', and parsing the result. I think I know how I can do that with the Micro.

With that background, what would be the best way of working with GPIO2? Should I connect it to a digital pin and use an ISR? Or is the polling of the main loop fast enough that just doing a digital read would work?

Also, since the RN-52 is 3.3V and the Micro is 5V, can I use digital inputs at all, or should I be reading an analog line? I think digital state change means 3.0V -> 0, but I just want to be sure.

Thanks in advance for any help or advice.

If you've got 100ms on that signal I would think you could catch it with normal polling in the loop. That's a pretty long time in microcontroller terms unless you have a bunch of other code that is blocking.

The 3.3V thing is tough. I've used 3.3V SPI devices like an SD card before and just used a pair of resistors to make a voltage divider to take the 5V down to 3.3. It's not perfect, but it works in the hackiest sense of the term. The Arduino would read a 3.3V signal as high, so you can pretty much rely on the Arduino being able to recieve that over a normal digital pin.

If this is the main function of this particular Arduino, there are 3.3V flavors of the board. I don't remember exactly which ones, but someone else can surely add that.

I've already got a component from Sparkfun called a 'Bi-directional Logic Level Converter' to handle the connection for the UART. It's supposed to convert the 5V to 3.3 and vice-versa, depending on the direction.

I'll try the polling route; it does seem simpler than creating an ISR, even though I've done it before.

If I use another digital pin, set it to output, and connect it to GPIO9, I guess I need a voltage divider to make its HIGH 3.3, otherwise I'll be putting 5 V into the 3.3V pin and I would fry the Arduino? Is that right?

idelaney:
If I use another digital pin, set it to output, and connect it to GPIO9, I guess I need a voltage divider to make its HIGH 3.3, otherwise I’ll be putting 5 V into the 3.3V pin and I would fry the Arduino? Is that right?

That sounds right. I don’t know if you’d fry the arduino or the other component that is expecting 3.3V, but something is liable to smoke.