Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

[PIC] PROTB Pullup issues after changing code from PIC16F876a to PIC16F886

Status
Not open for further replies.

ghead

Member level 2
Joined
Nov 19, 2010
Messages
43
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
2,384
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)
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:

xenos

Full Member level 4
Joined
May 9, 2015
Messages
212
Helped
82
Reputation
164
Reaction score
81
Trophy points
28
Location
127.0.0.1
Activity points
1,182
  • Like
Reactions: ghead

    ghead

    points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top