other names? what i want to do is a link between a variable named LCD_BUS and the pins from differents ports of the MCU MCF51QE.
I solved yesterday by doing a function that takes every pin port registry and assign it to a value of my variable....i think i wasnt clear...what i did was this:
void lcd_to_bus(byte lcdtemp){
PTFD_PTFD7=lcdtemp;
PTFD_PTFD6=lcdtemp>>1;
PTFD_PTFD5=lcdtemp>>2;
PTFD_PTFD4=lcdtemp>>3;
PTFD_PTFD3=lcdtemp>>4;
PTFD_PTFD2=lcdtemp>>5;
PTCD_PTCD6=lcdtemp>>6;
PTCD_PTCD7=lcdtemp>>7;
}
With this function I can send to the LCD display the lcdtemp data using the LCD bus....This is what i need to do, but i will be nice to do it using an Union...
What did you mean with changing names? the pins i/o of the ports already has names, i want to link a variable LCD_BUS to that pins....
What's the best way to do it?