Re: PortB question

"[email protected]" <[email protected]>
Newsgroups gmane.comp.hardware.rabbit-semiconductor
Message-ID <[email protected]>

#define BYTE_OFF 0xFF
#define BYTE_ON  0x00

#define BIT_OFF 1
#define BIT_ON  0

// Set all the Port B as outputs(default high logic):    
       WrPortI(PBDDR, &PBDDRShadow, BYTE_OFF);
// Or: 
       for(i=0;i<8;i++) BitWrPortI(PBDDR, &PBDDRShadow, BIT_OFF, i);
==================================================================
// Port B will be active(on) if trigger with low logic as follows:
       WrPortI(PBDDR, &PBDDRShadow, BYTE_ON);
//Or:
       for(i=0;i<8;i++) BitWrPortI(PBDDR, &PBDDRShadow, BIT_ON, i);



--- In [email protected], Sylvain Bissonnette <bibi@...> wrote:
>
> Hi,  I have a problem with the PORTB bit 0  I set this bit in output and I
> write values but without success I don't get anything from the I/O.
> 
> for (i=0;i<8;i++) BitWrPortI(PBDDR,&PBDDRShadow,1,i);
> 
> while(1)  WrPortI(PBDR,    &PBDRShadow,i++);
> 
> Thanks for your time
> Sylvain Bissonnette
>
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.