IO Problem

"gangben" <gangben-/[email protected]>
Newsgroups gmane.comp.hardware.rabbit-semiconductor
Message-ID <[email protected]>
Hey guys I try to use the io ports on my rabbit 5000 microcontroller. I tried the example for switching a led on my testboard. This works fine, but as soon as I try to change the port from D to A the compiler thorws a bunch of errors. These errors are according to the portnames. But there is no such table inside the user manual.

Maybe you can help me solve my problem.. Here is my code:


#use "UCOS2.LIB"

void task(void *data){
	while(1){
   	puts("off\n");
	   BitWrPortI(PDDR, &PDDRShadow, 1, 0);
	   OSTimeDlySec(2);
      puts("on\n");
	   BitWrPortI(PDDR, &PDDRShadow, 0, 0);
  	   OSTimeDlySec(2);
   }
}

main(){
	BitWrPortI(PDDDR, &PDDDRShadow, 1, 0);

	OSInit();
   OSTaskCreate(task, NULL, 64, 1);

   OSStart();


    while(1){

    }
}

I want to change the code so that port A Bit 0 switches on and off every 2 seconds. If I change PDDR to PADR and PDDRShadow to PADRShadow there are no errors. They only occure with the direction register in the main function. There is probably no PADDR and PADDRShaddow register.

Could you help me please?

all the best

gangben
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.