who can let me knw where can i send out the temperature data out?


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2008
    Posts
    28

    Default who can let me knw where can i send out the temperature data out?

    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
    Last edited by slimpeng; - 17th January 2008 at 11:43. Reason: forget adding the part

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by slimpeng View Post
    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?

  3. #3
    Join Date
    Jan 2008
    Posts
    28


    Did you find this post helpful? Yes | No

    Default

    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...

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by slimpeng View Post
    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?

  5. #5
    Join Date
    Jan 2008
    Posts
    28


    Did you find this post helpful? Yes | No

    Default

    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....

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by slimpeng View Post
    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.

Similar Threads

  1. Using Nokia LCD
    By BobP in forum mel PIC BASIC Pro
    Replies: 300
    Last Post: - 3rd May 2018, 04:47
  2. Nokia 3310 display text
    By chai98a in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 26th August 2007, 03:39
  3. Big characters on HD44780 4x20
    By erpalma in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th January 2007, 02:21
  4. LCD + bar graph
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 5th October 2005, 14:50
  5. Sinus calculating !
    By Don Mario in forum mel PIC BASIC Pro
    Replies: 29
    Last Post: - 28th November 2004, 23:56

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts