-2

I'm using the PIC16F887,and i'm new to this.

How to make B1 as analog pin.

How to receive information from pressure sensor to B1.

Thanks Sorry for my bad English.

ADizgna09
  • 13
  • 1
  • 5
  • You might not get electronics advice here on StackOverflow, but there should be some manual for this microcontroller and its development board. – Chris O Dec 05 '17 at 17:14
  • A.Design to make a pin analog microchip uses ANSEL register read more about it in the device datasheet page 40. and for pressure sensor you have to pick a particular sensor and its datasheet should tell you how to! – nikhil patil Dec 05 '17 at 20:34
  • also refer this http://www.microchip.com/doclisting/TechDoc.aspx?type=CodeExamples – nikhil patil Dec 05 '17 at 20:34

1 Answers1

2

One good thing about PIC controller is that, datasheet itself gives the clear steps to use its peripherals. Refer to the section 9.1 and 9.2 Datasheet

There is another wiki page which explains with c code but different PIC - however you could refer for the programming.

ADC Using PIC16F877A

Coming to your question : What you mean by B1? did you mean RB1 (or Port B, Pin 1)? if so, from the datasheet, RB1 is AN10 (Analog channel 10). So you need to set CHS<3:0> bits of ADCON0 register to b'1010'

These details from PIC controller side

You would have to read datasheet of the Pressure sensor too.

Without reading datasheets, you cannot work with the micro-controller

Sudhee

Sudhee
  • 151
  • 4
  • 10