Author Topic: UART and rprintf problems?  (Read 1792 times)

0 Members and 1 Guest are viewing this topic.

Offline klimsTopic starter

  • Robot Overlord
  • ****
  • Posts: 190
  • Helpful? 2
UART and rprintf problems?
« on: April 24, 2009, 08:23:52 AM »
Hey guys,

I'm trying to work out why I'm getting gibberish on my UART which I think prevents me from entering commands in hyperterminal.
The code labelled control_v1.c works a treat, but is ugly as hell. I was trying to pull it apart and make it nice but it seems to be causing problems. The version labelled control.c is essentially the same thing as v1 so I can't work out why one version works and the other doesn't.
Using control.c I get a bunch of % characters at the end of my characters being printed to the screen.

how often do you need to write this command?

Do I need to declare it in every file that used rprintf?
Do I need to declare it within each method that uses rprintf???

Hopefully its a simple problem that I am overlooking...

thanks guys,

Offline Tomas

  • Full Member
  • ***
  • Posts: 111
  • Helpful? 0
Re: UART and rprintf problems?
« Reply #1 on: April 29, 2009, 04:49:19 AM »
You only need to declare it once in the start of the program (unless you are changing which uart rprintf are printing to in the program). Nowhere else, when you declare it it stays that way until you turn it off.

If you are just recieving jibberish from your (axon?) microcomputer is probably not connected to the computer properly. I will recommend you to write an easy program with a looping rprintf command and if it prints that, it should also print the other stuff.

Another problem could be that the microcomputer is restarting for some reason, Ive experienced it myself and you'll just recieve jibberish. If you are using axon, what source code are you using?

Ive had some weird problems with the latest source codes released. 1.01 worked well for me, the other ones made my axon reset all the time and print jibberish to the hyperterminal. I would recommend downgrading if you havent tried that.
« Last Edit: April 29, 2009, 04:50:38 AM by Tomas »


Get Your Ad Here