Go Down

Topic: Truuble RX TX Arduino (Read 985 times) previous topic - next topic

Neodimio58

Hello!
I guess maybe I fired my Arduino because RX & TX always sent 5V  , don't matter if I upload a empity sketch ; Always sent 5v both pins-
My question is;
 It's normal this? I  think that TX&RX don't must sent 5v without declare pinmode outpout,
How I can test those pins?

Neodimio58

Hello!

I guess maybe I fired my Arduino because RX & TX  sent 5V  , don't matter if I upload a empity sketch ; Always sent 5v both pins-
My question is;
 Is it normal ? I  think that TX&RX don't must sent 5v without declare pinmode outpout,
How I can test those pins?


spycatcher2k

Quote
How I can test those pins?
set their pinmode to output and write them HIGH or LOW!
Mrs Drew
-=-
http://www.uk-pcb.co.uk - UK PCB Fab Company
I will design & code for you, but I will also charge you (PM me)
If you don't like my answers, realize : I'm not being cheeky, I'm Just trying to prompt you to use your own brain/google etc.

Neodimio58

Thanks a lotfor your help;

I ulpload next skecth;

<
const int ledPIN = 0;
 
void setup() {
  Serial.begin(9600);   
  pinMode(ledPIN , OUTPUT); 
}
 
void loop(){
  digitalWrite(ledPIN , HIGH);   
  delay(1000);                 
  digitalWrite(ledPIN , LOW);   
  delay(1000);                 
}>


However both pins don't  do the blink only turn on all time ; anothers pins works without problem

Delta_G

Dont forget that the pull-up resistor will make it show 5V and will even slightly light up the led sometimes. 
|| | ||| | || | ||  ~Woodstock

Please do not PM with technical questions or comments.  Keep Arduino stuff out on the boards where it belongs.

DrAzzy

That is correct functioning, those pins are supposed to be at 5v when you've done Serial.begin(), except while data is being sent (in which case that serial line will be rapidly transitioning between high and low) - an idle TTL serial line is held HIGH.

Serial.begin() enables the UART hardware, taking over the TX and RX pins. The RX pin is set as an input (maybe input pullup, I forget - this is done by the hardware, not the arduino library), while the TX pin is driven high. The RX pin will also be held high (at least on Arduino's with the serial port connected to an on-board serial adapter like the Uno/Nano/Mega, as opposed to Leo/Micro with native USB) because it is connected (through a series resistor) to the on-board serial adapter's TX pin, which, if it is functioning correctly, will also be held high.
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

Wawa

I guess maybe I fired my Arduino because RX & TX always sent 5V  , don't matter if I upload a empity sketch ; Always sent 5v both pins-

It's normal this?
Yes, that's normal.

Pin 0 and 1 are "TTL logic" pins, connected to the USB<>Serial chip. TTL is normally HIGH, and only flashes LOW during data transfer. Avoid using those pins, unless you know what you're doing.

Pin 13 also has a special use. It's connected to an onboard LED. It can change state during bootup.
Not ok if you connect e.g. a relay module to it.

Use the analogue pins if you run out of digital pins. They are just digital pins with the added functionality of analogue-in.
Leo..


Neodimio58

Thanks a lot! for your help guys;
Then those pins I can't use like digital outputs isn't?

PD:I wish apologize for my mistakes writting

Delta_G

Thanks a lot! for your help guys;
Then those pins I can't use like digital outputs isn't?

You can't if you have Serial.begin in your code.  Remove the Serial stuff and you can use them as normal digital IO.
|| | ||| | || | ||  ~Woodstock

Please do not PM with technical questions or comments.  Keep Arduino stuff out on the boards where it belongs.

Neodimio58

Hi! me again!
I erase   Serial.begin(9600); and my external led (conected to 220 ohms) works ! ; After upload blink example( I upload sketch without disconect extrenal led connected to pin 0) then can't be able to upload sketch; I disconnected Arduino and led, after I finally can upload it.
However before it happed , leds tx rx on board isn't turn on ; only the led external connected(with blink sketch posted before on pin 0 without Serial.begin),now when sketch executes  it happens; (led on board turn off , external led turn on) the same situation with pin !;
I'm scared to damage those pines .

PD I upload blink example again ,and and now when I connect external led on pin 0 turn on TX board led turn on too, before only external led turn on (was the reason for do this post )

Neodimio58

Hi! me again!
I erase   Serial.begin(9600); and my external led (conected to 220 ohms) works ! ; After upload blink example( I upload sketch without disconect extrenal led connected to pin 0) then can't be able to upload sketch; I disconnected Arduino and led, after I finally can upload it.
However before it happed , leds tx rx on board isn't turn on ; only the led external connected(with blink sketch posted before on pin 0 without Serial.begin),now when sketch executes  it happens; led on board turn off and external led turn on , the same situation with pin 1;
I'm scared to damage those pines .

PD;
I upload blink example again ,and  now when I connect external led on pin 0, turn on TX board led  too, before only external led turn on (it was the reason for do this post  :smiley-confuse: )

Wawa

You can't if you have Serial.begin in your code.  Remove the Serial stuff and you can use them as normal digital IO.
Then the pins are still normally HIGH, at least if you leave the pin as INPUT.
Probably because the USB<>Serial chip pulls them HIGH.

OP, why do you insist on using those pins.
Forget about those pins.

If you must use a LED on those pins, then connect the LED/resistor between pin and VCC,
not between pin and ground.
Leo..


Neodimio58

#12
Dec 13, 2017, 06:00 am Last Edit: Dec 13, 2017, 06:36 am by Neodimio58
Thanks Leo!
Only use those pins to verify all pins works fine because ; I conected  ground led cube to 5V and thought that I fryed my Arduino.
I only feel worried about TX & RX  works fine because never had  turned on, those board leds when I tested with a blink sketch before.
For example  when I upload  example  blink pin 13 , when this pin is HIGH sent 5V and LOW  0V however In RX & TX  this isn't happens ; TX led turn on= 0v , TX led turn off =5V , this situation is the same with pin 1.
I wish know what is normal behavior those pins , to know is they are damaged ;
Thanks for help in this Forum now I know a lot about TX RX pins.

Wawa

I wish know what is normal behavior those pins , to know is they are damaged ;
Thanks for help in this Forum now I know a lot about TX RX pinsh
If you can upload sketches, and Serial.print data to the serial monitor, then the pins are in perfect working order.

As said before, those pins are for the USB chip. Leave them alone.
Leo..

Go Up