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


Results 1 to 6 of 6

Threaded View

  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

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