qmriso
Member level 5
I am currently working on simple UART project, but when i recive a byte on portB ( i'm using PIC 18f2320) pin RB5 never gives an output
even if i send 0xFF.
So I thought to test the port by using this code
void main(void)
{
TRISB=0;
LATB=0;
while (1)
{
LATB=0xFF;
}
}
But no luck.(MPLAB said that this would work fine)
So i tried to use PORTA with this code:
void main(void)
{
ADCON1bits.PCFG3=1; //sets portA bit0-3 to digital I/O
TRISA=0;
LATA=0;
while (1)
{
LATA=0xFF;
}
}
Again MPLAB said that this would work fine, but on the chip i had nothing on pins RA7 and RA4 (i have configered the oscillator so that RA 6 and 7 are I/O)
Can anyone Help me?
even if i send 0xFF.
So I thought to test the port by using this code
void main(void)
{
TRISB=0;
LATB=0;
while (1)
{
LATB=0xFF;
}
}
But no luck.(MPLAB said that this would work fine)
So i tried to use PORTA with this code:
void main(void)
{
ADCON1bits.PCFG3=1; //sets portA bit0-3 to digital I/O
TRISA=0;
LATA=0;
while (1)
{
LATA=0xFF;
}
}
Again MPLAB said that this would work fine, but on the chip i had nothing on pins RA7 and RA4 (i have configered the oscillator so that RA 6 and 7 are I/O)
Can anyone Help me?