Author |
Message |
Topic: LM35 temp sensor reading (10°C off) |
STIX
Replies: 18
Views: 38538
|
Forum: General CCS C Discussion Posted: Mon Jul 02, 2007 12:55 pm Subject: LM35 temp sensor reading (10°C off) |
LM35's also like to oscillate - many times this oscillation looks like a reading that is way off and/or not particularly stable. Check the output with a scope or put the voltmeter that Sherpa sugges ... |
Topic: LM35 temp sensor reading (10°C off) |
STIX
Replies: 18
Views: 38538
|
Forum: General CCS C Discussion Posted: Thu Jun 28, 2007 12:37 pm Subject: LM35 temp sensor reading (10°C off) |
Hi:
I connected a LM35 temperature sensor to my PIC16F877A MCU to take temperature readings. The following is my code:
#include <16F877A.h>
#device *=16
#device ADC=10
#include < ... |
Topic: Driver For SHT75 Temperature & Humidity Sensor |
STIX
Replies: 33
Views: 279563
|
Forum: Code Library Posted: Wed Jun 13, 2007 2:38 pm Subject: Driver For SHT75 Temperature & Humidity Sensor |
I used the same code on a SHT11, however I'm not getting any meaningful readout.
The temperature is showing -39.9C all the time.
The only thing that I've changed are the:
#define sht_data_pin ... |
Topic: Timer Questions |
STIX
Replies: 6
Views: 7528
|
Forum: General CCS C Discussion Posted: Fri Jul 14, 2006 11:46 am Subject: Timer Questions |
I did some experimenting and wrote a simple program to read my temperature sensor (LM35) for a period of 12 sec. I'm using Timer1 and internal clock with a prescaler value of 8 (timer overflow every ... |
Topic: Timer Questions |
STIX
Replies: 6
Views: 7528
|
Forum: General CCS C Discussion Posted: Wed Jul 12, 2006 1:47 pm Subject: Timer Questions |
By this do you mean continuously read a sensor for X seconds.
Yes, this is what I mean. Is the approach here to start the timer and then after x seconds, generate an interrupt? Can it be done wi ... |
Topic: Timer Questions |
STIX
Replies: 6
Views: 7528
|
Forum: General CCS C Discussion Posted: Wed Jul 12, 2006 9:48 am Subject: Timer Questions |
I have a couple of questions regarding the use of timers:
First, I want to read some sensor readings through the ADC for x amount of seconds. How do I use the timers to time my sensor reading peri ... |
Topic: Project Design |
STIX
Replies: 2
Views: 4629
|
Forum: General CCS C Discussion Posted: Wed Jun 28, 2006 9:10 am Subject: Project Design |
I'm designing a project that uses a PIC16F877A MCU. However, there are several steps in the project which I'm not sure on how to implement. I hope someone can point me in the right direction. The s ... |
Topic: Help with ADC |
STIX
Replies: 3
Views: 5574
|
Forum: General CCS C Discussion Posted: Wed Jun 21, 2006 10:32 am Subject: Help with ADC |
Thanks for the tip on setting the GO bit. But what does the "read = 0" suppose to do? I've never used Timer1 before, so could you clarify on how to use Timer1? Thanks again. |
Topic: Help with ADC |
STIX
Replies: 3
Views: 5574
|
Forum: General CCS C Discussion Posted: Wed Jun 21, 2006 9:29 am Subject: Help with ADC |
I have been trying to take a temperature sensor reading with the ADC on my pic16f877a MCU. The sensor is sensing room temperature (24�C), and in my code, a red LED is suppose to be turn on if the rea ... |
Topic: Connect LM35D temperature sensor to ADC |
STIX
Replies: 1
Views: 3531
|
Forum: General CCS C Discussion Posted: Mon Jun 19, 2006 1:58 pm Subject: Connect LM35D temperature sensor to ADC |
I have attached a LM35D temperature sensor to pin AN0 on my PIC16F877A microcontroller. The output of the sensor is connected straight to AN0. The sensor measures room temperature and the ADC on the ... |
Topic: Program problem |
STIX
Replies: 5
Views: 5927
|
Forum: General CCS C Discussion Posted: Sat Jun 17, 2006 5:18 pm Subject: Program problem |
I did this:
if ((float)dfloat const d[4] = {-1, 1, 1, -1}", so why do I have to cast "d" as a float again?
And why did:
if (d[k] > 0) work in the first place then? |
Topic: Program problem |
STIX
Replies: 5
Views: 5927
|
Forum: General CCS C Discussion Posted: Sat Jun 17, 2006 4:10 pm Subject: Program problem |
I'm having problem with this simple program below. When I try to compare the value in the array "d" to see if it is negative, the red LED does not come on. However, the green LED does come on for a ... |
|