Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Automatic control and display of Room temperature

Status
Not open for further replies.

AFTERDATE

New Member
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

**broken link removed**

+++++++++++++ (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
 
iam sorry

**broken link removed**

it just circuit in the link

thank you very much
 

Attachments

  • picture_120_103.jpg
    picture_120_103.jpg
    50.1 KB · Views: 666
That circuit cannot work as it has the RS line on the LCD disconnected. Your code suggests it should be connected to PortB,2.

Have a read of the sticky and look at some of the tutorials.

Mike.
 
You've also completely forgot about connecting MCLR also.

Good luck!
 
Status
Not open for further replies.

Latest threads

Back
Top