Luis Martinez

5282 Ports

Discussion created by Luis Martinez on Apr 24, 2007
Latest reply on Apr 25, 2007 by Tang Qiwei
All of the ports that I like to used like IN PUT port I can't use them like IN PUT as PORTB, PORTC, PORTD and this registers are of 8 bits
 
#define MCF5282_GPIO_PBCDPAR   (*(vuint8  *)(void *)(&__IPSBAR[0x100050]))
 
and using the similar instrution of program:
 
int main()
{
   MCF5282_GPIO_PBCDPAR = 0x00
   MCF5282_GPIO_DDRB = 0xFF;   //OUT PUT PORT
    MCF5282_GPIO_DDRC = 0X00;   //IN PUT PORT
   while(1)
    {
        MCF5282_GPIO_PORTB =    MCF5282_GPIO_PORTC;
     }
 
return 0;
}
 
With the last program I can do that the PORTB oun the data that the PORTC recive, I don't know if the declaration of the register are in a wrong way or what if some body have an example of program that declarete a IN PUT port I will be thanksful :smileyvery-happy:

Outcomes