![]() | ![]() | ![]() |
| |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
![]() |
| | Tools |
| | #16 |
|
Yes, to do the conversion you add 32 but your value is twice as big as it should be and so you have to add 64. Consider 20C, the chip will return 40 which gets divided by 2 and so 20 is displayed. When you multiply the 40 by 9, divide by 5 and add 64 you get 136 which will be displayed as 68F. Doing it without it being doubled, 20*9/5+32=68 which is correct. Mike. | |
| |
| | #17 |
|
Is this an LM75 or LM75A? I was wondering why you were shifting 7 bits and your calcs were different until I realized I was using the 11bit return from the LM75A.
__________________ Mark Higgins | |
| |
| | #18 | |
| Quote:
The code is a little lazy, it shifts the MSB left 8 so the sign bit is in the correct position and then shifts right 7 to preserve the sign. Mike. | ||
| |
| | #19 |
|
im using the lm75BD (not A) Also if i divide the number by 2 is the 64 needed?
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #20 |
|
Can you post the circuit how you interfacing the LM75 to PIC pin? What PIC you using, can you measure the voltage at the output pin of LM75 with and without connecting it to the PIC A/D input? -Raj Experiments with PIC16F628A | |
| |
| | #21 |
|
sure but in a bit. i haveto get son from daycare. You just reminded me about ADCON1 there... i need to check if i set it to digital. im sure i did but heh you never know. The LM75 i got was a sample. They sent me 2 for free since i buy from mouser a lot. The MCU im using is a PIC18F2525. Im using the SCL and SDA lines i think .. i know its RC3 and RC4. The Address lines A0:A2 are grounded. Not pull down (straight to gnd). The GND is gnd and the VS+ is 5v. The OS line isnt connected at all. Ill make a schematic when i come back ok. or maybe now since i got 30 min until i leave. Let me see if i can draw one up fast.
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #22 |
|
Here is my schem:
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #23 |
|
using: Code: temp*=9;
temp/=5;
temp+=64;
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #24 | |
| Quote:
I wouldn't mind seeing all the code again to see if I can figure out what's going on. I'm having trouble fitting the pieces that have been posted together. Pommie's code is using 9bits, which gives 0.5 deg resolution. I'm using 11bits, but I don't need to convert to Fahrenheit so calculation is not such a big deal for me.
__________________ Mark Higgins | ||
| |
| | #25 |
|
Ill post a zip: The Proteus stuff is just crap from another project heh dont mind it
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #26 |
|
ok i replaced the IC with the second one and it shows 52.5F with ground and 81.5F with out gnd
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #27 |
|
I don't see anything specific with the code itself. Does the temp reading change when you put your finger on the chip to warm it up, or is the reading static? My Math is terrrible. I'll put your fahrenheit conversion into my own code tonight and try it out. I have to say, using the logic analyser with the protocol analysis has made this kind of debugging so much easier for me. I gave up on so many of these things before I was able to just look at what I was getting and have it explained using the analysis software what's going on.
__________________ Mark Higgins | |
| |
| | #28 |
|
heh i need to get me one of those : Saleae Logic. The Logic Analyzer, Remastered. Now shipping for $149 But never remember to save the money for it heh.... The temp is always fluctuating from 81F-82.5F When i place my finger on the device it changes a few degrees to about 83F-85F
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #29 | |
| Quote:
- Raj Experiments with PIC16F628A | ||
| |
| | #30 |
|
Thanks tho Raj.. I like the fact you tried to help at least. i rather have someone jump in than just look heh ... thanks againNice Blog!
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics Last edited by AtomSoft; 14th October 2009 at 05:01 PM. | |
| |
|
| Tags |
| lm75 |
| Thread Tools | |
| Display Modes | |
| |
Similar | ||||
| Title | Starter | Forum | Replies | Latest |
| interfacing Atmel Microcontroller AT89C51 with LM75 | umar abdul sattar | Micro Controllers | 0 | 28th June 2003 06:27 AM |