Automatic control and display of Room temperature


Closed Thread
Results 1 to 2 of 2
  1. #1
    afterdate's Avatar
    afterdate Guest

    Default Automatic control and display of Room temperature

    hello to all

    could any one help me . i have this circuit
    and i want to do the PIC read the signal form the sensor and do compare like if the signal is 20 turn ON the Fan , and if the signal up 20 turn OFF the Fan and all this i want to shown in LCD. i have a code but does't work i know know why? if any one know what's wrong plz tell me. thank you very much
    all the best

    and i have a code or the program does't work i do't know.

    thank you very much

    http://rapidshare.de/files/16093626/...basic.doc.html

    +++++++++++++ (1)

    Device =16F877
    XTAL 4
    Declare LCD_DTPIN PORTB.4
    Declare LCD_ENPIN PORTB.3
    Declare LCD_INTERFACE 4
    Declare LCD_RSPIN PORTB.2
    Declare ADIN_RES 10
    Declare ADIN_TAD frc
    Declare ADIN_STIME 50
    Input PORTA.0
    ADCON1 = %10000000
    Dim volt As Float
    main:
    volt=ADIn 0
    Print At 1,1,@volt
    If volt=127 Then
    PORTC.0=1
    Else
    EndIf
    GoTo main

    ++++++++++++++++ (2)

    Device 16F877
    XTAL 4
    Output PORTB
    Symbol led = PORTB
    Dim I As Byte
    Main:
    led = 255
    DelayMS 500
    For I=0 To 7
    PORTB=PORTB << 1
    PORTB=led
    DelayMS 500
    Next I
    GoTo Main

    +++++++++++++++++++++++ (3)
    Device =16F877
    XTAL 4
    Declare LCD_DTPIN PORTB.4
    Declare LCD_ENPIN PORTB.3
    Declare LCD_INTERFACE 4
    Declare LCD_RSPIN PORTB.2
    Declare ADIN_RES 10
    Declare ADIN_TAD frc
    Declare ADIN_STIME 50
    Input PORTA.0

    Output PORTB
    Output PORTC

    Dim var1 As Byte
    Dim volt As Byte
    main:
    var1=ADIn 1
    volt= var1
    GoSub compar
    GoTo main
    compar:
    If var1 <150 Then
    PORTB.2=1
    Else
    PORTB.2=0
    EndIf
    Return

    +++++++++++++++++++ (4)
    Device = 16F877
    XTAL 4
    Declare LCD_DTPIN PORTB.4
    Declare LCD_ENPIN PORTB.3
    Declare LCD_INTERFACE 4
    Declare LCD_RSPIN PORTB.2
    Dim x As Float
    Dim y As Float
    y=58.5
    x=665.25
    label:
    Print At 1,1,"hi man"
    DelayMS 1000
    Print At 2,1,Dec y
    GoTo label
    Attached Images Attached Images  

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Melabs Picbasic forum couldn't help... Crowhnhill PROTON forum will
    www.picbasic.org/forum
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Replies: 2
    Last Post: - 14th July 2008, 22:11
  2. Need idea hove to..?
    By phoenix_1 in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 14th May 2008, 18:41
  3. ISD4003 & 16F877 Interface
    By sayzer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 26th December 2006, 17:50
  4. Automatic control and display of Room temperature
    By afterdate in forum mel PIC BASIC
    Replies: 9
    Last Post: - 7th April 2006, 00:19
  5. select case question
    By ronjodu in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 12th March 2006, 10:01

Members who have read this thread : 1

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