I'm using an Uno to talk to an NXP/Freescale KW40Z (CortexM4) via the Arduino's software serial and a NXP UART.
The Uno runs at 5V and the NXP at 3.3V but communication is just fine at 9600 baud.
However, I also signal the Arduino from the NXP by pulling a pin low and using INT1FALLING on the UNO.
Here's what happens:
If I connect a single wire between the NXP output and the Arduino input, I see the ISR called 5-10 times in rapid succession for ONE falling edge (according to my scope, the NXP edge is clean).
I assumed this was due to the UNO running at 5V, and the output level of the NXP is at 3.14V.
So I switched to an Arduino NANO, which is a 3.3V device, and I still see a huge number of ISR calls.
However, I put a TI level shifter in between the digital IO pins and everything works fine.
I have a suspicion I'm missing something obvious, but I didn't think I needed any external passive components when connecting digital inputs & outputs.
And why does this fail but the software serial seems to work just fine?
Thoughts?
Thanks
PJ
Given your statement "I didn't think I needed any external passive components when connecting digital inputs & outputs." One takes pause to contemplate "Why would you think 'they' make Bi-directional Logic Level Shifters????
First hint: 3.3V ARM & 5V Arduino w/o level shifter. result= BANANAS
3.3V ARN & 5V Arduino with level shifter. result= good comm.
123Splat:
Given your statement "I didn't think I needed any external passive components when connecting digital inputs & outputs." One takes pause to contemplate "Why would you think 'they' make Bi-directional Logic Level Shifters????
First hint: 3.3V ARM & 5V Arduino w/o level shifter. result= BANANAS
3.3V ARN & 5V Arduino with level shifter. result= good comm.
If you read the electrical specifications for the Atmega 328P, logic HIGH on GPIO inputs is 0.6 x Vcc, which is 0.6 x 5V = 3.0V so driving a logic level 3.14~3.26V from the ARM should be OK according to their own spec.
I didn't think I needed a level shifter based on Atmel's spec, so why would they spec that? Do you actually understand this or are you just being snarky?
(From this discussion: 5v - 3.3v input to Arduino digital pin - Electrical Engineering Stack Exchange )
123Splat:
Given your statement "I didn't think I needed any external passive components when connecting digital inputs & outputs." One takes pause to contemplate "Why would you think 'they' make Bi-directional Logic Level Shifters????
First hint: 3.3V ARM & 5V Arduino w/o level shifter. result= BANANAS
3.3V ARN & 5V Arduino with level shifter. result= good comm.
Also, as I stated in the text, I also used a Nano which is 3.3V signaling and still had the same problem.
Specifications:
Microcontroller Atmel ATmega168 or ATmega328
Operating Voltage (logic level) 5 V
https://www.arduino.cc/en/Main/ArduinoBoardNano