View Single Post
  #8   Spotlight this post!  
Unread 11-02-2009, 00:36
RoboMaster's Avatar
RoboMaster RoboMaster is offline
Alum, former programmer&co-captain
FRC #2472 (The Centurions)
Team Role: Mentor
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Minnesota, Twin Cities
Posts: 268
RoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant future
Re: Allocation of PWM and GPIO Channels

Well, you are programming in C, so this might be of little help, but this is what I have noticed in LabVIEW:

You can open up the Set and Get VIs (VIs, or SubVIs, are like functions in C) for the PWM input/output plugs and see what they actually do to make controlling the PWM signals. They actually use the Counter VIs to make/read the signal that is going through the pins to sense the ups and downs, ultimately a PWM signal. Then they handle sending/recieving signals through the port similar to a regular digital input-output port.

I would suggest looking into this on the C side and see if you can look into the functions that allow you to control PWM signals. I'll bet they too use counting processes to read/write a PWM signal from scratch. Then you can make your own code that does the same or copy and paste some of those formulas' code, but instead modify it so that it is controlling a digital input/output port/slot/pins.

I hope this makes sense. Cheers!
__________________
My engineering blog: noeticbrainwaves.blogspot.com

I'm not slacking, my code's compiling
...and I'm using LabVIEW