ghead
Member level 2

Hi, Im currently having a problem of PORTB not seeming to enable internal pull-ups. I have changed the code from PIC16F876a to PIC16F886 and have maybe missed something as I am new to c proramming.
Here is how the pull-ups are set in code (afaik)
Also when compiling after changing PIC I get an error with this line setup_adc_ports(RA0_RA1_RA3_ANALOG);
Which I blanked out on a test it everything seemed to work fine with adc so not sure if this line is even necessary??
Ive attached full code but these seem to be the relevant lines above, Also been through datasheets to check port functions arn't conflicting and everything seems fine to me...
Any help much appreciated.
Here is how the pull-ups are set in code (afaik)
Code:
//-- PORTS
output_A(0x00);
output_B(0x00);
output_C(0x00);
set_tris_A(0b11011111);
port_B_pullups(true);
set_tris_B(0b11111111);
set_tris_C(0b00000000);
Also when compiling after changing PIC I get an error with this line setup_adc_ports(RA0_RA1_RA3_ANALOG);
Which I blanked out on a test it everything seemed to work fine with adc so not sure if this line is even necessary??
Ive attached full code but these seem to be the relevant lines above, Also been through datasheets to check port functions arn't conflicting and everything seems fine to me...
Any help much appreciated.
Attachments
Last edited by a moderator: