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.
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
Related
I want to send out values with analog pins which would be read by analog pins of any other microcontroller.
It appears that you're referring to the PIC16F1619, all the related information that you can look for your requirements is inside the datasheet, I invite you to look at PIC16F1619 Web Page from Microchip and you will see all of the features and the current documentation to work with all of the peripherals included in this particular Microcontroller, however, according to the datasheet, the RA0 pin from this MCU has the feature to give an 8bit DAC output.
I hope this could help.
I'm currently working on a project involving a GPRS Shield based on Sim 900 Chip
I was wondering if anyone would know which ones are the VIN Pin and the RING pin ?
It doesn't say on the board itself and all other searches have lead me to a dead end.
Also if you have a detailed pin layout it would be much appreciated.
Thank you
The GPRS shield is the one in the link below
http://imgur.com/a/1a2gx
Ring Pin
If you have a Multimeter with continuity testing, check where the RI pin (#4) on the Sim 900 chip is broken out to. Here is an overview of the pins:
If it isn't (some shields don't have them broken out) you could solder a wire to the RI pin with an LED and resistor to Ground, something like this:
[RI Pin]--------[wire]--------[LED]--------[Resistor (330Ohms?)]--------[Ground]
The ring indicator is HIGH by default and LOW when there is an incoming call. So, when there is no call the LED is on and off when there is an incoming call.
VIN
When the position of the switch (middle left in the image below) is set to "extern" (right), you have to supply power to the barrel connector. When you set the switch to the left position, the module takes power from the 5V pin of the arduino OR (dont attach both!) an external power supply you attach to that pin.
Hope it helps :)
PS: These SIM modules can have current peaks up to 2 Amps. I recommend you to use an external power source that can provide minimum 2A at 5V.
Edit:
This might be helpful:
http://wiki.seeed.cc/GPRS_Shield_v1.0/. I think its the same module as yours. Have a look at the "GPRS Shield v1.4 Schematic" at the bottom of the page.
Edit 2:
Comparing the board from the link and yours, i'm very certain that the ring pin is the one marked in red in the image above. Checking with a multimeter doesnt hurt though. You can add the same circuit i described above to that pin to add an LED indicator.
hopefully I have the right forum here.
Firstly:
Processor: PIC32MX795F512L (on the chipKIT mx32 dev board)
IDE: MPLAB X IDE v2.26
Pogrammer/Debugger: PicKIT 3
I am trying to set some of the PORT pins to outputs so I can bit bang a communication protocol to another device. However, when I run the PIC using the pickit 3 as a debugger, I find that some of the TRIS bits won't toggle to 0.
This is an issue I am having with just TRISF and TRISG so far, and I have seen some mention of it in other posts, but no solution.
The pins I have tried to toggle are:
TRISF4 (SDA3A/SDI3A/U3ARX/PMA9/CN17/RF4)
TRISG3 (D-/RG3)
TRISG2 (D+/RG2)
here is an example of how I am doing it.
ODCDCLR = 0xFFFF;
ODCFCLR = 0xFFFF;
TRISDCLR = 3<<14;
TRISFCLR = 3<<5;
What could be some causes for a sticky TRIS bit?
If you look at page 36 of the datasheet, you will see that G2 and G3 are input-only when used as digital I/O instead of USB. Excerpt below:
Similarly, if you have UART3 enabled, RF4 will be an RX input.
You need to make sure you enable/disable the peripherals sharing those pins and read the datasheet very carefully. It's a complete PITA sometimes, but I've never found the datasheet to be wrong - just sometimes things are well hidden!
Two big causes are a pin configured for analog and a pin configured for some other function, like JTAG.
For F and G, you would set ANSELF = 0 and ANSELG = 0. For JTAG you'd need to check your data sheet and then set the appropriate configuration bit.
I haven't checked the data sheet for your specific device so I can't be more definitive.
Update:
See Roger Rowland's answer. No substitute for reading the data sheet!
I've been trying to measure temperature and pressure using BMP180 using my BLE112 module from Bluegiga. I connected SDA to pin P1_6 and clock to P1_7 according to the BGScript documentation. Whatever i do i can't get anything pushed to my characteristic... all the time it's equal to 0. I try to proceed as it is mentioned in the BMP180 datasheet.. starting with reading calibration.
This is my hardware.xml: link
temperature_sensor.bgs: link
There is much comments in the code since i am trying to check if i can read anything.. I am using
B-BLE application on android..
If someone could explain me on how to read teamperature or point any mistakes it would be coool!
Thanks!
sorry for late response.
bmp 180 works with serial data(SDA) and SCL(serial clock) which called I2C.
on your microcontroller you are using check the specific pin named SCL and SDA. each MCU have a particular pin dedicated for I2C connection.
also, are you using a library? check whether the library support ur MCU, better still use arduino and adafuit bmp180 library it will be easy to solve your problem.
Well I've looked and looked and just cant find data on the max current of the 5 v output (or even a suggested reasonable max)
They all mention 50 mA for the 3.3v output.
Looking at the chip it's a smaller board than the Arduino Uno so I don't want to pop it.
I assume someone will know the max current that the regulator on this board can handle and surmise what the 5v current out could be? Thanks in advance!
EDIT: The regulator / board 5v pin out, not chip related.
EDIT: Assuming supply is from the 12v power adapter.
The schematic shows a NCP1117ST50T3G. The datasheet shows 1500mA (typical).
Note that you may not actually be able to draw that at the higher end of the input voltage range since the Arduino may not provide sufficient heatsinking, needed since the regulator will shut down if it gets too hot (and the regulator will melt down if it doesn't shut down).
Also note that the traces on the board may not be designed to allow that much current to flow safely, and you could end up damaging the board itself regardless.
I'm going on record that you can put any amperage as input as long as the voltage in within range. So, if you have a 5V 200A high power input you are still fine. Now, If you have a short, you're cooked. But a properly designed circuit will draw what it needs and nothing more.
Hyperbole. I know absolutely nothing about this topic. I'm hoping a lot of people will call me names and one of those will correct me with a correct electrical engineering based answer. Either my view is correct or it isn't.