Hi Joe,
Does the receiver still fail to boot sometimes?
No, so far so good 
You may need to add some character pacing scheme and or send data X # of times to insure reception.
Did that...well...sort of...
Here's the RX code
Code:
'****************************************************************
'* Name : RXDemo.BAS *
'* Author : [select VIEW...EDITOR OPTIONS] *
'* Notice : Copyright (c) 2008 [select VIEW...EDITOR OPTIONS] *
'* : All Rights Reserved *
'* Date : 01-06-2009 *
'* Version : 1.0 *
'* Notes : Demo for SureElectronics RF modules *
'* : 16F88 *
'****************************************************************
CCP1CON = %00000000 ' Disable CCP
SSPCON.5 = 0 ' Disable SSP Module
ANSEL = %00000000 ' Set analog ports to digital mode
CMCON = %00000111 ' Turn off comparator
TRISA=%00100000
TRISB=%00000100
'*****************************************************************************
'DEFINEs
'*****************************************************************************
DEFINE OSC 4
@ DEVICE PROTECT_OFF
@ DEVICE CCPMX_OFF
@ DEVICE DEBUG_OFF
@ DEVICE WRT_OFF
@ DEVICE CPD_OFF
@ DEVICE LVP_OFF
@ DEVICE BOD_OFF
@ DEVICE MCLR_OFF
@ DEVICE PWRT_ON
@ DEVICE WDT_ON
@ DEVICE XT_OSC
'*****************************************************************************
' DEFINE LCD pins
DEFINE LCD_DREG PORTA
DEFINE LCD_DBIT 0
DEFINE LCD_RSREG PORTB
DEFINE LCD_RSBIT 1
DEFINE LCD_EREG PORTB
DEFINE LCD_EBIT 0
DEFINE LCD_BITS 4
DEFINE LCD_LINES 4 ' # of Lines on LCD, 1 or 2 (Note: use 2 for 4 lines)
DEFINE LCD_COMMANDUS 2000 'lcd delay us
DEFINE LCD_DATAUS 50 ' Data delay time in us
'*****************************************************************************
'debug defines
INCLUDE "modedefs.bas"
DEFINE DEBUG_REG PORTB
DEFINE DEBUG_BIT 3
DEFINE DEBUG_BAUD 19200
DEFINE DEBUG_MODE 1
define DEBUGIN_REG PORTB
define DEBUGIN_BIT 2
define DEBUGIN_BAUD 19200
define DEBUGIN_MODE 1
DEFINE DEBUG_PACING 10000
'*****************************************************************************
'PINS
adc var PORTA.0 '
a1 var PORTA.1 '
lcd1 var porta.2 '
lcd2 var porta.3 '
freq var porta.4 'pin8 of transceiver
BUT1 var porta.5 'Button1
xtal1 var porta.6 '
xtal2 var porta.7 '
B0 var portb.0 '
B1 var portb.1 '
RX var PORTB.2 ' out
TX var PORTB.3 ' in
lcd4 var portb.4 'Data pin for LCD
lcd5 var portb.5 'Data pin for LCD
lcd6 var portb.6 'Data pin for LCD
lcd7 var portb.7 'Data pin for LCD
'*****************************************************************************
'variables
maximo var WORD 'maximum value detected
minimo var WORD 'minimum value detected
media var WORD 'average
mediac var WORD 'total of records received - average count
km var WORD 'PowerOn counter
MA var WORD '
MI var WORD '
ps4 var WORD '
value var WORD 'value received
medres var WORD 'value sum for avg math
ADDR var word
ra var word
time var word
timex var word
MYDATA var word
'contants
Row1 CON 128 'constant for LCD line1
Row2 CON 192 'constant for LCD line2
Row3 CON 148 'comstant for LCD line3
Row4 CON 212 'constant for LCD line4
cl con 254 'constant for LCD clear line
clear
'*****************************************************************************
INCLUDE "lcdbarIN.bas"
DEFINE LCD4X20 1
'***********************************************************
INIT:
high tx
high rx
pause 400
lcdout $fe,1," RX demo "
lcdout $fe,$c0," ... "
pause 1500
if but1=1 then
goto chann
endif
man:
lcdout cl,row1," adc ", dec value
lcdout cl,row2," media ", dec media
rec:
debugin [wait ("ok"),dec MYDATA]
lcdout cl,row4, "received - ",dec MYDATA," "
goto REC
chann:
low freq
pause 50
while but1=1
debug $af, $20
wend
goto man
'
end
and the TX code
Code:
'****************************************************************
'* Name : TXDemo.BAS *
'* Author : [select VIEW...EDITOR OPTIONS] *
'* Notice : Copyright (c) 2008 [select VIEW...EDITOR OPTIONS] *
'* : All Rights Reserved *
'* Date : 01-06-2009 *
'* Version : 1.0 *
'* Notes : Demo for SureElectronics RF modules *
'* : 16F88 *
'****************************************************************
CCP1CON = %00000000 ' Disable CCP
SSPCON.5 = 0 ' Disable SSP Module
CMCON = %00000111 ' Turn off comparator
TRISA=%00100001
TRISB=%00000100
'*****************************************************************************
'DEFINEs
'*****************************************************************************
@ DEVICE PIC16F88, HS_OSC
@ DEVICE PIC16F88, MCLR_OFF
@ DEVICE PIC16F88, PROTECT_OFF
DEFINE OSC 10
@ DEVICE PIC16F88, CPD_OFF
@ DEVICE PIC16F88, LVP_OFF
@ DEVICE PIC16F88, BOD_OFF
@ DEVICE PIC16F88, PWRT_OFF
@ DEVICE PIC16F88, WDT_OFF
@ DEVICE PIC16F88, CCPMX_OFF
'*****************************************************************************
'ADC
DEFINE ADC_BITS 10 ' Set number of bits in result ( 8 or 10 bits )
DEFINE ADC_CLOCK 3 ' Set clock source (3=rc)
DEFINE ADC_SAMPLEUS 50 ' Set sampling time in uS
'*****************************************************************************
ANSEL=%00000001
ADCON1=%10000000 'no Vref - Right Justify
ADCON0=%11000001
'*****************************************************************************
' DEFINE LCD pins
DEFINE LCD_DREG PORTB
DEFINE LCD_DBIT 4
DEFINE LCD_RSREG PORTA
DEFINE LCD_RSBIT 3
DEFINE LCD_EREG PORTA
DEFINE LCD_EBIT 2
DEFINE LCD_BITS 4
DEFINE LCD_LINES 4 ' # of Lines on LCD, 1 or 2 (Note: use 2 for 4 lines)
DEFINE LCD_COMMANDUS 2000 'lcd delay us
DEFINE LCD_DATAUS 50 ' Data delay time in us
'*****************************************************************************
'debug defines
INCLUDE "modedefs.bas"
DEFINE DEBUG_REG PORTB
DEFINE DEBUG_BIT 3
DEFINE DEBUG_BAUD 19200
DEFINE DEBUG_MODE 1
DEFINE DEBUGIN_REG PORTB
DEFINE DEBUGIN_BIT 2
DEFINE DEBUGIN_BAUD 19200
DEFINE DEBUGIN_MODE 1
DEFINE DEBUG_PACING 10000
'*****************************************************************************
'PINS
adc var PORTA.0 'analog input
A1 var PORTA.1 '
lcd1 var porta.2 '
lcd2 var porta.3 '
freq var porta.4 'pin8 from transceiver
BUT1 var porta.5 'But1
Xtal1 var porta.6 'Xtal
Xtal2 var porta.7 'Xtal
B0 var portb.0 '
B1 var portb.1 '
RX var PORTB.2 ' in
TX var PORTB.3 ' out
lcd3 var portb.4 'Data pin for LCD
lcd4 var portb.5 'Data pin for LCD
lcd5 var portb.6 'Data pin for LCD
lcd6 var portb.7 'Data pin for LCD
'*****************************************************************************
'variables
maximo var WORD 'maximum value detected
minimo var WORD 'minimum value detected
media var WORD 'average
mediac var WORD 'total of records received - average count
km var WORD 'PowerOn counter
MA var WORD '
MI var WORD '
ME var WORD '
ps4 var WORD '
value var WORD 'value received
medres var WORD 'value sum for avg math
ADDR var word
ra var word
time var word
timex var word
MYDATA var word
'contants
p1a con $10
p1b con $e20
ctw CON $A0
Row1 CON 128 'constant for LCD line1
Row2 CON 192 'constant for LCD line2
Row3 CON 148 'comstant for LCD line3
Row4 CON 212 'constant for LCD line4
cl con 254 'constant for LCD clear line
clear
'*****************************************************************************
INCLUDE "lcdbarIN.bas"
DEFINE LCD4X20 1
'***********************************************************
INIT:
high rx
high tx
pause 400
lcdout $fe,1," TX demo "
lcdout $fe,$c0," ... "
pause 1500
debug $55
if but1=1 then
goto chann
endif
man:
high freq
me=0
for ra=0 to 15
adcin adc,value
pause 50
me=me+value
next ra
me=me/16
media=me
media=(media*/5000)>>2
lcdout cl,row1," adc ", dec value
lcdout cl,row2," media ", dec media
transmit:
lcdout cl,row4,"transmiting - ",dec value ," "
debug $55,"ok", dec value dig 3, dec value dig 2, dec value dig 1, dec value dig 0
goto man
chann:
low freq
pause 50
while but1=1
debug $af, $20
wend
goto man
end
Bookmarks