Hi,
Tx of PIC is an output. But it is connected to RxOut, which is an output, too.
And Rx is an input ... and is connected to another input.
Klaus
You don't need MAX232 in Proteus. If you are connecting external UART device to Proteus then just use COMPIM and connect COMPIM's RXD to PIC RX and TXD to PIC's TX. The TTL level of PIC will work with COMPIM.
Also, You can connect two Virtual Terminals's RXD pins to TX and RX pins of PIC.
can't figure out how to combine the soft_uart code with my main code
Provide a link from where you got soft_uart code or is it that you cannot get the mikroC's Soft_Uart() library code working?
Zip and post your complete mikroC PRO PIC project and also the Proteus file.
I mainly use mikroC PRO PIC and Proteus for embedded development and I might be able to help you.
So, what is the new issue?
Getting garbage characters on Virtual Terminal of Proteus?
I asked you to zip and post complete mikroC PRO PIC project files. You just attached .mcppi (project file). Where are the other files of the project like .c file, .cfg file, etc,.. needed to open the project? .mcppi file alone doesn't comtain any source code. I need the full project files to check and fix if needed.
Soft_UART_Init([color=blue]&[/color]PORTC,7,6,9600,0); // TX=RC6, RX=RC7, Baud=9600
Soft_UART_Init(PORTC,7,6,9600,0); // TX=RC6, RX=RC7, Baud=9600
Okay, Susan.
@AboudaKing.
Fixed project attached.
There were two issues.
One is Proteus Virtual Terminaal cannot accept CR and LF (0x0D, 0x0A).
2nd is you were using this function
Code:Soft_UART_Init([color=blue]&[/color]PORTC,7,6,9600,0); // TX=RC6, RX=RC7, Baud=9600
as
Code:Soft_UART_Init(PORTC,7,6,9600,0); // TX=RC6, RX=RC7, Baud=9600
The '&' was missing in the function call.
You need Proteus 8.9 SP0 to open my file. Older versions of Proteius will not open it. Or refer included PDF file or attached image to correct the UART polarity for your simulation file.
about the first problem "Virtual Terminaal cannot accept CR and LF (0x0D, 0x0A)"
what do you mean i dont realy get it
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?