Re: IO Problem

kb1ckt-/[email protected]
Newsgroups gmane.comp.hardware.rabbit-semiconductor
Message-ID <[email protected]>
Is that the full code? I see function defined but not used, and functions called but not defined.

There may be no direction register like uou think; never worked with the 5000. Have you checked the manual? The info might be dispersed, but it should be out there. There used to be posters showing all registers of the processor, at least for the 3000.

Shawn

Sent from my iPad

On Mar 15, 2013, at 4:58 AM, "gangben" <gangben-/[email protected]> wrote:

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