# TX and RX pins refuse to work

**URL:** <https://community.particle.io/t/tx-and-rx-pins-refuse-to-work/5798>\
**Category:** Troubleshooting\
**Created:** [July 17, 2014, 10:54pm UTC](https://community.particle.io/t/tx-and-rx-pins-refuse-to-work/5798 "2014-07-17T22:54:21Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![daflippymaster](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@daflippymaster](https://community.particle.io/u/daflippymaster)\
**Post date:** [July 17, 2014, 10:54pm UTC](https://community.particle.io/t/tx-and-rx-pins-refuse-to-work/5798/1 "2014-07-17T22:54:22Z")

</div>

Serial communication via usb works like a charm, however, using TX and RX pins (and Serial1 commands + Serial1.begin(9600) ) produces no results

Simple “hello world” programs don’t seem to work at all, even hooked up to an oscilloscope no change on the pins can be seen

any other troubleshooting suggestions I should try?

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [July 18, 2014, 12:20am UTC](https://community.particle.io/t/tx-and-rx-pins-refuse-to-work/5798/2 "2014-07-18T00:20:38Z")

</div>

Serial1 is to communicate with other devices via the TX and RX pins on the core.

You will need something like (similar to Arduino)

```auto
if (Serial1.available ())
    Serial.print (Serial1.read ());

```

---

<div class="post-metadata">

**Author:** ![daflippymaster](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@daflippymaster](https://community.particle.io/u/daflippymaster)\
**Post date:** [July 18, 2014, 12:30am UTC](https://community.particle.io/t/tx-and-rx-pins-refuse-to-work/5798/3 "2014-07-18T00:30:27Z")

</div>

That’s what i was originally attempting to do, however I scaled back when things weren’t working

Shouldn’t there still be some change on the TX pin when Serial1.write() is used?

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [July 18, 2014, 12:34am UTC](https://community.particle.io/t/tx-and-rx-pins-refuse-to-work/5798/4 "2014-07-18T00:34:08Z")

</div>

oh yeah it should…

If you share your code we can take a look 😉

---

<div class="post-metadata">

**Author:** ![daflippymaster](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@daflippymaster](https://community.particle.io/u/daflippymaster)\
**Post date:** [July 18, 2014, 12:39am UTC](https://community.particle.io/t/tx-and-rx-pins-refuse-to-work/5798/5 "2014-07-18T00:39:28Z")

</div>

ok that’s what I figured haha

```
int i=0;

void setup() 
{
Serial.begin(9600);
Serial1.begin(9600);
}

void loop() 
{
Serial.println("working");
Serial1.write(i);
i++;
delay(1000);
}
```

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [July 18, 2014, 12:40am UTC](https://community.particle.io/t/tx-and-rx-pins-refuse-to-work/5798/6 "2014-07-18T00:40:49Z")

</div>

Hmm, my scope and DMM is not with me now. Will test and get back to you.

Or someone else in the community can help see if the tx rx is communicate ok 😃

---

<div class="post-metadata">

**Author:** ![daflippymaster](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@daflippymaster](https://community.particle.io/u/daflippymaster)\
**Post date:** [July 18, 2014, 12:45am UTC](https://community.particle.io/t/tx-and-rx-pins-refuse-to-work/5798/7 "2014-07-18T00:45:37Z")

</div>

That’s alright, I won’t have access to the spark until tomorrow morning, so I won’t be able to confirm anything just yet.

---

<div class="post-metadata">

**Author:** ![vk2tds](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/vk2tds/32/20832_2.png) [@vk2tds](https://community.particle.io/u/vk2tds)\
**Post date:** [July 18, 2014, 1:59am UTC](https://community.particle.io/t/tx-and-rx-pins-refuse-to-work/5798/8 "2014-07-18T01:59:25Z")

</div>

I have tended to receive on the Spark physical serial port, but I have had few issues. Obviously when I forgot to use a Serial1.begin(9600) things would not work, but once that is fixed, things work. The other issue I have had is code like if Serial.available() {Serial1.read()}

Don’t forget that the Rx and Tx lines are 3.3V and are from memory not 5V tolerant. They are certainly not RS232 level, but I am sure you knew that anyway.

Darryl

---

<div class="post-metadata">

**Author:** ![daflippymaster](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@daflippymaster](https://community.particle.io/u/daflippymaster)\
**Post date:** [July 18, 2014, 2:13am UTC](https://community.particle.io/t/tx-and-rx-pins-refuse-to-work/5798/9 "2014-07-18T02:13:51Z")

</div>

yep, didn’t forget the Serial1.begin(9600)

I’m using a LT10801CN RS-232 transceiver to bring things to the spark’s level  
However it seem the issues i’m having reside in the spark

---

<div class="post-metadata">

**Author:** ![peekay123](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/peekay123/32/810_2.png) [@peekay123](https://community.particle.io/u/peekay123)\
**Post date:** [July 18, 2014, 3:05am UTC](https://community.particle.io/t/tx-and-rx-pins-refuse-to-work/5798/10 "2014-07-18T03:05:07Z")

</div>

@daflippymaster, just a note that Serial1.write() takes a uint8\_t argument (char) and I am not sure what passing an int will do. 😄

---

<div class="post-metadata">

**Author:** ![Hootie81](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/hootie81/32/2879_2.png) [@Hootie81](https://community.particle.io/u/Hootie81)\
**Post date:** [July 18, 2014, 11:56am UTC](https://community.particle.io/t/tx-and-rx-pins-refuse-to-work/5798/11 "2014-07-18T11:56:44Z")

</div>

here is a very simple little program that acts as a serial pass-thru for testing, i used it to talk to a adafruit fingerprint reader, so its tested and works fine with the PC app.

```
void setup()  
{
  Serial.begin(57600);
  Serial1.begin(57600);
}

void loop() // runs over and over
{
  while (Serial1.available())
    Serial.write(Serial1.read());
  while (Serial.available())
    Serial1.write(Serial.read());
}
```

---

<div class="post-metadata">

**Author:** ![daflippymaster](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@daflippymaster](https://community.particle.io/u/daflippymaster)\
**Post date:** [July 18, 2014, 2:09pm UTC](https://community.particle.io/t/tx-and-rx-pins-refuse-to-work/5798/12 "2014-07-18T14:09:13Z")

</div>

@peekay123, Thank you, i’ll have to remember that for future use, however it doesn’t seem to make much of a difference whether .print() or .write() is used (in terms of the TX pin functioning)

@Hootie81, Just gave your code a shot and, unfortunately, there’s still no change -\_\_\_\_-

Could it be bad pin connections on the spark board? or does this seem to be more software related?

---

<div class="post-metadata">

**Author:** ![peekay123](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/peekay123/32/810_2.png) [@peekay123](https://community.particle.io/u/peekay123)\
**Post date:** [July 18, 2014, 2:13pm UTC](https://community.particle.io/t/tx-and-rx-pins-refuse-to-work/5798/13 "2014-07-18T14:13:38Z")

</div>

@daflippymaster, have you tested with the LT10801CN completely disconnected from the core? Is the core on a breadboard?

---

<div class="post-metadata">

**Author:** ![daflippymaster](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@daflippymaster](https://community.particle.io/u/daflippymaster)\
**Post date:** [July 18, 2014, 2:14pm UTC](https://community.particle.io/t/tx-and-rx-pins-refuse-to-work/5798/14 "2014-07-18T14:14:43Z")

</div>

Yep, i’ve taken the core off the breadboard so that it’s only attached via usb so we’ve ruled out the board as the issue

---

<div class="post-metadata">

**Author:** ![peekay123](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/peekay123/32/810_2.png) [@peekay123](https://community.particle.io/u/peekay123)\
**Post date:** [July 18, 2014, 2:22pm UTC](https://community.particle.io/t/tx-and-rx-pins-refuse-to-work/5798/15 "2014-07-18T14:22:48Z")

</div>

@daflippymaster, reading the spec sheets on the LT10801CN shows that it is a 5V device which puts out 5V signals on the logic pins. The Rx and Tx lines of the Spark are not 5V tolerant. There is a possibility that the Rx/Tx pins were damaged.

---

<div class="post-metadata">

**Author:** ![BDub](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bdub/32/5137_2.png) [@BDub](https://community.particle.io/u/BDub)\
**Post date:** [July 18, 2014, 2:24pm UTC](https://community.particle.io/t/tx-and-rx-pins-refuse-to-work/5798/16 "2014-07-18T14:24:22Z")

</div>

> [@daflippymaster](#):
>
> even hooked up to an oscilloscope no change on the pins can be seen

It's dead hardware... perhaps a blown I/O pin, or bad solder connection.

Look at pin 12 and 13 of the STM32 micro and see if they are soldered well.

---

<div class="post-metadata">

**Author:** ![daflippymaster](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@daflippymaster](https://community.particle.io/u/daflippymaster)\
**Post date:** [July 18, 2014, 2:37pm UTC](https://community.particle.io/t/tx-and-rx-pins-refuse-to-work/5798/17 "2014-07-18T14:37:01Z")

</div>

The solder connections look to be alright. I’m worried that @peekay123 might be correct.

---

<div class="post-metadata">

**Author:** ![Hootie81](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/hootie81/32/2879_2.png) [@Hootie81](https://community.particle.io/u/Hootie81)\
**Post date:** [July 18, 2014, 2:49pm UTC](https://community.particle.io/t/tx-and-rx-pins-refuse-to-work/5798/18 "2014-07-18T14:49:29Z")

</div>

But would the TX pin get damaged? it shouldnt have 5v applied to it… unless you swapped the tx and rx round during testing?

Have a look at this post and see if it will help you out if you have damaged the pins

---

<div class="post-metadata">

**Author:** ![daflippymaster](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@daflippymaster](https://community.particle.io/u/daflippymaster)\
**Post date:** [July 18, 2014, 2:55pm UTC](https://community.particle.io/t/tx-and-rx-pins-refuse-to-work/5798/19 "2014-07-18T14:55:09Z")

</div>

I’m fairly certain that the pins were never swapped

sorry, which post @Hootie81?

---

<div class="post-metadata">

**Author:** ![Hootie81](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/hootie81/32/2879_2.png) [@Hootie81](https://community.particle.io/u/Hootie81)\
**Post date:** [July 18, 2014, 3:06pm UTC](https://community.particle.io/t/tx-and-rx-pins-refuse-to-work/5798/20 "2014-07-18T15:06:07Z")

</div>

> **[How to implement a 2nd TX/RX Port? BUGFIX?](https://community.particle.io/t/how-to-implement-a-2nd-tx-rx-port-bugfix/1358/15)**
>
> There is no need for soft serial or external chip to get another serial port. The STM32 medium density has five USARTs/UARTs on chip - the core’s TX and RX pins are connected to USART2 via PA2 and PA3. The only other usable one is USART1 with its...

[Next page](https://community.particle.io/t/tx-and-rx-pins-refuse-to-work/5798.md?page=2)
