Good Morning,
I have been playing around with MicroCode Studio this morning trying to learn something today. Anyhow I have built a serial keypad board and a serial relay board for experimenting with PicBasic Pro. In this way I can learn as I build. On the relay board I have some relays set to be momentary and the rest I am just toggling. When I send from the keypad to the relays that I want to be on only when the key is pressed they just stay on. When I press the one that toggle they work great. I thought that each time data was received and then branched the output would change as they do with the ones set to toggle. While holding down the switch for the relays that toggle they switch on, off, on, etc.... but the one for momentary they stay on constant. Any ideas what I am doing wrong? Thanks for all your help.
The Pic I am using is a 16f628a i was using a 16f84a. Here is the code.

define osc 4
INCLUDE "MODEDEFS.BAS"
@ DEVICE MCLR_ON, INTRC_OSC, WDT_Off, LVP_OFF, BOD_OFF, PWRT_ON, PROTECT_Off
CMCON=7
keydata VAR byte
serpin VAR porta.1
PORTA = 0
PORTB = 0
trisa = %00000010
trisb = %00000000

PAUSE 100 ' settle time

loop:

gosub loop1
branch keydata, [rly1,rly2,rly3,rly4,rly5,rly6,rly7,rly8]
GOTO loop

rly1:
HIGH PORTB.6
pause 50
GOTO loop

rly2:
HIGH PORTB.1
pause 50
GOTO loop

rly3:
HIGH PORTB.2
pause 50
GOTO loop

rly4:
HIGH PORTB.3
pause 50
GOTO loop

rly5:
HIGH PORTB.4
pause 50
GOTO loop

rly6:
toggle PORTB.5
pause 250
GOTO loop

rly7:
TOGGLE PORTB.6
PAUSE 250
GOTO loop

rly8:
toggle PORTB.0
pause 250
goto loop