[email protected]
Joined: 16 May 2006 Posts: 39
|
RS232 receive |
Posted: Fri May 19, 2006 12:06 am |
|
|
I am using PICDEM4 for an experiment which use LT1280 for RS232 interface. on/off pin (actice high) is connected to RB3.
A simple program
#include <16f628a.h>
#fuses nowdt, hs, nolvp
#use delay(clock=8000000)
#use rs232(baud=9600,parity=N,xmit=PIN_B5,rcv=PIN_B2,bits=8)
void main()
{
output_high(PIN_B3); // enable LT1280 on/off pin
printf("Enter a char");
while (true) {
c=getc();
putc(c);
}
}
It can send "Enter a char" to a pc BUT cannot receive any data from the pc.
I double checked the cable and LT1280 and confirmed they were working fine. I also tried this porgramwith 18F1320, the result is the same.
Any idea?
Thansks |
|