Hi, Here is a snippet from something I saw a while back. I have the files I can send you. It appears that the URL link is dead. However the email address might be good. I think I have the source code somewhere. ++++++++++++++++++++++++++++++++++++++++++++++++Description: This project describes a basic pocsag encoder system utilizing a microchip 16C84 micro controller. The system is specifically designed to encode multiple pre-programmed numeric messages to pocsag compatible pagers. An external rf-transmitter section is required for this function, and that rf section is deliberately omitted from this documentation (you are on your own). Disclaimer: This source code is provided on an 'as is' basis for educational purposes only. No guarantee is provide or implied for any implementation or purpose. I do not assume any liability for any business loss, property loss, personal loss, personal injury, or any other kind of loss (I don't want to hear about your dog). Use at your own risk! And specifically do not use for any life support or other safety related purpose. SO THERE! Copyright: Poc_code.asm is copyright Henry Carl Ott (that's me). You are free to use it in non-commercial applications. Any commercial or for profit use requires specific permission from me. Credits: Basically the inspiration for the project came from the rx pager design by Dejan Kaljevic. His code does pocsag decoding. If you want to learn about pocsag decoding, take a look at: http://www.geocities.com/SiliconValley/Horizon/6063/) Unfortunately pocsag encoding requires an entirely different approach so I had do just about everything from scratch. Most of the subroutines are modified microchip app notes, but I also got a lot of great tips and ideas from the pic microcontroller discussion list. Too many to mention individually, a really great bunch of guys. Look to: http://www.myke.com/piclist/ for a good faq and subscribe instructions for the list. All of the truly awful code in the design is mine alone. NOTE: If you need to know the specifics of the pocsag protocol, this is not the place. I suggest you do some additional searching on the web. Operation: The source code is written to assemble under MPLAB, it may require minor modification to assemble properly in other design environments. The hardware consists only of the pic, a 3.6864 crystal, and the rs-232 interface. See the included schematic for pin assignments. The program has two basic modes of operation. 1. The stand alone encode mode. When you press a button a pocsag message is generated. 2. The program mode. While connected to a dumb terminal the cap code and other pager specific information is pre programmed in to 16c84's eeprom. The buttons do nothing. Programming: The 16c84 has 64 bytes of eeprom. This memory is used to store 4 paging 'profiles'. Each profile contains all the information to generate a single pager message. The profile contains: the pager cap code (or pin), the message function (0,1,2,3), the message baud rate (512,1200,2400), a flag to determine if the output data should be inverted, and an optional numeric message (at the moment 5 digits max). So here we go: Hook up the completed unit to any rs-232 terminal (or program) configured 9600 8N1. Hit any key and you should get a '.' prompt. At this point you can hit 'x' (case does count) to exit back into the encode mode, or hit 'p' to program a specific profile. If you don't hit anything the program will exit back into the encode mode on it's own after about 20 seconds. If you are in the program mode you will be asked to enter the profile data. PROFILE= ; select a specific pager profile to update 0 - 3 (no error checking here) CAP= ; a valid 7 digit decimal cap code (no error checking) FUNC= ; the page function bits 0-3 BAUD= ; the baud rate to transmit 0=512 1=1200 2=2400 INV= ; 0=normal output data, 1= inverted output data MSG? Y/N ; if this profile contains a numeric message. If no, a tone only page will be generated. ; if yes, you will be prompted to enter a 5 digit message. spaces an d '-' are supported. If you make a mistake or wish to cancel hit a non valid key and you will get another '.' prompt and will have to start over. NOTE that if you screw up in the middle of a profile, that whole profile will me marked invalid. But the other profiles will be left untouched. You can configure four completely different profiles to activate 4 different pagers, or send four different messages to the same pager. Encoding: After you exit the programming mode, or if you are in the default mode at power up, pressing one of the buttons will generate a pocsag message for the profile that is associated with that button. The PTT line is asserted to key up a connected rf transmitter. after a .25 second delay (approx) the encoded batch data is shipped out the poc_data pin. The PTT line is de asserted Note that in this prototype no input conditioning is attempted (debounce). The intent is that you can re-write the main routine to handle any sort of input device. That's all folks. There's plenty of room for improvement, if you add on any gee wiz functions or find any bugs please be sure to drop me a line. Have fun, and if you have any questions send me some mail at: carlott@interport.net PCS Engineering Norman Gillaspie 325M Sharon Park Dr. #210 Menlo park, Ca. 94025 Tel 650-854-5263 Fax 650-854-5445 KF6WHG Email norman@pcseng.com > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Mike Cornelius > Sent: Thursday, September 02, 1999 7:57 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [OT] Pager Transmitter > > > Hi Andres, > > This is actually quite simple, the standard paging protocol is known as > POCSAG, do a web search and you should be able to find details. > Basicly paging transmissions consist of a preamble (512 alternating bits > from memory) followed by a number of codewords which consists of > 21 bits of > data followed by 11 bits of CRC (This may not be exactly right as > it's been > 4 years since I looked at the protocol). > Actual RF transmision is simple FM FSK. A 1 is FC +4.6Khz A 0 is FC - > 4.5Khz. > > The encoding side of things for your app could be done with a > 12C508, I can > help you with code if you like, although I don't actually have code for > POCSAG specificly but I do have something very similar (in fact it would > have been POCSAG but I needed more bits per codeword). > > The transmission side is pretty easy too, there are plenty of rf > modules out > there you could use or build your own. > > In terms of licence regs I'm not sure about regs in the USA but > in Australia > there are a number of options depending on whether you need in > house or wide > area coverage. Naturally enough though you won't be able to use the same > freq as an existing wide are provider. > > Regards, > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Mike Cornelius Internet: mike@bytethis.com.au > Byte This Interactive Phone: +61 2 9310-2157 > PO Box 1342 Strawberry Hills FAX: +61 2 9319-3948 > NSW 2012 Australia URL: http://www.bytethis.com.au > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > -----Original Message----- > > From: pic microcontroller discussion list > > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Andres Tarzia > > Sent: Thursday, 2 September 1999 12:12 > > To: PICLIST@MITVMA.MIT.EDU > > Subject: [OT] Pager Transmitter > > > > > > Hi all! > > > > I am designing a PIC-based alarm system. The instrusion > detection is easy. > > The local alarm is very easy too. > > > > But I'd like to include some form of remote alarm. I was > thinking about a > > regular pager as the alarm receiver, but I don't know how to > transmit data > > to it. Does anybody knows how to send an alert to a pager? > Please, without > > using the phone. I mean a Pager Transmitter like the one that carrier > > companies have, only smaller. Provided that one can build/adquire the > > equipement, is it legal? Does the FCC allows you to transmit in > the Pager > > frequencies? Or are they restricted? Do you need some kind of licence? > > > > Thank you for your help. > > > > Regards, > > Andres Tarzia > > Tecnology Consultant, SMART S.A. > > e-mail: atarzia@smart.com.ar > > >