The WA2FNQ PBBS Monitor

Using the Parallax Basic Stamp



Problem:

Mail arrives on the local PBBS. There is no way to tell if you have mail waiting without turning on your computer and looking.

Solution:

The local PBBS regularly lists all the stations it has mail waiting for in a similar format as shown below:

  • WA2FNQ-4 ID:
  • MAIL: 13-Nov 23:30 Mailbox WA2FNQ Northport, N.Y.
  • 728 active messages. New messages for:
  • AA2XXX AB2XXX W2XXX WA2XXX WB2XXX K2XXX KA2XXX WA2FNQ N2XXX
  • Using the Parallax Basic Stamp, monitor and light an indicator when mail has arrived on the local PBBS.

    How it works:

    Hardware:

    The Basic Stamp is a small computer which will run programs written in PBASIC. The Stamp has 8 I/O pins, each of which may be assigned a specific function. For more information on the Basic Stamp and Stamp products check the Parallax web site at http://www.parallaxinc.com.

    The Stamp pin assignments for the PBBS Monitor are:

    Pin 0 is the RS-232 input from the TNC.

    Pin 1 is the RS-232 output to the TNC (not used).

    Pin 2 is a lamp output which will be pulsed high when mail arrives. This blinks the front panel LED.

    Pin 3 is a reset button input. This is momentarily set high by a front panel push button to reset the Stamp when you acknowledge that mail has arrived.

    Pin 4 starts an external hardware timer which sets a window in which the Stamp will accept MYCALL (your call letters). In this case the timer is a simple 555.

    Pin 5 is set high by the timer during the window.

    The rest of the pins are not used.

    Software:

    The beginning part of the routine sets up pins 2 and 4 as outputs and pins 3 and 5 as inputs. The state of pin 2 is set low to keep the front panel LED in an off state. Pin 4 is set high. It will be pulsed low to start the hardware timer.

    The main part of the routine looks for certain things that are part of the mail-waitng message. The first is the word "MAIL:". The second is the phrase "New messages for". If both these are received exactly, the Stamp will then pulse pin 4 low, starting the hardware timer. The timer will set pin 5 high for 7 seconds. This gives the Stamp a window in which to receive MYCALL. If MYCALL is not in the list of stations which have mail waiting, the routine will stop at this point and wait. The timer window will pass and pin 5 of the Stamp will return to a low state. If MYCALL is received after the timer window has passed, the routine will return to the beginning of the main part of the program. This will force the Stamp to go through the routine again, verifying if MYCALL has been received due to normal channel activity or is really part of the mail-waitng message.

    Once MYCALL has been verified as part of the mail-waiting message, the program will then continue on to the blk routine. This blinks the front panel LED by pulsing pin 2 high and monitors to see if pin 3 is set high by the front panel reset button. When the front panel button is pressed, pin 2 is set low turning off the front panel LED. The program returns to main and begins monitoring again.

    You will need to use your call letters for MYCALL and adjust what the Stamp looks for in the mail-waiting message to match your local PBBS.

    Also, check the current draw of the LED you plan to use as an indicator. You may need to use a lamp driver so as not to exceed the output current limitation of the Basic Stamp.

    The Basic Stamp monitor operates at 2400 baud, 8 data bits, no parity, 1 stop bit.


    The Program

  • 'Program for the Basic Stamp to monitor and indicate if there is mail
  • 'waiting on the local packet bulletin board.
  • 'Version 1.0 written by Jerry J. Mehrab WA2FNQ 1/13/95
  • output 2 '..................................................Set up inputs and outputs.
  • input 3
  • output 4
  • input 5
  • low 2
  • high 4
  • main: Serin 0,n2400,("MAIL:") '..........Monitor for start of mail-waiting string.
  • serin 0,2400n,("New messages for")
  • pulsout 4,1 '.............................................Start hardware timer.
  • serin 0,2400n,("MYCALL")'.................Monitors for MYCALL.
  • if pin5=0 then main '................................If call is received outside of the timer window, branch back to main.
  • read 255,b2 '............................................Get location of last program instruction.
  • b2=0 '.......................................................Clear b2 so it can be used by the button routine.
  • blk: high 2 '..............................................Blink front panel light.
  • pause 1000
  • low 2
  • pause 1000
  • button 3,1,10,10,b2,0,blk '.......................Monitor the reset push button.
  • low 2 '.......................................................Reset to the beginning of the program.
  • goto main

  • PBBS Monitor Schematics


    Return to the WA2FNQ Homepage