blend
Electrical
- Jan 27, 2004
- 3
Hi,
My problem is that I can't threat my RS232's datas.
Here's my program in the first PIC16F877, then it will be send to a RF module:
er=0;
er2=0;
en1=0x20;
en2=0;
en3=0;
en4=0;
ena=0x02;
enb=0;
e=er+er2+en1+en2+en3+en4+ena+enb;
printf("%c",e);
//////////////////////////////////////////////////
and then xmit to
( module linx RF HP-2 )
//////////////////////////////////////////////////
then received to
( module linx RF HP-2 )
//////////////////////////////////////////////////
then the information is threated by PIC16F877
that's the program :
#include "16F877.h"
#include "stdlib.h"
#use delay (clock=20000000)
#include "gg_div.c"
#include "gg_lcd.c"
#include "gg_str.c" //librairie maison
#use Rs232 (baud=9600,xmit=pin_c6,rcv=pin_c7)
#include "stdio.h"
void main (void)
{
char e;
set_tris_c(0x80);
set_tris_d(0x00);
e=getch();
/////////////////////////////////////
But then, I can't use the code that I received .. I can see it on the oscilloscope .. but when I do e=getch() then printf("%c",e) It doesn't show up on the hyperterminal.
Maybe I have to modify the second program.
help me.
thanks.
-lp