Pic 30F4013 PortB bits 9 to 12

General discussion on mikroC for dsPIC30/33 and PIC24.
Post Reply
Author
Message
daniekuys
Posts: 2
Joined: 20 Aug 2010 08:28
Location: Johannesburg

Pic 30F4013 PortB bits 9 to 12

#1 Post by daniekuys » 14 Feb 2011 15:53

Hi I have a pic 30F4014. The mcu works, because I can use the uart without problems. I am using ver 4.60 Micro C DSP

If I use this simple code to flip flop bits 9 to 12 on PORTB, only the bit 10 and bit 12 cycles.
Any Ideas??

// Simple flipflop program

sbit Relay5 at PORTB.B9;
sbit Relay6 at PORTB.B10;
sbit Relay7 at PORTB.B11;
sbit Relay8 at PORTB.B12;

void main()
{
ADPCFG = 0xFFFF;
TRISB = 0;



while (1) { // Endless loop

Delay_ms(1000);
Relay5=1;
Relay6=1;
Relay7=1;
Relay8=1;
Delay_ms(1000);
Relay5=0;
Relay6=0;
Relay7=0;
Relay8=0;
} //while 1


} //main


The result is that Relay 6 and 8 toggles

Post Reply

Return to “mikroC for dsPIC30/33 and PIC24 General”