PDA

View Full Version : Nurse Alert System



Fidelis
- 9th November 2016, 20:49
8343




TRISA=%11111111
TRISB=%11111111
TRISD=%00000000
TRISE=000
PORTD=0
PORTE=0

ADCON1=7

PAUSE 1000

START:
IF PORTA.0=0 THEN GOSUB ROOM1
PAUSEUS 10
IF PORTA.1=0 THEN GOSUB ROOM2
PAUSEUS 10
IF PORTA.2=0 THEN GOSUB ROOM3
PAUSEUS 10
IF PORTA.3=0 THEN GOSUB ROOM4
PAUSEUS 10
IF PORTA.4=0 THEN GOSUB ROOM5
PAUSEUS 10
IF PORTA.5=0 THEN GOSUB ROOM6
PAUSEUS 10
IF PORTB.0=0 THEN GOSUB ROOM7
PAUSEUS 10
IF PORTB.1=0 THEN GOSUB ROOM8
PAUSEUS 10
IF PORTB.2=0 THEN GOSUB ROOM9
PAUSEUS 10
IF PORTB.3=0 THEN GOSUB ROOM10
PAUSEUS 10
GOTO START

ROOM1:
HIGH PORTE.0:HIGH PORTE.1
PORTD=$06
PAUSE 2000
PORTD=0
PAUSE 1000
PORTD=$06
PAUSE 2000
PORTD=0
PAUSE 1000
PORTD=$06
PAUSE 2000
LOW PORTE.0:LOW PORTE.1
PORTD=0
RETURN


ROOM2:
HIGH PORTE.0:HIGH PORTE.1
PORTD=$5B
PAUSE 2000
PORTD=0
PAUSE 1000
PORTD=$5B
PAUSE 2000
PORTD=0
PAUSE 1000
PORTD=$5B
PAUSE 2000
LOW PORTE.0:LOW PORTE.1
PORTD=0
RETURN

ROOM3:
HIGH PORTE.0:HIGH PORTE.1
PORTD=$4F
PAUSE 2000
PORTD=0
PAUSE 1000
PORTD=$4F
PAUSE 2000
PORTD=0
PAUSE 1000
PORTD=$4F
PAUSE 2000
LOW PORTE.0:LOW PORTE.1
PORTD=0
RETURN

ROOM4:
HIGH PORTE.0:HIGH PORTE.1
PORTD=$66
PAUSE 2000
PORTD=0
PAUSE 1000
PORTD=$66
PAUSE 2000
PORTD=0
PAUSE 1000
PORTD=$66
PAUSE 2000
LOW PORTE.0:LOW PORTE.1
PORTD=0
RETURN

ROOM5:
HIGH PORTE.0:HIGH PORTE.1
PORTD=$6D
PAUSE 2000
PORTD=0
PAUSE 1000
PORTD=$6D
PAUSE 2000
PORTD=0
PAUSE 1000
PORTD=$6D
PAUSE 2000
LOW PORTE.0:LOW PORTE.1
PORTD=0
RETURN

ROOM6:
HIGH PORTE.0:HIGH PORTE.1
PORTD=$7D
PAUSE 2000
PORTD=0
PAUSE 1000
PORTD=$7D
PAUSE 2000
PORTD=0
PAUSE 1000
PORTD=$7D
PAUSE 2000
LOW PORTE.0:LOW PORTE.1
PORTD=0
RETURN

ROOM7:
HIGH PORTE.0:HIGH PORTE.1
PORTD=$07
PAUSE 2000
PORTD=0
PAUSE 1000
PORTD=$07
PAUSE 2000
PORTD=0
PAUSE 1000
PORTD=$07
PAUSE 2000
LOW PORTE.0:LOW PORTE.1
PORTD=0
RETURN

ROOM8:
HIGH PORTE.0:HIGH PORTE.1
PORTD=$7F
PAUSE 2000
PORTD=0
PAUSE 1000
PORTD=$7F
PAUSE 2000
PORTD=0
PAUSE 1000
PORTD=$7F
PAUSE 2000
LOW PORTE.0:LOW PORTE.1
PORTD=0
RETURN

ROOM9:
HIGH PORTE.0:HIGH PORTE.1
PORTD=$6F
PAUSE 2000
PORTD=0
PAUSE 1000
PORTD=$6F
PAUSE 2000
PORTD=0
PAUSE 1000
PORTD=$6F
PAUSE 2000
LOW PORTE.0:LOW PORTE.1
PORTD=0
RETURN

ROOM10:
HIGH PORTE.0:HIGH PORTE.1
PORTD=$BF
PAUSE 2000
PORTD=0
PAUSE 1000
PORTD=$BF
PAUSE 2000
PORTD=0
PAUSE 1000
PORTD=$BF
PAUSE 2000
LOW PORTE.0:LOW PORTE.1
PORTD=0
RETURN


END



Ten rooms Nurse alert system. I hope someone finds it useful

Demon
- 9th November 2016, 22:08
Nice.

Maybe resistors on those LED segments?

Robert

Fidelis
- 10th November 2016, 12:27
Thanks Robert, yes in real life, limiting resistors will be needed.

BobK
- 12th November 2016, 00:55
Hi Fidelus,
Are you planning on using this commercially? If so you might want to contact U.L. for the requirements for getting a U.L. listing which will be required by your customer's insurance company. 10 years ago I designed, built, and installed a system that covers an emergency pull cord system and a check in system for 160 apartments and asked the customer for their specific requirements. He didn't provide any so they got a pretty nice system without spending a lot of money on U.L. testing. This should really be left up to the companies that make systems for this purpose.
BobK

richard
- 12th November 2016, 02:56
some thoughts

what happens if two or more rooms signal simultaneously ?
what happens if the nurse is absent/distracted for more than 6 seconds ? there is no record or indication of a calls source or that a call ever happened .
do all rooms have equal priority ?

Fidelis
- 13th November 2016, 06:15
Thanks guys,
The System presented here is really basic and has no record for missed events. However, making it into a commercial system will not be a bad idea, i think.
Thanks.

Demon
- 16th November 2016, 23:35
Ideas on certification:

http://electronics.stackexchange.com/questions/97130/ul-ce-csa-certification-for-low-voltage-electronics-led-product