|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Hello my team wants to program the third port.What we did was change everything that said port1 or port2 and put in port3. we got a failled build that said
SPBRG3 AND TXSTA3bits is not defined. How can we fix this problem?all are welcome(KEVIN!lol) |
|
#2
|
|||||
|
|||||
|
Re: Programming a third port
What third port?
(There are only two serial ports available: the program port and the TTL port.) |
|
#3
|
||||
|
||||
|
Re: Programming a third port
if u look on the IO there are four ports. we configuered our controller so that when we press a switch it activates a motor. we want to program that port so we can use it.
|
|
#4
|
|||||
|
|||||
|
Re: Programming a third port
Again I ask, "what third port?" What are you looking at that shows four of them? Again I tell you that there are only two serial ports available.
Now I ask why a serial port has anything to do with using a switch to control a motor. A motor usually connects to a Victor speed controller, which sets its output based on signals from one of sixteen pwm outputs on the Robot Controller. Some motors can be connected instead to a Spike relay module, which sets its output based on signals from one of eight relay outputs on the Robot Controller. Switches are typically connected directly to one of eighteen digital inputs on the Robot Controller. |
|
#5
|
|||||
|
|||||
|
Re: Programming a third port
Quote:
|
|
#6
|
||||
|
||||
|
Re: Programming a third port
yes the joystick ports! We are using two joysticks that are connected into port 1 and port 2 on the operator interface. Then there are two extra ports(3 and 4). We created a controller that uses the third port. How would you program the third port!
|
|
#7
|
||||
|
||||
|
Re: Programming a third port
The third port should be exactly the same as the others. Simply replace the p1 or p2 prefix with p3. There shouldn't be any other changes.
|
|
#8
|
|||
|
|||
|
Re: Programming a third port
the "aliases" for the third stick are p3_x, p3_y, and so on
|
|
#9
|
||||
|
||||
|
Re: Programming a third port
which source or header file would i input my data. I cant seem to find it anywhere
|
|
#10
|
||||
|
||||
|
Re: Programming a third port
All of the aliases are defined in the same header as the first two ports, that is, ifi_frc.h.
|
|
#11
|
||||
|
||||
|
Re: Programming a third port
but where would i write
ex.if(p3_sw_trig) pwm03=254; else pwm01=127 |
|
#12
|
||||
|
||||
|
Re: Programming a third port
That should be in user_routines.c, like the other code.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Serial Port Programming | phrontist | General Forum | 1 | 07-02-2004 16:13 |
| Programming Port I/O | MikeDubreuil | Programming | 4 | 10-02-2003 17:07 |
| Programming Port | Steven Carmain | Programming | 18 | 23-01-2003 21:36 |
| Programming port input? | Rickertsen2 | Rumor Mill | 1 | 21-01-2003 17:26 |
| Programming Port | GreenDice | Programming | 12 | 10-01-2002 09:14 |