Programming no no (Atom damage)

is it possible that programming the atom with the following can damage the atom?

i was using was to Transform the Rotation of Global coordinate to Local coordinate

i had added this to the code:

IKFeetPosX_NEW          var sword   ;Transformation of Feet X
IKFeetPosY_NEW          var sword   ;Transformation of Feet Y
sinCoxa             var float       ;Sine of OffsetCoxa (sin 40)
cosCoxa             var float       ;Cosine of OffsetCoxa (cos 40)
;-----------------------------[LEG INVERSE KINEMATICS]
;*Calculates the angles of the tibia and femur for the given position of the feet*

LegIK [IKFeetPosX, IKFeetPosY, IKFeetPosZ]
   sinCoxa = 0.6428
   cosCoxa = 0.7660
   IKFeetPosX_NEW = -IKFeetPosX*cosCoxa - IKFeetPosY*sinCoxa    ; Rotation of Global coordinate to Local coordinate
   IKFeetPosY_NEW = IKFeetPosX*sinCoxa - IKFeetPosY*cosCoxa     ; Rotation of Global coordinate to Local coordinate

   IKFeetPosXZ = TOINT(FSQRT(TOFLOAT((IKFeetPosX_NEW *IKFeetPosX_NEW)+(IKFeetPosZ*IKFeetPosZ)))) ;Input position of the Feet X/Y/Z

   IKCF = FSQRT(TOFLOAT(((IKFeetPosXZ-CoxaLength)*(IKFeetPosXZ-CoxaLength))+(IKFeetPosY_NEW *IKFeetPosY_NEW )))
       
   GOSUB GetBoogTan [IKFeetPosXZ-CoxaLength, IKFeetPosY_NEW]
   IKA1 = BoogTan
   
   IKA2 = FACOS((TOFLOAT((FemurLength*FemurLength) - (TibiaLength*TibiaLength)) + (IKCF*IKCF)) / (TOFLOAT(2*Femurlength) * IKCF))
   
   ;IKFemurAngle
   IKFemurAngle = (TOINT(((IKA1 + IKA2) * 180.0) / 3.141592)*-1)+90
   
   ;IKTibiaAngle
   IKTibiaAngle = (90-TOINT(((FACOS((TOFLOAT((FemurLength*FemurLength) + (TibiaLength*TibiaLength)) - (IKCF*IKCF)) / TOFLOAT(2*Femurlength*TibiaLength)))*180.0) / 3.141592)) * -1
   
   ;IKCoxaAngle
   GOSUB GetBoogTan [IKFeetPosZ, IKFeetPosX_NEW]
   IKCoxaAngle = TOINT((BoogTan*180.0) / 3.141592)
         
   IF(IKCF < TOFLOAT(FemurLength+TibiaLength-30)) THEN
      IKSolution = POSITIVE ;Output POSITIVE IF the solution is possible
   ELSE
      IF(IKCF < TOFLOAT(FemurLength+TibiaLength)) THEN
         IKSolutionWarning = POSITIVE ;Output POSITIVE IF the solution is NEARLY possible
      ELSE
         IKSolutionError = POSITIVE    ;Output POSITIVE IF the solution is NOT possible
      ENDIF
   ENDIF       
   
return

Note:
sinCoxa = 0.6428
cosCoxa = 0.7660
IKFeetPosX_NEW = -IKFeetPosXcosCoxa - IKFeetPosYsinCoxa ; Rotation of Global coordinate to Local coordinate
IKFeetPosY_NEW = IKFeetPosXsinCoxa - IKFeetPosYcosCoxa ; Rotation of Global coordinate to Local coordinate

and the warning i had was this:
http://i531.photobucket.com/albums/dd355/innerbreed/Capture-6.jpg

i re-worked the code and then got this.
http://i531.photobucket.com/albums/dd355/innerbreed/Capture-7.jpg

since adding this i cannot get the robot to function in the normal manor, even when i take this out and use original codes as before.??? :confused:

[size=150]this code was sent to me but i dont blame anyone for this![/size] :wink:

If it were me, I would uninstall and then re-install the IDE. I know it doesn’t make much sense, but it sometimes works.

we’v been here before. :wink:

Much more information is needed. What module are you using? please be very specific. Is it a Rev D Atom module? If you aren’t sure read the processor part number off the module. If it is 16F886 or 16F887 it’s a Rev D module. What devboard(if any)? if not using a devboard describe how you are using the module. What serial connection(standard RS-232 or USB to serial adapter). Could be you need to adjust the Reset Hold time in your advanced comport settings.

its not “Rev D” i dont see anything like that on it.
im using Botboard2 and SSC-32. more info here:
lynxmotion.net/phpbb/viewtopic.php?t=5205

using USB to serial adapter.

the Reset Hold time in advanced comport settings is set to 25?

please be aware everything worked before intill it programmed it with
the code mentioned above.
thanks.

Not all Rev Ds were marked(primarily those that shipped after the inital release. Check the actual processor number. If it is 16F886/7 then that could explain the problem. Otherwise we’ll have to get the module back to check it ourselves.

i have brought a new one but as of yet i havent started programming.
once i do ’ and if i get problems’ ill get back to you. its strange as it worked before, using the same code etc. then all of a sudden it didnt.

anyway thanks,