Connections:
Operation:
How the project works?
The complete pseudo code with necessary comments is as given
org 00h
mov r0,#01h ; initialize the counter to count no. of interrupts
sjmp over ; jump above the interrupt subroutine
org 0013h ; interrupt 1 subroutine location
mov ie,#00h ; disable interrupt first
clr p0.0 ; interrupt indication on green led
inc r0 ; increment counter
acall delay ; call 0.1 sec delay
setb p0.0 ; reset green led
cjne r0,#02h,nxt2 ;if counter is 2 then decrease speed be one step (15 V)
mov p0,#0fbh
mov p1,#04h ; give indication on second red led
sjmp out
nxt2: cjne r0,#03h,nxt3 ; if counter is 3 then decrease speed be two step (12 V)
mov p0,#0f7h
mov p1,#02h ; give indication on third red led
sjmp out
nxt3: cjne r0,#04h,nxt4 ; if counter is 4 then decrease speed be three step (9 V)
mov p0,#0efh
mov p1,#01h ; give indication on fourth red led
sjmp out
nxt4: cjne r0,#05h,out ; if counter is 5 then stop the train
mov p0,#0feh
mov p1,#00h ; indicate it by green led.
out: acall dely ; call 2 sec delay every time when speed is changed
mov ie,#84h ; enable interrupt again
reti ; return from interrupt
over:mov p1,#01h ; main program starts from here starts train with min speed
acall dely ; and gradually increase it to max in four step
mov p1,#02h ; with 2 sec delay in between
acall dely
mov p1,#04h
acall dely
mov p1,#08h
mov p0,#0fdh
mov ie,#84h ; enable the interrupt
here: sjmp here ; continue loop
delay:
mov r6,#64h ; 0.1 sec delay
lop2:mov r5,#0FAh
lop1:nop
nop
djnz r5,lop1
djnz r6,lop2
ret
dely:
mov r7,#15h ; 2 sec delay
lop5:mov r6,#64h
lop4:mov r5,#0FAh
lop3:nop
nop
djnz r5,lop3
djnz r6,lop4
djnz r7,lop5
ret
end
by
Ashutosh M Bhatt
www.multyremotes.com
Description :
This is the one stop educational site for all Electronic and Computer students. If you want to learn something new then we are here to help. We work on Microcontroller projects, Basic Electronics, Digital electronics, Computer projects and also in basic c/c++ programs.
#Home #Sitemap #Resources #Terms of Use
Copyright©2012 electrofriends.com All Rights Reserved
Contact:info@electrofriends.com
sir, i am doing project on intelligent train so i want all it’s component list nd procedure tat how to make it and also which is better in intelligent train using pic microcontroller or 8051 microcontroller……………… plz thanq.
if any1 want pcb design contact me, id-rohitwr20@gmail.com
and also component list
I AM DOING BTECH APPLIED ELECTRONICS AND INSTRUMENTATION…I WOULD LIKE TO DO THIS PROJECT
BUT I HAVE SOME DOUBT ABOUT “IR LED” AND IR SENSOR [TSOP]
1.WHAT IS THE RANGE OF IR LED ?
2.WHAT IS PROPER RANGE OF TSOP?
3. WHAT IS THE DISTANCE BETWEEN THE IR LED AND TSOP?
4.IN OUR PROJECT WE FACE SMALL PROBLEM ,TRANSMITTER CIRCUIT AND RECEIVER CIRCUT HAVE INDIVIDUAL OUTPUT. BUT TSOP IS NOT SENSING THE IR BEAM.
I HUMBLY REQUEST YOU TO PLZ REPLY THIS MSG
what will happen, if the red signal gets on when the train is very close to the signal pole? how our project will handle this situation..
Plz answer as soon as possible..