View Single Post
  #2   Spotlight this post!  
Unread 05-12-2016, 12:16
Jacob C. Jacob C. is offline
Engineer at CTR Electronics
FRC #4130 (The Blue Devils)
Team Role: Mentor
 
Join Date: Nov 2009
Rookie Year: 2009
Location: Richmond, MI
Posts: 8
Jacob C. has a spectacular aura aboutJacob C. has a spectacular aura aboutJacob C. has a spectacular aura about
Re: Using PWM on a HERO?

The information in section 9.4.4 of the HERO User's Guide (page 58 in the most recent revision) is correct - there are 5 available PWM pins on the HERO.

Table 2.2 on page 10 (and the corresponding chart on page 9) is referencing the official Gadgeteer specification from Microsoft, which dictates that pins 7, 8, and 9 on a 'P' port must be available for PWM use. (see here)

Our IO configuration on the HERO, however, allows us to have 2 extra PWM pins (pins 4 and 6). Since we felt that having more than the 3 pins called out by the spec could be useful for those that still use PWM motor controllers, we decided to implement the extra 2 pins that were available to us, bringing our total up to 5.

I realize this could be a little confusing, so we'll try to make a note in the next release of the manual to prevent the confusion.


You're correct in your thinking about the wiring configuration. The ground wires for the Victor SPs can be commonized to the ground pin on Port 3, and then the signal wires can be connected to the individual PWM pins.

As another note, if you need to conserve PWM pins you can wire the signals for motor controllers with mechanically linked motors to the same PWM port.
IE, if you have a drive train where two motors are driving a single gearbox, the signals for these motor controllers can be controlled from a single PWM port.
__________________
FiM LRI/FTA
Since 2015: Controls Mentor for FRC 4130, The Blue Devils (Richmond, MI)
2009-2014: FRC Team 1718, The Fighting Pi

Full Disclosure: I am an Engineer for CTR Electronics
Reply With Quote