Thread: PIC Programmers
View Single Post
  #3   Spotlight this post!  
Unread 03-26-2003, 11:50 AM
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
The PICstartPlus package is excellent. I got one several years ago, and cant say enough good things about MicroChip, their uPs, their tools.

It amazing what you can do with their uPs. From the little 8 pin ones, up to the 40 pin DIPs. If anything, they are a little more expensive than other microcontrollers, but if you are building small quanitiies of stuff, the ease of use is worth the few extra dollars.

BTW - I went to Dean Kamens house during the kickoff a few years back, and smiled when I saw the PIC box on a shelf in his library :c)

We had thought about doing an external circuit to turn the Gyro into an absolute heading signal, and realized all you have to do is accumulate the output value (normalize it by subtracting 127) in a 16bit variable - just add it on every loop, and if deltaT is = 1, add it again.

Since the loop in your SW is running at a (deterministic) fixed rate - by accumulating it in a 16bit variable, you are in effect multiplying the degrees/second signal by the cycle period (seconds) and you end up with a 16bit value that is directly proportional to the number of degrees the robot has turned since you powered it up.

We us it in our code to determine when we have turned 45° in auton mode - 45° comes out to be around 3000.