Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: Tomas on January 20, 2009, 11:03:31 AM
-
Im pretty sure I've used the right baud-settings. 115200 in both HyperTerminal and device manager. I've installed the drivers correctly, device manager shows Silicon Labs CP210x USB to UART Bridge (COM4). I've set HyperTerminal @ COM4 to.
So whats wrong? Im just recieving Éæ, and if I scroll upwards, I see this getting repeated: Ô Ô=ÀÌÀCæ (or something along thise lines, it wont let me copy paste).
Whats happening?
-
what OS are you using?
-
It was on a XP computer with some weird university user permissionthing. I'll try on my own laptop now, using XP.
-
try changing your COM port to one 3-
-
also try and program the Axon_DAQ.hex in there and see if that's giving you problems as well.
-
try changing your COM port to one 3-
The com port was number 3, then I tried reinstalling the drivers. It then became 4, still the same gibberish.
Its not "dangerous" to program a new thing to the axon? I should use the bootloader then, right?
edit: I get exactly the same on my laptop, this is on COM 3 115200 baud rate, data bits 8, parity none, stop bits 1, flow control none (everything else than baud rate is default).
Going to try a new program, see if that'll work.
-
its not dangerous and you can use the bootloader
-
Allright, I'll give some of the stuff I read off hyperterminal on the different apps admin layed out here
Heres axon_DAQ
79 77 74 70 67 63 61 61 69 71 71 69 67 64 63 63 154 0
34 43 49 53 54 55 54 54 34 43 49 53 55 56 56 56 154 0
80 80 79 79 79 80 79 77 93 88 85 83 83 82 80 77 154 0
126 111 100 92 86 83 80 78 126 113 102 94 88 83 80 78 154 0
35 46 52 55 55 54 53 54 36 48 54 57 58 57 58 57 154 0
42 48 53 58 61 63 63 63 46 51 57 61 64 67 67 65 154 0
Supposed to be like this?
axon_tst
Same as in the first post
axon_sco
.0:55 1:54 2:53 3:53 4:54 5:54 6:54 7:54
8:34 9:43 10:45 11:48 12:51 13:52 14:54 15:54
0:68 1:68 2:68 3:69 4:70 5:70 6:70 7:68
8:88 9:84 10:79 11:75 12:75 13:73 14:71 15:68
0:56 1:54 2:53 3:54 4:54 5:54 6:54 7:54
8:36 9:44 10:46 11:48 12:52 13:52 14:54 15:54
0:69 1:69 2:68 3:69 4:70 5:71 6:70 7:68
8:89 9:85 10:80 11:76 12:76 13:74 14:72 15:69
0:56 1:54 2:53 3:53 4:54 5:54 6:54 7:54
8:37 9:44 10:46 11:48 12:52 13:52 14:54 15:54
Is any of this logical? Supposed to be? Whaat? I dont get any of this. Hehe.
-
I was getting the same thing. Once I programmed the DAQ and saw numbers coming back I knew I was making progress.
Mash up a small program to blink a led or output something simple back to the USB port and you should be fine.
I gave up on hyperterminal and am using Tera Term Pro.
See this thread: http://www.societyofrobots.com/robotforum/index.php?topic=6028.0
or this thread: http://www.societyofrobots.com/robotforum/index.php?topic=5052.0
There are a few folks with the connection problems. I think that first program is borked for some reason I never got it to work for me. But DAQ and all the other things I load now work( now that I let the power dissipate a few seconds before reprogramming).
Doug
-
I read through your stuff there, I dont know if DAQ worked either, maybe someone else do.
Anyway, the card seems dead. I can upload new stuff to it (I think), but nothing ever happens, not even the blinking green light. When I start the axon (flip the switch), the green light blinks for a very short time, and the red one starts shining. If it was a long time since I started it, the servo I connected also moves a little bit. Nothing happens when I push the button. And if I try the fading light in the source code to the axon (http://www.societyofrobots.com/axon/axon_function_list.shtml#pwm), then I cant compile the code:
Compiling: Axon.c
avr-gcc -c -mmcu=atmega640 -I. -gstabs -O0 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=Axon.lst -std=gnu99 -Wp,-M,-MP,-MT,Axon.o,-MF,.dep/Axon.o.d Axon.c -o Axon.o
In file included from Axon.c:21:
control.c: In function 'control':
control.c:29: warning: implicit declaration of function 'PWM_Init_timer1_LED'
control.c:30: warning: implicit declaration of function 'PWM_timer1_On_LED'
control.c:33: error: 'i' undeclared (first use in this function)
control.c:33: error: (Each undeclared identifier is reported only once
control.c:33: error: for each function it appears in.)
control.c:35: warning: implicit declaration of function 'PWM_timer1_Set_LED'
make: *** [Axon.o] Error 1
Build failed with 3 errors and 3 warnings...
This is the code in the control function.
void control(void)
{
PWM_Init_timer1_LED(8);
PWM_timer1_On_LED();
while(1)
{
for(i=110;i<255;i++)
{
PWM_timer1_Set_LED(i);
delay_ms(10);//control pulse speed
}
for(i=255;i>110;i--)
{
PWM_timer1_Set_LED(i);
delay_ms(10);//control pulse speed
}
}
//photovore();//run photovore algorithm
//test_code();//various testing code for admin
}
edit: Allright, I got the servo to move a bit using parts of the photovore code. So it seems its perhaps not broke anyway, good for me :)
-
I did get the DAQ to work and got the same output as you I recall.
The fact that it looks like numbers is a good sign that you are getting synced up correctly.
Definitely get the blink program to work first.
You have a syntax error as well as warnings in that code. Are you familiar with C?
- declare your variable somewhere "int i;" it could be a global, local to the function or local to the "for" loop
- find out where the functions are declared and include the header or .c file the "implicit" warning measn they are not declared before use.
get those things sorted and then upload and see what happens.
Doug
-
Im pretty familiar with c, but I thought the pwm commands was already decleared. Int i is obvious solution to one of the errors (I just had to copy paste the code very fast because I had some classes to attend to :)).
I've managed to get the microcomputer going now, so I'll sniff around for the PWM code.
-
Just an FYI on PWM. Many of the features with PWM I added with the latest code version and won't work with previous versions.
However I've been having serious problems with it so I'll have to request patience until yerbie and I figure it out:
http://www.societyofrobots.com/robotforum/index.php?topic=6468.0
-
Allright, we managed to get the servo running. I had to use version 1.01 and the servo(portletter, portnumber, position) thingy. Kinda hard doing several things simultaniously (or nearly simultaniously) with this function, are the others (atm. non functioning ones) meant to ease this?
-
Well, the Axon is really meant for people who want to use a lot of servos. There aren't enough PWM pins to handle more than a few servos, and post people don't write/require processor intensive programs, so that's why I don't use PWM.
-
For what it's worth I'm using 1.02 and code like the following:
PWM_timer3_Set_E3(SERVO_CENTER+SERVO_FULL_SPEED);
But I am only using PWM on three pins, 2 for continous rotation servos and one for a sensor turret and I have all those working fine.
I am using the speed of the axon to do other things and this style of servo control is working fine for me.