Author Topic: AXON UART Troubles  (Read 863 times)

0 Members and 1 Guest are viewing this topic.

Offline KRGrindleyTopic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
AXON UART Troubles
« on: February 01, 2010, 06:15:11 PM »
I have an AXON 1 and I have been having some UART troubles.
1) If I use just UART1 (the USB) it sends data just fine, but it won't receive it.  I have tried putting all the original source code on (only commenting out all the timers because I get a badISR called error and constant resetting if I don't).  Then I deleted the original control() and replace it with the following code:

Quote
void control(void)
   {
      char temp;
      rprintf("type_stuff");
      while(1)
      {
      temp=uart1GetByte();//returns -1 if no data present
      if (temp == 'r')//if data received
         rprintf("stuff");
      }
   }

The out put goes until it hits the uart1GetByte(), then it waits but never gets anything.

2) When trying to use one of the other UART ports I just get a bunch of "4"s displaying on the screen.  I am using RS232 with the Axon "T" Pin to RS232 Pin 2, Axon "R" Pin to RS232 Pin 3 and Axon "G" Pin to RS232 Pin 5.  This configuration also does not show any noticeable response to input.  I am pretty user I have all my ports configured properly at 115200 Baud.

Any hits you can offer would be greatly appreciated.

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,154
  • Helpful? 110
Re: AXON UART Troubles
« Reply #1 on: February 01, 2010, 07:47:05 PM »
When you say RS232 (for uarts other than UART1) then I'm assuming you mean TTL level (ie +5v) and that your not connecting it straight to a PC RS232 port without a level shifter?
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
Re: AXON UART Troubles
« Reply #2 on: February 01, 2010, 08:08:13 PM »
Ouch, it sounds like you connected to directly to a serial port (since the pin number you mentioned are correct to a DB9 serial port) without a level shifter. This will fry your Axon's Uart port.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,665
  • Helpful? 169
    • Society of Robots
Re: AXON UART Troubles
« Reply #3 on: February 02, 2010, 07:12:39 AM »
Any possible chance you yanked too hard on the USB connector?

Measure the 5 pins on the USB connector while sending data (have someone type really fast into HyperTerminal while you do this). Oscilloscope preferred, but a multimeter might pick up blips, especially if you use the frequency setting.

Two pins should be 0V, one should be 5V, and the last two should carry a signal.

Offline KRGrindleyTopic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Re: AXON UART Troubles
« Reply #4 on: February 02, 2010, 04:35:09 PM »
When you say RS232 (for uarts other than UART1) then I'm assuming you mean TTL level (ie +5v) and that your not connecting it straight to a PC RS232 port without a level shifter?

Ya that's what I was doing...fortunately nothing got fried, just wasted a few hours.
Thanks

 


Get Your Ad Here

data_list