Concatenating pins from two ports

Status
Not open for further replies.

yasser_shoukry

Full Member level 4
Joined
May 31, 2006
Messages
233
Helped
25
Reputation
54
Reaction score
5
Trophy points
1,298
Location
Cairo - Egypt
Activity points
2,749
I have a problem in which i need a complete 8-pin port to communicate with a LCD using a ready code. This code begins with defining a data latch as follow:

#define DATALATCH LATD /* DATA port */
#define TRISDATA TRISD
#define PORTDATA PORTD

My problem is i have no empty port to use it (I uses CAN TX & CAN RX from PORTE / OSC1 & OSC2 from PORTA / ECCP1 from PORTD)

I need a method to define "DATALATCH" such that it contains some pins from PORTD and others from PORTA such that it can be dealt as one prot (i.e i can write something like DATALATCH = 0xFF

Thanks in advance
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…