qinhong WROTE:In the schematic diagram given, what is the function of R1 and R2? what what Q1 model is required?
qinhong WROTE:Besides, i don't understand the sample code given. is it using C++ or C# ?
qinhong WROTE:thanks... my project is about connecting water level sensor, moisture sensor and rain sensor together and control them by PIC16F. the thing that 1 worry is will the PIC suitable to connect all of them? the current and voltage supply enough or not?
qinhong WROTE:~ why rain sensor need to connect to digital input?
qinhong WROTE:~ what is means by interrupts? where i can get all these programming ?
'qinhong WROTE:~ do u have any product suggestion about the solenoid valve that use to control the water passage in piping system?
qinhong WROTE:sorry, im very poor in practical...
;configurations
LIST P=pic16F877A,W=-302
#include <p16f877a.inc>
__Config 0x3D72; HS MODE, WDT OFF, BOREN
BANK_0 EQU 0X00
BANK_1 EQU 0X80
BANK_2 EQU 0X100
BANK_3 EQU 0X180
ORG 0X00
;program starts
movlw B'111111' ;//set all pin as input
BANKSEL BANK_1 ;//activate bank 1
movwf TRISA ;//copy w to TRISA
movlw B'00000000' ;//Set all pin as output
movwf TRISB ;//copy W to TRISB
movlw B'10000000' ;//send 1 to pin 7
BANKSEL BANK_0 ;//activate bank 0
movwf PORTB ;//copy W to PORTB (LED at RB7 ON)
Loop goto Loop
END
Users browsing this forum: No registered users and 9 guests