Author Topic: No Terminal Output  (Read 2505 times)

0 Members and 1 Guest are viewing this topic.

Offline moltrex84Topic starter

  • Jr. Member
  • **
  • Posts: 27
  • Helpful? 0
No Terminal Output
« on: August 27, 2010, 05:20:20 PM »
Hello everyone, I'm new to this axon2 but not to microcontrollers.

The Problem

I can't see data in the Terminal, I used 

Corresponding Port
Baud Rate:115.2 Kbps 
Data 8bit
parity: none
Stop 1 bit
Flow Control: Hardware


*I'm able to upload code to the microcontroller ... I uploaded the LED_Display.hex
and it display all the number and characters in the 7 segment led display. Also Photovore.hex and computer_controlled_example.hex. No output in the terminal.

*I tried in my virtual machine terminal "Hyper Terminal" and in my host terminal "Tera term". No output in the terminal.

* I tried the already created connection in the tutorial Axon2.ht. No output in the terminal.

* I tried basic configuration in the device manager of the Port to match the 115.2 kbps and in the terminal and both the same. No output in the terminal.

* I got the usb driver cause I’m able to upload code to the axon2. No output in the terminal.

* I tried without flow control "off". No output in the terminal.

* I tried different USB ports. No output in the terminal.


I'm able to see like 8 junk characters when I turn on the axon2, but that’s due to the transient.



By the way 1st post. Hello World!
Need help, thanks.
« Last Edit: August 27, 2010, 05:25:23 PM by moltrex84 »

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: No Terminal Output
« Reply #1 on: August 27, 2010, 06:01:53 PM »
Try Flow Control = None
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 moltrex84Topic starter

  • Jr. Member
  • **
  • Posts: 27
  • Helpful? 0
Re: No Terminal Output
« Reply #2 on: August 27, 2010, 06:59:00 PM »
** I tried Flow Control None in the device manager Port usb/serial "properties", and in the Terminal Options and the same combination in the virtual machine.

No output in the Terminal. I will try tomorrow another computer with Tera Term and the usb driver just that, and see what happens.
But I really need help with this.

Thanks for your response ...

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: No Terminal Output
« Reply #3 on: August 27, 2010, 07:26:34 PM »
I know this shouldn't be so difficult but sometimes it is.

First be sure that the correct COM PORT is selected from the terminal program.
Ensure that the program used to load code is shut-down and has released the COM PORT.

Try different Baud rates. I know but this is a common error in getting Com Ports to work.

Try writing a simple code loop for the Axon to continuously send characters out the UART. It is very possible that the Axon UART set-up isn't correct. 
Send the SPACE character (0x20) about a 100 times then a 'w' about 100 times and measure the Axon's UART output pin with a voltmeter (assuming you don't have an O'scope). You should see about 0.5V when the SPACE is sent and about 4.5V when the 'w' is sent.
This is just a very basic test to see if the Axon is really sending anything out the UART. If the voltage doesn't change at all try a very lower Baud rate and test again. If still nothing then dig into the code.

Good luck

Offline moltrex84Topic starter

  • Jr. Member
  • **
  • Posts: 27
  • Helpful? 0
Re: No Terminal Output
« Reply #4 on: August 27, 2010, 08:34:47 PM »
Well the error is not that obvious, because I have done projects in a Oopic and I know the thrill.

***I have done all the closing everything opening only the specific tool "Hyper terminal" ... the com only dedicated to the terminal.
***Also re-installing the usb/serial driver.

I have not program anything yet, because how will I know what I do is correct ? ...

}

TICK_COUNT appInitSoftware(TICK_COUNT loopStart){
   rprintf("\nW.\n\n");  

}


Does that work ???



Hopefully is a simple error, because it let me upload to the Axon 2 from my virtual machine.

With the expected settings of the Axon:

com # depends where is connected
Baud rate 115.2Kbps
...



« Last Edit: August 27, 2010, 08:39:11 PM by moltrex84 »

Offline voyager2

  • Supreme Robot
  • *****
  • Posts: 463
  • Helpful? 6
    • Voyager Robotics
Re: No Terminal Output
« Reply #5 on: August 28, 2010, 08:07:18 AM »
Random "junk" characters generally means that there is a baud mismatch.
Happens when I plug things in without setting the right baud.
And Admin said "Let there be robots!"
And it was good.

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: No Terminal Output
« Reply #6 on: August 28, 2010, 11:13:30 AM »

TICK_COUNT appInitSoftware(TICK_COUNT loopStart){
   rprintf("\nW.\n\n");  
}

Does that work ???


appInitSoftware is only called once. So it would be better to put it in your appControl which is called over and over.
ie, per waltr suggestion, then:

uint8_t i;
for(i = 0; i< 100; i++){
  rprintfChar(' ');
}
for(i = 0; i< 100; i++){
  rprintfChar('w');
}


But there are still some assumptions here:
1. If you are using Project Designer then check your project for Uart1 (the USB port) as to what baud rate it is using and when you generate the code then say that rprintf should go to UART1
2. If you are not using Project Designer then you need to do this yourself in appInitHardware ie:
uartInit(UART1, 115200);  // set the baud rate of UART1
rprintfInit( uartGetWriter(UART1) ); // Tell rprintf to output to UART1, the default is that rprintf output is thrown away!

If you still have problems then send me ALL of the C and H files and I will take a more informed look.

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 moltrex84Topic starter

  • Jr. Member
  • **
  • Posts: 27
  • Helpful? 0
Re: No Terminal Output
« Reply #7 on: August 28, 2010, 08:07:36 PM »
Problem Solved.

Solution:

The Hardware.H was communicating via the computer with " USB_BAUD (BAUD_RATE)230400 ".
Then I proceed to change that to 115200 and I was able to see output.

In my opinion: I think the examples should be with the setting already set to math the tutorial 115.2Kbps.


Thanks Webbot and everyone else, maybe sometime later on I talk about my super project.




Uploaded with ImageShack.us

http://img839.imageshack.us/img839/8310/solutionp.jpg