|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
using all port pins
Hi
can anyone tall me how can I export/inport data from all of port a pins in the defult code the pins can be use only as bits thanks |
|
#2
|
|||
|
|||
|
Re: using all port pins
You may wish to restate your question, I'm having trouble understanding it. If you're trying to grab all of the data off of PORTA (the register in the microcontroller), then look at the header files (ifi_picdefs.h) and find an 8-bit variable with the name PORTA somewhere in it (don't remember exactly what it's called).
|
|
#3
|
|||
|
|||
|
Re: using all port pins
In the FRC u have 18 digtal inputs/outputs that u can use i want to use 8 of them together to connect another microcontroller ...
can u understand now ? |
|
#4
|
|||
|
|||
|
Re: using all port pins
You might be better off using the TTL serial port. If that's not an option, many PICs have a parallel port - I don't know if the pins that it uses are wired out to the front of the RC, but if they are you could use that to shift entire bytes in and out.
Failing that you can always just use the digital ins, shift and add. Something along the lines of IN_1 << 7 + IN_2 << 6 + IN_3 << 5 etc. |
|
#5
|
||||
|
||||
|
Re: using all port pins
Quote:
In ifi_aliases.h rc_dig_in01 is defined as: #define rc_dig_in01 PORTBbits.RB2 The definition fo PORTBBits comes from the processor specific include file. There is also a corresponding definition for PORTB which is an unsigned char. (The linker must have a memory map that defines what addresses these ports are located.) That should provide you with an 8-bit wide read of all the lines. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CMUcam2 Serial Port Diagnostics | Kevin Watson | Programming | 13 | 18-02-2006 15:05 |
| TTL port to a serial port on a demo board | ImmortalAres | Programming | 16 | 09-07-2005 23:44 |
| Updated: Serial Port Driver Code | Kevin Watson | Programming | 4 | 05-02-2005 18:39 |
| New Serial Port Driver | Kevin Watson | Programming | 16 | 09-01-2005 01:56 |
| [ECDU]: CHAT-7/19 | Corey Balint | FIRST-related Organizations | 5 | 19-07-2004 23:44 |