Monu johar
Newbie level 5
I m using a dell laptop for serial comm. B/w 8051 uC. Also i am using usb2serial converter cable i.e DB9... I connected db9's 5th pin to gnd & 3 pin(db9) to 13 pin and o/p from 12th pin of max232N , and connect it(12th pin) to p3.0(rxt) pin of uC.
I want to receive the data bits only, but also i connected the txt(p3.1) pin in a similar way...(by looking in a ckt from google download)
I use 4 capacitors of 1uF/63V for max232 and also a 10uF capacitor in pin 16 to gnd..of max232..
Then i give about 4.45v as Vcc..
Also without connecting db9's pins and uC pins to max232. I only check max232 is working correct or not..it's working correct (i.e by checking loopback condition and also some other test, i am getting the desired voltages on specific pins)
this test i saw on ur site for checking.
Basically i m transmitting 8bits from matlab software by pc with start and stop bits
i.e
s=serial('com25');
set(s,'baudrate',9600,'databits',8,'parity','none','stopbits',1,'flowcontrol','none');
fopen(s);
fwrite(s,00001111,'uint','async');
fclose(s);
delete(s);
at a bundrate 9600bps.. When i send these bits to max232 & then uC(not directly), at max232 i put a led on pin 13, i saw that around miliseconds led glows... I use the program for uC as:-
ORG 000H
MOV TMOD,#20H
MOV SCON, #50H
MOV TH1,#-3
SETB TR1
CLR RI
HERE: JNB RI,HERE
CLR RI
MOV A,SBUF
MOV P2,A
SJMP HERE
END
this program i burn in 8051 using AT89C52 library...
Also the ossilator is 11.0592MHZ along with 33pf capacitors, and reset is given as 56kohm to gnd also to the 1uf/63v capacitor is attached with reset pin(-pin to reset , +pin to vcc)...and pin 31 i.e external access to vcc(4.45v) so to execute program from internal memory...at port2 there are 8 leds connected which initally glows at 1.68v nearly sometimes..sometimes more than this voltage... Basically my problem is that i m not getting the any output on port2 when i send data bits from my laptop..also initally the p3.0 pin is at 3.68v to 4.25v...initally means when no sending from lapii.. Where is the problem.
How to make it correct. Thankyou
I want to receive the data bits only, but also i connected the txt(p3.1) pin in a similar way...(by looking in a ckt from google download)
I use 4 capacitors of 1uF/63V for max232 and also a 10uF capacitor in pin 16 to gnd..of max232..
Then i give about 4.45v as Vcc..
Also without connecting db9's pins and uC pins to max232. I only check max232 is working correct or not..it's working correct (i.e by checking loopback condition and also some other test, i am getting the desired voltages on specific pins)
this test i saw on ur site for checking.
Basically i m transmitting 8bits from matlab software by pc with start and stop bits
i.e
s=serial('com25');
set(s,'baudrate',9600,'databits',8,'parity','none','stopbits',1,'flowcontrol','none');
fopen(s);
fwrite(s,00001111,'uint','async');
fclose(s);
delete(s);
at a bundrate 9600bps.. When i send these bits to max232 & then uC(not directly), at max232 i put a led on pin 13, i saw that around miliseconds led glows... I use the program for uC as:-
ORG 000H
MOV TMOD,#20H
MOV SCON, #50H
MOV TH1,#-3
SETB TR1
CLR RI
HERE: JNB RI,HERE
CLR RI
MOV A,SBUF
MOV P2,A
SJMP HERE
END
this program i burn in 8051 using AT89C52 library...
Also the ossilator is 11.0592MHZ along with 33pf capacitors, and reset is given as 56kohm to gnd also to the 1uf/63v capacitor is attached with reset pin(-pin to reset , +pin to vcc)...and pin 31 i.e external access to vcc(4.45v) so to execute program from internal memory...at port2 there are 8 leds connected which initally glows at 1.68v nearly sometimes..sometimes more than this voltage... Basically my problem is that i m not getting the any output on port2 when i send data bits from my laptop..also initally the p3.0 pin is at 3.68v to 4.25v...initally means when no sending from lapii.. Where is the problem.
How to make it correct. Thankyou