Go to Post Our Digital Sidecar can attract metal chips from distant planets. - electroken [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 21-02-2004, 21:35
gnormhurst's Avatar
gnormhurst gnormhurst is offline
Norm Hurst
AKA: gnorm
#0381 (The Tornadoes)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Trenton, NJ
Posts: 138
gnormhurst will become famous soon enoughgnormhurst will become famous soon enough
Conflict between "Initialize_Tracker()" and "pwm13 & pwm15"? Kevin?

I got my manual driving code working pretty well, and it was time to move on to IR tracking. I hooked up beacons and made IR servo trackers, loaded Kevin's tracker code, and it worked! Yay.

So I merged the code from the tracker codebase into my code for non-autonomous driving, including dropping Kevin's user_routines_fast.c in place of the default one, and things got weird. No navigation code at all, just tracker code. The trackers would run okay, but the motors, connected to pwm13 and pwm15, started running and stopping, jerking on and off. The manual joystick driving still worked, sort of.

So I started removing bits of Kevin's code to see what was messing me up. I turned off all the code in Process_Data_From_Local_IO(). That didn't help. Then I turned off the call to Initialize_Tracker() that I had added in User_Initialization(), and that stopped the erratic behavior. And the trackers, too, of course.

I thought the code was running too long, so I measured the code duration by hooking up a scope to a digital out, and in main.c set it to '1' just before the call to Process_Data_From_Master_uP() and to '0' just after the call to Process_Data_From_Local_IO. My code runs in about 4 ms.

Today I found Kevin had a new version of tracker.zip posted on kevin.org. I merged that code with mine. No improvement. Darn.

Finally, sensing that there is something "different" about pwms 13, 14, 15, 16, I connected my motors to pwm10 and pwm11, turned all the tracking code back on, and everything worked nicely! That was at the end of the day, so I didn't get a chance to try any navigation...

So, can someone tell me why changing the motors from 13 and 15 to 10 and 11 changed the behavior from erratic to normal??? What's going on here?

-Norm
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 23:51.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi