go away spammer

Author Topic: arduino RX/TX pins usable for digital output  (Read 15754 times)

0 Members and 1 Guest are viewing this topic.

Offline blackbeardTopic starter

  • Supreme Robot
  • *****
  • Posts: 575
  • Helpful? 4
arduino RX/TX pins usable for digital output
« on: October 19, 2010, 12:30:30 PM »
so i've googled mixed messages about this. here is what i want to do. i want to use these pins for my pin heavy led cube with my 2 74hc4051 dmux. the standalone atmega328 will be used in this project and there will be no serial port attached as the chip will be programmed prior to being placed in the led cube motherboard. on one side i have heard that it is possible provided there is no other connection to the rx/tx pins but i've also found people saying that it's like a crime against humanity to use them. so keeping in mind that they will remain open otherwise and that i will shoot the next person even thinking of the word "charlieplexing" will this work?
"sure, you can test your combat robot on kittens... But all your going to do is make kitten juice"

First step: Build androids with AI
Next step: Give them vaginas

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: arduino RX/TX pins usable for digital output
« Reply #1 on: October 19, 2010, 02:30:40 PM »
Yes, you can use the RX/TX pins as regular IO. Just don't call the Serial.begin() in your code, and make sure you call a pinMode() for them.

You can also use the 6 ADC pins as another 6 digital IO pins as well. (digital pins 14-19)
« Last Edit: October 19, 2010, 02:36:13 PM by madsci1016 »

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: arduino RX/TX pins usable for digital output
« Reply #2 on: October 19, 2010, 05:22:17 PM »
I'm sure madsci thought "charlieplexing" there for a split second    :P  ;D ;D ;D
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: arduino RX/TX pins usable for digital output
« Reply #3 on: October 19, 2010, 05:27:52 PM »
I'm sure madsci thought "charlieplexing" there for a split second    :P  ;D ;D ;D

 ::) ::) ::) ::)

Trying to get me shot huh?

If anything I was thinking 'shifting', as that's what I'm doing on Arduquee. Charlieplexing has to many cons to be useful IMHO.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: arduino RX/TX pins usable for digital output
« Reply #4 on: October 19, 2010, 05:42:22 PM »
Hehe, nope, but tell a person not to think of eg. the word "banana" and that will be the very image that will pop up in his/hers mind  :)

I challenge you to not think the word banana while you read this  ::)

Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: arduino RX/TX pins usable for digital output
« Reply #5 on: October 19, 2010, 05:46:16 PM »
Hehe, nope, but tell a person not to think of eg. the word "banana" and that will be the very image that will pop up in his/hers mind  :)

Has anyone introduced you to The Game?

And yes, I just lost.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: arduino RX/TX pins usable for digital output
« Reply #6 on: October 19, 2010, 06:23:04 PM »
No, never heard of it before - more or less it started (for me) with an episode of The Persuaders, where somebody would set of something bad by thinking of an elephant - and as soon as you tell people not to, it's what gets focus of course.

Strange thing really, but it goes to illustrate how little we are in control of our own minds, when push comes to shove.
Perhaps a good thing to keep in mind, whenever we try to replicate ourselves through robotics.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline blackbeardTopic starter

  • Supreme Robot
  • *****
  • Posts: 575
  • Helpful? 4
Re: arduino RX/TX pins usable for digital output
« Reply #7 on: October 19, 2010, 07:38:35 PM »
No, never heard of it before - more or less it started (for me) with an episode of The Persuaders, where somebody would set of something bad by thinking of an elephant - and as soon as you tell people not to, it's what gets focus of course.

Strange thing really, but it goes to illustrate how little we are in control of our own minds, when push comes to shove.
Perhaps a good thing to keep in mind, whenever we try to replicate ourselves through robotics.


we need to model AI after our lazy people. not enjoying mindless labor even if we need it to survive is what makes us human
"sure, you can test your combat robot on kittens... But all your going to do is make kitten juice"

First step: Build androids with AI
Next step: Give them vaginas

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: arduino RX/TX pins usable for digital output
« Reply #8 on: October 19, 2010, 08:29:32 PM »
Back on topic,

Yes, you can use the RX/TX pins as regular IO. Just don't call the Serial.begin() in your code, and make sure you call a pinMode() for them.

You can also use the 6 ADC pins as another 6 digital IO pins as well. (digital pins 14-19)

Did this help?

Offline blackbeardTopic starter

  • Supreme Robot
  • *****
  • Posts: 575
  • Helpful? 4
Re: arduino RX/TX pins usable for digital output
« Reply #9 on: October 20, 2010, 06:59:09 AM »
I'm sure madsci thought "charlieplexing" there for a split second    :P  ;D ;D ;D

 ::) ::) ::) ::)

Trying to get me shot huh?

If anything I was thinking 'shifting', as that's what I'm doing on Arduquee. Charlieplexing has to many cons to be useful IMHO.


allot of people have been mentioning shifting but wouldn't that be really slow? i mean you'd have to wait for 20 inputs to be input into the register before enabling it and displaying the 1 led. you could do more then one led but my understanding is that leds don't play nice together in parallel without a resistor on each of them. multiplexing seems to be working pretty well for me right now and i've already soldered the chips in but i might try a shift register next time
"sure, you can test your combat robot on kittens... But all your going to do is make kitten juice"

First step: Build androids with AI
Next step: Give them vaginas

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: arduino RX/TX pins usable for digital output
« Reply #10 on: October 20, 2010, 07:59:16 AM »
This is through 'shifted multiplexing'

Society of Robots Line Dancers

Arduquee, a Arduino powered Marquee; first words

using only 6 IO pins, soon to be 5; for displays up to 10 8x8 matrices long. (1280 LEDs)

It works for me, but you can't do PWM brightness control on the LEDs.
« Last Edit: October 20, 2010, 08:02:09 AM by madsci1016 »

Offline blackbeardTopic starter

  • Supreme Robot
  • *****
  • Posts: 575
  • Helpful? 4
Re: arduino RX/TX pins usable for digital output
« Reply #11 on: October 22, 2010, 09:50:32 PM »
thanks! i was wondering since i havn`t used the rx and tx pins if it would work if i connected the RX/tx pins to the rx/tx pins on the arduino in order to program it without removing the chip each time.
"sure, you can test your combat robot on kittens... But all your going to do is make kitten juice"

First step: Build androids with AI
Next step: Give them vaginas

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: arduino RX/TX pins usable for digital output
« Reply #12 on: October 24, 2010, 07:53:50 AM »
Hi,

allot of people have been mentioning shifting but wouldn't that be really slow? i mean you'd have to wait for 20 inputs to be input into the register before enabling it [...]
Slow is a relative term, of course, but if the clock is eg. 200 kHz, it would take 100µs, or IOW, you could do it around 10,000 times a second (not counting strobing it through and such house keeping). With a multiplexed display, depending on the duty cycle, you should be quite fine with an update rate of around 100..200Hz.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

 


Get Your Ad Here

data_list