Hi there,
I am using a serial port on my pc sending the data via an rs232 chip to a 16f913
Below is my code that shoed reply with the message number and the cell number but nothing happens any suggestions
[CODE]
INCLUDE "MODEDEFS.BAS"

DEFINE OSC 20 ' Define crystal as 20Mhz

'*Serial port Setup 9600 8N1*
DEFINE HSER_BAUD 9600 ; 9600 Baud
DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
DEFINE HSER_CLROERR 1 ; Clear overflow automatically

'*ADC setup*
DEFINE ADC_BITS 10 'SETS NUMBER OF BITS IN RESULTS 8,10,12
DEFINE ADC_CLOCK 3 'SETS CLOCK SOURCE (RC = 3)
DEFINE ADC_SAMPLEUS 50 'SETS SAMPLING TIME IN MICROSECONDS

'This Part set PORTA 0-5 an analog inputs
ADCON1 = %01110000 'FRC (clock derived from a dedicated internal oscillator = 500 kHz max)
ANSEL = %00011111 'The ANSEL (91h) and CMCON0 (9Ch)registers must be initialized to configure an
CMCON0 = %00000111 'analog channel as a digital input. Pins configured as analog inputs will read ‘0’.
TRISA = %00011111 'set PORTA 0-5 as inputs
ADCON0.7 = 1 'Right justify output of ADC datasheet P145 of 16F913

TRISC = %10000000 'Set PORTC for serial coms and pins as output
TRISB = %00000000 'Sert PORTb as outputs and for use with the ICD2

INTCON = 0 ;Disable interrupts


V1 var WORD
ID var byte[28]

PORTC = 0

loop:
'ADCIN 0,V1
HSERIN [WAIT("^SMGL:"),SKIP 1 ,str ID\28]
HSEROUT ["MES NO:",dec ID[0],10,13]
HSEROUT ["CELL NO:",dec ID[17],dec ID[18],dec ID[19],dec ID[20],dec ID[21],dec ID[22],dec ID[23],dec ID[24],dec ID[25],dec ID[26],10,13]

goto loop

END
[END CODE]