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.

ASKING ABOUTfire alarm using zigbee device..

Status
Not open for further replies.

berz_999

Newbie level 3
Joined
Aug 20, 2011
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
phil
Activity points
1,314
ASKING ABOUT fire alarm using zigbee device..

help me pls.. we are assign to work on the fire alarm using zigbee... when the end user sense that there is a hot temp it will send data to the coordinator and the coordinator will determine if the device will alarm or not.. asking for the program to the end user.. any reply would be great.
 

pic18 46LF20.. can i use the code of tahmid for temperature sensor code... like this one
l
l
v
program MC9700_Temp

dim LCD_RS as sbit at RC4_bit
LCD_EN as sbit at RC5_bit
LCD_D4 as sbit at RC0_bit
LCD_D5 as sbit at RC1_bit
LCD_D6 as sbit at RC2_bit
LCD_D7 as sbit at RC3_bit

LCD_RS_Direction as sbit at TRISC4_bit
LCD_EN_Direction as sbit at TRISC5_bit
LCD_D4_Direction as sbit at TRISC0_bit
LCD_D5_Direction as sbit at TRISC1_bit
LCD_D6_Direction as sbit at TRISC2_bit
LCD_D7_Direction as sbit at TRISC3_bit

dim ADRead as word
dim Temp as longword
dim vDisp as word[3]
dim Display as string[7]

main:
TRISA = $FF
TRISC = 0
PORTC = 0
LCD_Init()
LCD_Cmd(_LCD_CURSOR_OFF)
LCD_Cmd(_LCD_CLEAR)
LCD_Out(1, 1, "Temp:")
Display = "+125 'C"
while true
ADRead = ADC_Read(0)
if (ADRead > 102) then 'If temperature is positive
Temp = (100 * ( (10 * ADRead) - 1024 ) ) >> 11 'Get temperature
Display[0] = "+"
else 'If temperature is negative
Temp = ( (1024 - (10 * ADRead) ) * 100 ) >> 11 'Get temperature
Display[0] = "-"
end if
vDisp[0] = Temp div 100
vDisp[1] = (Temp div 10) mod 10
vDisp[2] = Temp mod 10
Display[1] = vDisp[0] + 48
Display[2] = vDisp[1] + 48
Display[3] = vDisp[2] + 48
LCD_Out(1, 8, Display) 'Show temperature
wend
end.
 
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top