Phoenix_V20 + PS2

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?

I ran into this recently with the latest builds. Here is a post and the response on the Basic MIcro Website: forums.basicmicro.net/news-f481/ … tml#p42398

To fix the code try making that function look something like:

;[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

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?

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: 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

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!

Problem resolved, thanks a lot!

You are welcome! I am glad you got it working
Kurt