Discussion in "PIC Microcontroller Discussion" started by    turker1    Mar 16, 2008.
Sun Mar 16 2008, 11:40 pm
#1
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?
Mon Mar 17 2008, 01:52 pm
#2
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.
Mon Mar 17 2008, 07:35 pm
#3
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
#4
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.
Mon Mar 17 2008, 08:08 pm
#5
ok. which baud rate must i use? and flow control must be hardware or none?
Mon Mar 17 2008, 11:27 pm
#6
keep flow control none.

well if its working then you must see whatever you are typing.

try 115200 baud.
Tue Mar 18 2008, 05:42 pm
#7
i tried if i press a key then comes the same one (without pressing enter)
so com port works.
now what is the problem?
Tue Mar 18 2008, 09:05 pm
#8

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
#9
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');

}


}
Tue Mar 18 2008, 11:50 pm
#10
hey what is wrong?

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Michailqfh
Fri Mar 29 2024, 01:53 am
Bobbyerilar
Thu Mar 28 2024, 08:08 am
pb58
Thu Mar 28 2024, 05:54 am
Clarazkafup
Thu Mar 28 2024, 02:24 am
Walterkic
Thu Mar 28 2024, 01:19 am
Davidusawn
Wed Mar 27 2024, 08:30 pm
Richardsop
Tue Mar 26 2024, 10:33 pm
Stevencog
Tue Mar 26 2024, 04:26 pm