PDA

View Full Version : who can let me knw where can i send out the temperature data out?



slimpeng
- 17th January 2008, 12:21
Hello i want to send out the temeperature data out at portc.6 so wat is the commnet i should to choose it and can u write down in my programming and at the portc.6 is my transmitter so the comment should is wat...and i want every 5s the data will display at LCD and send the data out again.....who can help me...pls........



DEFINE debug_mode 0 ' Debug sending True serial data
DEFINE debug_reg portc ' Debug Port = PortC
DEFINE debug_bit 6 ' Debug.bit = PortC.6
DEFINE debug_baud 9600 ' Default baud rate = 9600
DEFINE osc 4 ' We're using a 4 MHz oscillator
DEFINE ADC_BITS 8
DEFINE ADC_CLOCK 1 ' Set A/D clock Fosc/8
DEFINE ADC_SAMPLEUS 50 ' Set A/D sampling time @ 50 uS
DEFINE LCD_DREG PORTB
DEFINE LCD_DBIT 4
DEFINE LCD_RSREG PORTB
DEFINE LCD_RSBIT 0
DEFINE LCD_EREG PORTB
DEFINE LCD_EBIT 1
DEFINE LCD_BITS 4
DEFINE LCD_LINES 2
DEFINE LCD_COMMANDUS 2000


LCDOUT 254,1
LCDOUT 254,2, "WELCOME MY"
LCDOUT 254,192,"TEMP IS:"

TRISC=255
TRISD=0
TRISB=0
B0 VAR BYTE

LOOP:
ADCON1=0
ADCIN 0,B0
if b0=0 then OUTT
IF B0=10 THEN OUT
IF B0=20 THEN OUT1
IF B0=30 THEN OUT2
IF B0=41 THEN OUT3
IF B0=51 THEN OUT4
IF B0=61 THEN OUT5
IF B0=71 THEN OUT6
IF B0=81 THEN OUT7
IF B0=92 THEN OUT8
IF B0=102 THEN OUT9

OUTT:
LCDOUT 254,201,"<0'C"
GOTO LOOP

OUT:
LCDOUT 254,201,"5'C "
GOTO LOOP

OUT1:
LCDOUT 254,201,"10'C "
GOTO LOOP

OUT2:
LCDOUT 254,201,"15'C "
GOTO LOOP

OUT3:
LCDOUT 254,201,"20'C "
GOTO LOOP

OUT4:
LCDOUT 254,201,"25'C "
GOTO LOOP

OUT5:
LCDOUT 254,201,"30'C "
PORTD=32
GOTO LOOP

OUT6:
LCDOUT 254,201,"35'C "
GOTO LOOP

OUT7:
LCDOUT 254,201,"40'C "
GOTO LOOP

OUT8:
LCDOUT 254,201,"45'C "
GOTO LOOP

OUT9:
LCDOUT 254,201,"50'C "
GOTO LOOP
end

skimask
- 17th January 2008, 15:08
Hello i want to send out the temeperature data out at portc.6 so wat is the commnet i should to choose it and can u write down in my programming and at the portc.6 is my transmitter so the comment should is wat...and i want every 5s the data will display at LCD and send the data out again.....who can help me...pls........



AND AGAIN, nobody, except for you, knows what sort of temperature sensor you are using, or for that matter, if your bluetooth transmitter is actually a serially driven part or what!
MORE INFORMATION!
Assuming that the temperature sensor that you are using actually puts out an analog voltage value which, in effect, directly translates to a binary equivalent of temperature, and the bluetooth module you are using is actually a serially driven module, and your are using a parallel mode LCD, and you have all of your hardware connected correctly (i.e. crystal, MCLR pullup, if used, power connections, ground connections, and so on and so on), then the program I wrote for you in the other thread in Post #2, should work.
But AGAIN, I have no idea what sort of hardware we are dealing with here!
Has any of this sunk in yet?

slimpeng
- 17th January 2008, 17:25
and i using the 16F877A PIC and the sensor i using ptc type of sensor moduel gc-c103 and and i using voltage dividul rule and i will connet in to poartA.0 and ADC convert after that the LCD will show out the temperature value after get the value i using Bluetooth module to transmitter out the value to another receiver.......and i using code studio software to writing this programme and burn on the pic is use ICpro...

skimask
- 17th January 2008, 18:44
and i using the 16F877A PIC and the sensor i using ptc type of sensor moduel gc-c103 and and i using voltage dividul rule and i will connet in to poartA.0 and ADC convert after that the LCD will show out the temperature value after get the value i using Bluetooth module to transmitter out the value to another receiver.......and i using code studio software to writing this programme and burn on the pic is use ICpro...

Well, then, there you go.
Except for the distinct possibility that the temperature curve won't be right, the program should work as I wrote it.

Next question...Have you tried? What are your results?

slimpeng
- 19th January 2008, 02:47
i try already the comment u write for me....all thing can working on simulator there...and i not yet try on my hardware because my pic give me burn ad so now need to waiting are new one caming...so i jst can try....thanks u so much to helpping me....

skimask
- 19th January 2008, 07:30
i try already the comment u write for me....all thing can working on simulator there...and i not yet try on my hardware because my pic give me burn ad so now need to waiting are new one caming...so i jst can try....thanks u so much to helpping me....

A simulator?
You have got to be kidding me!
All this crap because you can't get it working on a simulator!
Give me a break!
Talk about leaving out KEY information.