Alarm - getting started
Posted: Thu Nov 03, 2011 7:14 pm
Hi everyone – just to let you know, this is my first time posting on the forum and whilst I am reasonably OK with the discreet component design and construction, I have absolutely no knowledge of micro-processors whatsoever but decided to purchase Flowcode4 and the Version 3 PICmicro development board ‘HP488-00-3’ to enable me to use PIC’s without getting involved with ‘programming’.
After many hours of reading through all the available Matrix Multimedia documentation and familiarising myself with all the basics concerning switches, LED’s, analogue inputs, the provided examples and web tutorials etc., I have reached the stage where I can programme a PIC successfully with an example as a start (even though I still don’t understand some of it!). I thought now would be a good opportunity to try using a PIC for a project which is currently my priority but - not for want of trying - I find it really difficult to see how to go about it. The nearest Flowcode4 example I have been experimenting with over several days is the ‘RFID EX9.fcf’ but I’m not having much luck and I really want to use the PIC16F88 – not the ‘16F877a’ which is being used in that example. I feel I may be on the wrong track and I realise now, how much more experience I need to use even this high-level approach so.... If anyone can enlighten me on the best approach I would be REALLY REALLY grateful!
Basically it is an alarm system with 12 inputs (using a single UART input pin into the PIC). The object is simply to use the PIC16F88’s output pins to light just ONE out of 12 LED’s on a ‘first-up’ alarm basis and hold it (ignoring any further inputs until ‘system reset ‘ which for my purposes is power ‘off’ then ‘on’).
The ‘Received Input Signal Data Format’ (into the PIC) is a single 9600,N,8,1 Serial UART (sourced from a RF receiver module’s single output) and is composed of a ‘packet’ of 5 Bytes (taking approximately 5mSec) every 16mSec or so, therefore there is approx. 10 or 11 mSec HI after packet end and before ‘0’ start bit for the next packet. The ‘5 bytes’ indicate which of four RF Tx modules is sending an alarm and which of three inputs on each module is being activated (hence the 12 inputs). It can be seen therefore, that the PIC is required to have a pre-programmed reference for each module and each of the 3 inputs for the module. This is all provided in the 5 bytes: Byte 1, bits 4,5 and 6 give the activated input and Byte’s 2,3,4 and 5 give the module’s identification. All in binary at 0v to 3.6v. I am aiming to get the necessary reference data into the PIC by switching from ‘alarm’ to ‘set-up’ and closing each alarm contact for 4 sec one after the other.
Hopefully, that all makes sense!
Chris
After many hours of reading through all the available Matrix Multimedia documentation and familiarising myself with all the basics concerning switches, LED’s, analogue inputs, the provided examples and web tutorials etc., I have reached the stage where I can programme a PIC successfully with an example as a start (even though I still don’t understand some of it!). I thought now would be a good opportunity to try using a PIC for a project which is currently my priority but - not for want of trying - I find it really difficult to see how to go about it. The nearest Flowcode4 example I have been experimenting with over several days is the ‘RFID EX9.fcf’ but I’m not having much luck and I really want to use the PIC16F88 – not the ‘16F877a’ which is being used in that example. I feel I may be on the wrong track and I realise now, how much more experience I need to use even this high-level approach so.... If anyone can enlighten me on the best approach I would be REALLY REALLY grateful!
Basically it is an alarm system with 12 inputs (using a single UART input pin into the PIC). The object is simply to use the PIC16F88’s output pins to light just ONE out of 12 LED’s on a ‘first-up’ alarm basis and hold it (ignoring any further inputs until ‘system reset ‘ which for my purposes is power ‘off’ then ‘on’).
The ‘Received Input Signal Data Format’ (into the PIC) is a single 9600,N,8,1 Serial UART (sourced from a RF receiver module’s single output) and is composed of a ‘packet’ of 5 Bytes (taking approximately 5mSec) every 16mSec or so, therefore there is approx. 10 or 11 mSec HI after packet end and before ‘0’ start bit for the next packet. The ‘5 bytes’ indicate which of four RF Tx modules is sending an alarm and which of three inputs on each module is being activated (hence the 12 inputs). It can be seen therefore, that the PIC is required to have a pre-programmed reference for each module and each of the 3 inputs for the module. This is all provided in the 5 bytes: Byte 1, bits 4,5 and 6 give the activated input and Byte’s 2,3,4 and 5 give the module’s identification. All in binary at 0v to 3.6v. I am aiming to get the necessary reference data into the PIC by switching from ‘alarm’ to ‘set-up’ and closing each alarm contact for 4 sec one after the other.
Hopefully, that all makes sense!
Chris