?? avr_pocsag.txt
字號:
July-2000
Description:
This project describes a basic pocsag encoder system utilizing a Atmel
90S2313 micro controller. The system is designed to encode strings from a console device
or to send one of two pre-programmed messages (stored in eeprom) to pocsag compatible
receivers. The design will also encode ascii strings to Morse code (I had the code space)
An external compatible rf-transmitter section is required for this function, and
that rf section is deliberately omitted from this documentation (you are on your own here).
Copyright:
avr_pocsag.asm is copyright Henry Carl Ott N2RVQ. It is made available for educational,
and non-commercial use. Commercial use forbidden without license from author.
Code may be modified as long as it is released publicly and credit is given to the original
author(s). Questions, comments or offers of cash? Email:carl@fightlikeapes.com
Disclaimer:
This source code is provided on an 'as is' basis for educational purposes only.
No guarantee is provided 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. Use at your own risk!
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/ (if his site is still up). The asc2bin
routine is a modified/limited version of a routine by Jack Tidwell as made available in his
avrmath.asm code. Credit is also given to everyone who made example AVR code available on
the net for me to learn how to program these Atmel processors.
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. Resources abound.
Operation:
The assembled and programmed circuit should be attached to a rs-232 device,
default communications is 9600,8,n,1.
Please see companion documentation for schematics.
The unit will respond to several serial command and to two hardwired inputs.
The hardwired inputs are currently configured to send one of two eeprom stored messages.
**************************************************************************
Serial command syntax:
Commands are not case sensitive.
The standard prompt is '.'.
At the prompt the unit accepts following commands:
'P' sends a complete pocsag message from console
syntax:P,[capcode],[function],[baud],[invert],[msg_type],[message][cr]
examples>
P 1234567,0,2400,N,A,This is a test[cr] ; alpha message
P 0001231 1 1200 I N 555-1212[cr] ; numeric message
P,0001111,3,512,N,T[cr] ; a tone only message (beep)
'S' Sends a previously stored message from eeprom
Syntax:S[1-2][cr]
examples>
S1[cr] ; sends stored message 1
S2[cr] ; sends stored message 2
'G' Get and store a complete message profile (no transmission will occur).
syntax:G[1-2],[capcode],[function],[baud],[invert],[msg_type],[message][cr]
examples>
G1 1234567,0,2400,N,A,This is a test[cr] ; store alpha message in eeprom location 1
G2 0001231,1,1200,I,N,555-1212[cr] ; store numeric message in eeprom location 2
G1,0001111,3,512,N,T[cr] ; store tone message in eeprom location 1
'M' Sends console string as Morse code
syntax:M [message][cr]
examples>
M Pocsag transmitter ID NOCALL[cr]
'R' Sets sending speed for Morse encoded messages. Value = dit length in .01 seconds
syntax:M [value][cr]
examples>
W 10[cr]
W 4[cr]
NOTE: Value = dit length in .01 seconds. Default is 5. Value is not stored during power off.
Values between 4 and 10 seem to yield the best results.
'D' Set Debug mode. In debug mode pogsag data is dumped to console while transmitting.
Syntax:D[0-1][cr]
example>
D0[cr] ; debug off
D1[cr] ; debug on
'I' Check status of transmit inhibit sense signal.
syntax:I[cr]
Returns '0' or '1'[cr][lf]
******************************************************************
Message augments: All arguments are mandatory except message data.
[capcode] - 21 bit message address. Range=16 - 2097151 decimal.
[function] - 2 bit function address. Range=0-3.
[baud] - Baud rate of message to send. 512,1200,2400
[invert] - Indicates polarity of data transmission. I=invert data. All else, true data.
[msg_type] - Type of message to transmit A=Alphanumeric data, N=Numeric data, T=Tone Only
[message] - Actual data to be transmitted. Maximum length is determined by storage.
EEprom stored messages maximum of 58 chars.
Console strings are limited by the 80 char string buffer,
max message length = bufflen less all arguments.
NOTES:
Numeric messages will have the ascii data translated to standard numeric data type.
Valid characters are, '0-9' '[' ']' '-' ' ', invalid characters will be converted to spaces.
In a tone only message any data will be ignored, command strings should be terminated with cr.
Data fields are separated by a valid delimiting character. Currently either ',' or ' '.
*********************************************************************
Transmitter interface:
This information is deliberately left vague. You should know how to attach these signals and
and adjust the transmitter for proper deviation. If not, then please get the assistance of
someone who does.
The unit has 4 signal lines to the transmitter:
PTT: Pulled to ground via 2n7000 FET.
TX_INHIBIT: Device will not attempt to transmit while this line is low.
CW_OUT: Tone out for Morse data. Attach to mic input. Adjust VR1 for proper level.
POCSAG_OUT: Pocsag data output. MUST directly modulate output frequency.
Usually attaches where PL,DPL,DCS would be inserted. At low baud rates you
may also have to modulate the reference oscillator.
That's all folks. I know the documentation is a little lite, please refer to the code
for additional information. 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.
email:carl@fightlikeapes.com
http://users.rcn.com/carlott/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -