Go to Post Yes, a good driver can effectively be the element that closes the loop, but only when there is a driver at the controls. - Alan Anderson [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 21-01-2006, 12:54
AMIRAM AMIRAM is offline
Registered User
no team
 
Join Date: Jan 2006
Location: ISRAEL
Posts: 16
AMIRAM is an unknown quantity at this point
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   Spotlight this post!  
Unread 21-01-2006, 15:46
steven114 steven114 is offline
Programming Wizard and Team Captain
AKA: Steven Schlansker
FRC #0114 (Eaglestrike)
Team Role: Programmer
 
Join Date: Feb 2004
Location: Los Altos, CA
Posts: 335
steven114 is a jewel in the roughsteven114 is a jewel in the roughsteven114 is a jewel in the rough
Send a message via AIM to steven114
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).
__________________
Shift to the left, shift to the right!
Pop up, push down, byte, byte, byte!
  #3   Spotlight this post!  
Unread 22-01-2006, 01:58
AMIRAM AMIRAM is offline
Registered User
no team
 
Join Date: Jan 2006
Location: ISRAEL
Posts: 16
AMIRAM is an unknown quantity at this point
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   Spotlight this post!  
Unread 22-01-2006, 14:37
steven114 steven114 is offline
Programming Wizard and Team Captain
AKA: Steven Schlansker
FRC #0114 (Eaglestrike)
Team Role: Programmer
 
Join Date: Feb 2004
Location: Los Altos, CA
Posts: 335
steven114 is a jewel in the roughsteven114 is a jewel in the roughsteven114 is a jewel in the rough
Send a message via AIM to steven114
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.
__________________
Shift to the left, shift to the right!
Pop up, push down, byte, byte, byte!
  #5   Spotlight this post!  
Unread 23-01-2006, 00:52
duane's Avatar
duane duane is offline
Registered User
FRC #0701 (RoboVikes)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2003
Location: Vacaville
Posts: 98
duane is an unknown quantity at this point
Send a message via AIM to duane
Re: using all port pins

Quote:
Originally Posted by AMIRAM
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 ?
You can look at the processor specific header file to figure out which port you want to use (I'm not sure which one it is this year). But here's an educated guess.

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.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 17:30.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi