Pages: [1]   Go Down
Author Topic: TX and RX pins on Duemilnova Not Work  (Read 613 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

this isn't a programming question, but a hardware question.  I am trying to run the following program on a Arduino Duemilanova.  I am using the serial pins TX(1) and RX(0) pins to transmit the code to a serial motor driver.  After I uploaded the sketch, I made sure to remove the USB cord.  After I do that, my TX light will not light up anymore.  What do I need to do to get those two pins to function?

# void setup(){
  Serial.begin(115200);

}
void loop(){
  Serial.write('1');
 
  Serial.write('f');
  Serial.write('8');
  Serial.write('\r');
  delay(3000);
}
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 310
Posts: 26631
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The lights are controlled by the FTDI device
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The lights are controlled by the FTDI device

Okay, but still, I directly connected the TX and RX lines to my serial motor driver, and I get nothing.   My baud rate is correct.


http://www.sparkfun.com/products/9571

Please Note:

I tried this with an Arduino Uno, and it worked fine.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 310
Posts: 26631
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Does your code even compile with the # before "void setup" ?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 362
Posts: 17307
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you sure you have send and rec wired correctly at the motor controller end, signal names can sometimes be misleading. The arduino pin 1 should wire to a input pin on the MC and the MC should have it's output pin wired to arduino pin 0. Check the MC documentation for what they mean by send and rec pins.

Lefty

 
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Does your code even compile with the # before "void setup" ?

I didn't inlcude # in the code, I just posted that on this thread to show where my coding starts. 

Are you sure you have send and rec wired correctly at the motor controller end, signal names can sometimes be misleading. The arduino pin 1 should wire to a input pin on the MC and the MC should have it's output pin wired to arduino pin 0. Check the MC documentation for what they mean by send and rec pins.

Lefty

 

I did make sure to make sure my MC output was connected to my Arduino input.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 362
Posts: 17307
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I did make sure to make sure my MC output was connected to my Arduino input.

Well to get the best chance of help you should post your code (in a # edit code window), a link to your MC user manual or datasheet and possibly a wiring diagram of your wiring. You did remember to wire a common ground wire between the arduino and the MC? Simple questions I know, but without a posted wiring diagram and code we can only guess at the possible reasons you can't get it to work.

Lefty

Logged

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I tried this with an Arduino Uno, and it worked fine.

Does your Duemillnove have an ATmega168 or 328 chip?
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Well to get the best chance of help you should post your code (in a # edit code window),

Code:
void setup(){
  Serial.begin(115200);

}
void loop(){
  Serial.write('1');
 
  Serial.write('f');
  Serial.write('8');
  Serial.write('\r');
  delay(3000);
}

I'm not sure if that is what you mean by edit code window?

http://www.sparkfun.com/datasheets/Robotics/SFE03-0012-UserGuide-ROB-09571-serialmotordriver.pdf

The above link is the user's guide for the serial motor driver.

The  chip is at ATmega 328.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have another problem.  After reading Lefty's comment regarding hooking up the ground, I realized I forgot to do that.  After connecting the ground from the Arduino to to Serial Motor driver, I started receiving output from the M1 terminals on my motor driver.  That is fine, but now it seems I can't upload any scatches to the Duemilanove board.  I receive the following error. 

avrdude: stk500_getsync(): not in sync: resp=0xaa
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0xaa

Is it possible i some how burnt up a component on my board?



« Last Edit: November 13, 2011, 06:09:31 pm by Railfan1588 » Logged

Pages: [1]   Go Up
Jump to: