Lynxmotion Tech Support

www.lynxmotion.com
It is currently Tue Sep 07, 2010 3:04 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Phoenix_V20 + PS2
PostPosted: Fri Jul 30, 2010 7:45 pm 
Offline
Roboteer

Joined: Wed Jul 28, 2010 8:35 am
Posts: 20
The reason I include both in the subject line is because I'm not sure which is causing the problem. The first issue is when I compile the sample program for the Atom Pro (Phoenix_V20). When I compile, it throws an error on line 1071, whose line is:

inc.w #1,r1

The error: [TOKEN INC] : Redefining to VAR

I saw no other usage of "inc" in the entire program, so I simply removed the line and all compiles fine. Programming also goes fine. However, when I connect the PS2 controller, all looks good until time to walk. When I press the event-triggering buttons, I get beep feedback, but I'm not getting any response to walking commands.

Can anyone explain this line, explain whether or not I need it, or any other tips?


Top
 Profile  
 
 Post subject: Re: Phoenix_V20 + PS2
PostPosted: Fri Jul 30, 2010 9:02 pm 
Offline
Robot Guru
User avatar

Joined: Sat Apr 15, 2006 1:42 pm
Posts: 2189
I ran into this recently with the latest builds. Here is a post and the response on the Basic MIcro Website: http://forums.basicmicro.net/news-f481/ ... tml#p42398

To fix the code try making that function look something like:
Code:
;[Handle TimerW interrupt]
BEGINASMSUB
HANDLE_TIMERW
asm {
  push.w   r1                     ; save away register we will use
  bclr #7,@TSRW:8                  ; clear the overflow bit in the Timer status word
  mov.w @WTIMERWOVERFLOWCNT:16,r1      ; We will increment the word that is the highword for a clock timer
  inc.w #1,r1
  mov.w r1, @WTIMERWOVERFLOWCNT:16
  pop.w  r1                        ; restore our registers
  rte                           ; and return   
}
return
ENDASMSUB

The key difference is that I added the asm{ and the }

Kurt


Top
 Profile  
 
 Post subject: Re: Phoenix_V20 + PS2
PostPosted: Fri Jul 30, 2010 9:15 pm 
Offline
Roboteer

Joined: Wed Jul 28, 2010 8:35 am
Posts: 20
Excellent fix for the compiling issues, everything compiled fine and loaded onto the atom without issue. However, I am still receiving feedback beeps from the device when I press the key buttons, yet it won't walk. Any clue why this might be?


Top
 Profile  
 
 Post subject: Re: Phoenix_V20 + PS2
PostPosted: Sat Jul 31, 2010 8:13 am 
Offline
Robot Guru
User avatar

Joined: Sat Apr 15, 2006 1:42 pm
Posts: 2189
Hi,
I am sorry, but I do not 1000% sure I understand what you are asking.

Are you saying that you are get beeping when you turn on the robot. If so then it usually implies that the PS2 is not working properly.

More likely you saying that when you press the start button, it makes the startup sound, but the robot does not do anything.

To help, it would be good to understand your setup and what you have or have not done. Are you using some of the Lynxmotion tutorials for the phoenix: Like: http://www.lynxmotion.com/images/html/build159.htm If so did you complete all of the steps? If so this would tell me, that you probably have done the servo zero process, which implies that the servos are plugged in properly, you have a battery setup for the servos... Here are some things I would check.

1) You turned on the power to the servos... IE there are often two switches, 1 for the processor and the 2nd for the servos. Also make sure that the servo battery is charged and hooked up...

2) You correctly followed step 13 in the assembly guide and properly modified a servo wire and connected it up between the SSC-32 and Bot Board 2.

3) You have the correct baud rate on on the SSC-32. Make sure it is setup for 38400 (only ist baud rate jumper is installed) See diagram in tutorial.

When you hit the start button and start moving the ps2 joystick, you should see the status LED on the SSC-32 flash, which tells you, it is receiving some data. Are you seeing this?

That is all for now.
Kurt


Top
 Profile  
 
 Post subject: Re: Phoenix_V20 + PS2
PostPosted: Sat Jul 31, 2010 1:24 pm 
Offline
Roboteer

Joined: Wed Jul 28, 2010 8:35 am
Posts: 20
I think your last suggestions nailed it! I missed the instruction to change the baud rate from the one used during ssc-32 setup. I don't have access to the computer with a functional serial port, but I'll keep update when I try the fix. Thanks in advance!


Top
 Profile  
 
 Post subject: Re: Phoenix_V20 + PS2
PostPosted: Sat Jul 31, 2010 1:34 pm 
Offline
Roboteer

Joined: Wed Jul 28, 2010 8:35 am
Posts: 20
Problem resolved, thanks a lot!


Top
 Profile  
 
 Post subject: Re: Phoenix_V20 + PS2
PostPosted: Sat Jul 31, 2010 1:55 pm 
Offline
Robot Guru
User avatar

Joined: Sat Apr 15, 2006 1:42 pm
Posts: 2189
You are welcome! I am glad you got it working
Kurt


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group