Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Problem with Max232 while communicating DB9 in proteus

Status
Not open for further replies.

u_know_who

New Member
Showing logic conflict at the output of max232. Any idea?

View attachment 65937

Source code :

#INCLUDE <P18F4520.INC>
ORG 100H
MOVLW 0x20
MOVWF TXSTA
MOVLW D'15'
MOVWF SPBRG
BCF TRISC,TX
BSF RCSTA,SPEN
OVER MOVLW A'G'
S1 BTFSS PIR1,TXIF
BRA S1
MOVWF TXREG
BRA OVER
END
 
hi,
Whats the purpose of U3 inverter on the output of the MAX232.??
 
The DB9 model ALREADY has the max232 level taken care of...... You don't need the max chip..

You connect RXD to Rx of the pic and TXD to tx of the pic....

When you come to actually build the circuit, you maybe in for a surprise.

Bloody simulators can be useful but teach you nothing.
 
I have connected the inverter between max232 and db9 since the output from max232 is inverted one.
Compim already has max232 lavel taken care of? I didn't know that.
However, i have found the problem is behind. Its from the output of pic.
Look at the pic. Logic conflict from the output of pic. I am newbie in serial communication. Please help.
View attachment 65947
source code:
#include <p18f4520.inc>
org 0h
movlw b'00100000'
movwf txsta
movlw d'15'
movwf spbrg
bcf trisc, tx
bsf rcsta, spen
over movlw a'y'
call trans
movlw a'e'
call trans
movlw a's'
call trans
movlw 0x0
call trans
bra over
trans
s1 btfss pir1, txif
bra s1
movwf txreg
return
end
BAUD RATE : 9600
XTAL FREQ: 10MHZ.
 
Last edited:
My bad. i have to connect TX from mcu to RX of virtual port. Now it works. can see yes in virtual terminal.
heres the picture.
View attachment 65948
Now i have another problem. After giving connection to DB9 (compim in proteus) i want to see the output in RealTerm (win7) with Virtual Serial Port. But i can't see the output there.
View attachment 65949
Can anyone help me in this part?
 
Last edited:
I have com0com overriding com4 and com5 ( You have to override com4 as it say's its already a port )
I set the DB9 model to com4, then set hyper terminal to com5..

But I don't know why you are doing this, because the terminal window in Proteus is doing pretty much the same..
I only use it with VB6 and C#, to model an input from a serial device.

Connecting through a virtual port behaves EXACTLY the same as using the term in Proteus.. So I don't know why you are having issues.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top