Spark is 3v3. (Many) Arduinos are 5v. To get them communicating via Serial, I’m assuming I need a logic level converter, correct? I’d like to communicate back and forth between a Spark Core (Serial1) and Arduino Mega (Serial 1/2/3/4) so I can issue commands and process responses.
wgbartley, I believe the Spark digital pins (except for D0 and D1) can tolerate 5V so no need for any level shifters.
I also realize that I’m semi-responding to my own question with documentation references. My question is more regarding the logic level converter and talking to the Arduino over Serial1.
Can’t find the exact docs on which Digital pins are 5v tolerant but @zach did mentioned here:
But TX & RX is mentioned here…
So looking at: http://docs.spark.io/#/shields/shield-shield,
It uses a
TXB0108PWR as the logic converter. I think others like:
works well too
If you want to test stuff out 1st, you can use a simple voltage divider
Dang, these little things SO need documenting!
When looking at the STM32 datasheet (p. 28ff) the pins that have FT in the column “I/O Level (2)” are 5V tolerant - hence FT (Five volt Tolerant).
As for the Cores RX/TX pins (PA2, PA3 for USART2) - they are lacking this FT, so I’d assume level shifting is required for RX (5V comming from Arduino into Core - easiest with voltage devider as @kennethlimcp suggested) but not necessarily for TX (Core to Arduino) since any voltage > 2,6V should be recognized as HIGH by the Arduino - aslong you can assure, that the Arduino pin used as RX (connected to the Core’s TX) will never be driven HIGH!
USART3 (PB10, PB11) on the other hand would be FT, but are not available as pins on the Core - maybe this might be worth a thought on future Core revisions.
As as summary for the current Core:
NOT 5V tolerant: