How do i configure TRISC Register >
main()
{
PORTC = 0x00; //Clear PortC port
TRISC = Ox##; //Line 1 of code needs to be completed
While (1==1)
{
//some code
}
}
In reference to the above code, assuming you have a 20MHz oscillator on a PIC PIC 16F877a, configure the TRISC register (by adding the TWO Hexadecimal numbers for the sequence where ## is presently located) such that the port C pins will be configured as inputs or outputs according to the table below
Outputs Inputs
RC0 RC4
RC5 RC1
RC3 RC2
RC7
RC6
Correct Hexadecimal values for ## in line 1
main()
{
PORTC = 0x00; //Clear PortC port
TRISC = Ox##; //Line 1 of code needs to be completed
While (1==1)
{
//some code
}
}
In reference to the above code, assuming you have a 20MHz oscillator on a PIC PIC 16F877a, configure the TRISC register (by adding the TWO Hexadecimal numbers for the sequence where ## is presently located) such that the port C pins will be configured as inputs or outputs according to the table below
Outputs Inputs
RC0 RC4
RC5 RC1
RC3 RC2
RC7
RC6
Correct Hexadecimal values for ## in line 1