Hi, I am doing a project where I will control devices from VB6. But before I go to the top part, I would like to start from the bottom part first. I am trying to display the text sent by the PIC16f877a to the program but it won't display it. I'm using com2.
Here are the programs I used:
MikroC PRO for PIC
Proteus
Virtual Serial Ports Emulator
HyperTerminal 7 Private Edition.
Visual Basic 6.0
My mikroC code is:
VB6 code is:
I tried everything on Hyperterminal and everything works fine. But I have to run Virtual Serial Ports Emulator and create COM2 device for it to be visible on Hyperterminal. Without Hyperterminal, I'm using Virtual Terminal from Proteus and it displays the text "Test" which is sent by the PIC.
I've attached files below.
I hope you can help me. Thank you in advance.
Here are the programs I used:
MikroC PRO for PIC
Proteus
Virtual Serial Ports Emulator
HyperTerminal 7 Private Edition.
Visual Basic 6.0
My mikroC code is:
Rich (BB code):
void main()
{
UART1_init(9600); // initialize USART module
// (8 bit, 9600 baud rate, no parity bit...
while (1){
UART1_Write_text("Test"); // send data via USART
Uart1_write(10);
Uart1_write(13);
Delay_ms(4000);
}
}
Rich (BB code):
Private Sub Form_Load()
MSComm1.PortOpen = True
End Sub
Private Sub Form_Unload(Cancel As Integer)
MSComm1.PortOpen = False
End Sub
Private Sub Text1_Change()
End Sub
Private Sub Timer1_Timer()
Text1.Text = Text1.Text + MSComm1.Input
End Sub
I've attached files below.
I hope you can help me. Thank you in advance.
Attachments
-
85.2 KB Views: 265
-
28.5 KB Views: 305
-
1.6 KB Views: 238