Pic16f628 hyperterminal connection
Sun Mar 16 2008, 11:40 pm
Hi. I want to send some characters to pc.
I set baud rate 9600 in the pic.Then connect tx pin to serials rx. but in hyperterminal doesnt appear anything.
Then i set baud 2400 in my pic program. and opened hyperterminal . got some character but wrong chrachter .i sent 1 but get gç :S
i also used max232 but nothing changed.
please help. what is wrong?
I set baud rate 9600 in the pic.Then connect tx pin to serials rx. but in hyperterminal doesnt appear anything.
Then i set baud 2400 in my pic program. and opened hyperterminal . got some character but wrong chrachter .i sent 1 but get gç :S
i also used max232 but nothing changed.
please help. what is wrong?
Mon Mar 17 2008, 01:52 pm
I recommend u to first check ur PC's serial port by shorting pin2 & 3 and send some characters via Hyper terminal. make sure u enabled the echo type character locally in settings->ASCII setup.
One more thing ground ur rx232 port's 5th pin with ur PC's 5th pin.
One more thing ground ur rx232 port's 5th pin with ur PC's 5th pin.
Mon Mar 17 2008, 07:35 pm
i tried. shorted 2&3. pins. then set baud rate 9600 and flow control hardware but when i send something nothing arrived.
Mon Mar 17 2008, 08:07 pm
ok means u checkd ur PC serial port...and since nothing is arrived in hyper terminal it means that there is some problem in ur PCs serial port...
did u select the correct COM port in PC???? to check that go to device manager-> Ports where u check the which port is assigned for serial port. And in hyper terminal select that port only and sort pin 2&3 of PC serial port and check again.
did u select the correct COM port in PC???? to check that go to device manager-> Ports where u check the which port is assigned for serial port. And in hyper terminal select that port only and sort pin 2&3 of PC serial port and check again.
Mon Mar 17 2008, 08:08 pm
ok. which baud rate must i use? and flow control must be hardware or none?
Mon Mar 17 2008, 11:27 pm
keep flow control none.
well if its working then you must see whatever you are typing.
try 115200 baud.
well if its working then you must see whatever you are typing.
try 115200 baud.
Tue Mar 18 2008, 05:42 pm
i tried if i press a key then comes the same one (without pressing enter)
so com port works.
now what is the problem?
so com port works.
now what is the problem?
Tue Mar 18 2008, 09:05 pm
i also used max232 but nothing changed.
You mean you even connected the PIC and PC without MAX232?
If so then your PIC's serial port may be busted.Try using a different PIC and also show us your code.
And remember never hook up the mcu's and PC's serial ports without a level converter.
Tue Mar 18 2008, 09:13 pm
but i only used pic's tx pin. so i can connect directly.if i use rx so i must use max232.
i connected pic's tx to serial 's rx and gnd to (-)
my program:
#include <16F628.h>
#use delay(clock=4000000)
#use rs232(baud=9600, xmit=PIN_b1, rcv=PIN_b2)
void main(){
for (;;){
putc('1');
}
}
i connected pic's tx to serial 's rx and gnd to (-)
my program:
#include <16F628.h>
#use delay(clock=4000000)
#use rs232(baud=9600, xmit=PIN_b1, rcv=PIN_b2)
void main(){
for (;;){
putc('1');
}
}
Powered by e107 Forum System