acidice333
Joined: 14 Oct 2006 Posts: 33
|
RS232 rcv problem |
Posted: Sat Oct 14, 2006 3:28 pm |
|
|
I'm having problems "receiving"... it transmits fine, but nothing happens when I press a key hence the LED doesn't go off.. I am using a breadboard, along with this RS232 interface (http://www.botkin.org/dale/rs232_interface.htm) using the internal clock (I hope?)
Code: |
#include <16F628A.h>
#fuses INTRC,NOPROTECT,NOLVP,NOMCLR,NOWDT,PUT
#use delay (clock=4000000)
#use rs232(baud=9600, xmit=PIN_B6, rcv=PIN_B7)
//========================
void main()
{
port_b_pullups(TRUE);
output_high(PIN_A2);
puts("Input: ");
putc(getc());
output_low(PIN_A2);
} |
|
|