Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to program 16F877A in BASIC PRO?

Status
Not open for further replies.

donnafe

Junior Member level 3
Joined
Feb 9, 2011
Messages
25
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,440
i will be making a project in-titled AUTOMATIC SHOWER. .in this project a shower showers water in a specified time. .which is included in th program. . plz help me in doing so. .
 

it really easy just make delay..
1 second = 1000ms
so if you want to turn on your shower every 1 hour,
just multiple by 60x60x1000=3600000

start:
delayms 3600000
portb.0 = 1
goto start
 

i will be making a project in-titled AUTOMATIC SHOWER. .in this project a shower showers water in a specified time. .which is included in th program. . plz help me in doing so. .

do you have a circuit diagramm for it to understand it well?

or you just writing a code that will act as a automatic shower ?
 

u need basic wiring for PIC..
then add relay to trigger your pipe valve..




15_1297327014.gif


Embed4u » pic16f877a circuit|embed4u.com
 

do you have a circuit diagramm for it to understand it well?

or you just writing a code that will act as a automatic shower ?



i dont have circuit diagram yet because. . i dont know how will i start my project. .

---------- Post added at 20:47 ---------- Previous post was at 20:46 ----------

thank you so much. .
 

i dont have circuit diagram yet because. . i dont know how will i start my project. .

---------- Post added at 20:47 ---------- Previous post was at 20:46 ----------

thank you so much. .

you can visit this website for help

**broken link removed**

this is an example of sensor tap which is almost just like automate shower...

imgres
 

lockman_akim. .can you please give me the specific values of the components??
 

usually for relay circuit..if you use the 5V relay, you can use 2n222 transistor, 1k base resistor, 1n4001 diode..the vcc is 5V..

this method is call sinking current..
you can refer on the net how sinking current work to aplified the current to trigger relay..
 
ok. . thank you so much
 

usually for relay circuit..if you use the 5V relay, you can use 2n222 transistor, 1k base resistor, 1n4001 diode..the vcc is 5V..

this method is call sinking current..
you can refer on the net how sinking current work to aplified the current to trigger relay..


lockman_akim. . i need your help again. . i'm going to use c language instead of basic. . i need the code on how to make a 5 minutes timer then when the timer reaches the first minute the water will flow w/ in 10 seconds then when it reaches the fifth minute the water will flow again. .



please help me. .
 

when it reaches the fifth minute the water will flow again. .

for how long?

---------- Post added at 15:49 ---------- Previous post was at 15:38 ----------

i dont know C but the concept is still the same with basic..

as you know, 1000ms = 1 sec

so for example:

loop:

delayms 60000
portb.0 = 1
delayms 10000
portb.0 = 0
delayms 230000
portb.0 = 1
delayms 10000
portb.0 = 0

goto loop
 

the water will flow for 10 sec. also. .
 

when it reaches the fifth minute the water will flow again. .

for how long?

---------- Post added at 15:49 ---------- Previous post was at 15:38 ----------

i dont know C but the concept is still the same with basic..

as you know, 1000ms = 1 sec

so for example:

loop:

delayms 60000
portb.0 = 1
delayms 10000
portb.0 = 0
delayms 230000
portb.0 = 1
delayms 10000
portb.0 = 0

goto loop



if portb.0=1??this means portb is set as an output??
 

yes..portb.0 must be set earlier as output.. wht i mean with portb.0 = 1 is

turn on portb.0..so you will get 5V to trigger relay..
code that i gave is in BASIC..
chnge it to C..
but CONCEPT is still the same..
 

CAN you give me the whole program??. . frm the very begining. . ???please. . please..it is badly neened. . in basic language. .
 

yes i'm going to use microbasic. . please help me. .
 

here the source code..
i made it using microbasic pro 4.15
 

Attachments

  • Edaboard.zip
    16.3 KB · Views: 87

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top