| Author |
Message |
mohannad100
Joined: 16 Jan 2008 Posts: 65 Location: iraq
|
21 Jun 2008 17:14 serial port connection failure |
|
|
|
hi every body
im working on microcontroller projects using AT89C52 and the interfacing with pc is done through serial port ,im using a 12Mhz crystal ,baud rate 9600
the problem is the connection doesnot exist and the serial port doesnot read any thing from my microcontroller program
i need every possible help please.
thanks alot.
|
|
| Back to top |
|
 |
medra
Joined: 15 Oct 2006 Posts: 99 Helped: 21
|
21 Jun 2008 20:22 Re: serial port connection failure |
|
|
|
dear mohannad, el salamo 3likom
I have attached a working hex file and the asm file for serial interfacing for AT89S52 it accepts a letter and sends the following letter, try it
if the problem still exists , you must check the conections.
|
|
| Back to top |
|
 |
mezo
Joined: 16 Jul 2007 Posts: 60 Helped: 2 Location: Egypt
|
18 Aug 2008 15:23 Re: serial port connection failure |
|
|
|
you can use the functions :inp, outp . knowing the port number .
Here is the code :
#include<stdio.h>
#include<conio.h>
int main(void) {
unsigned port = 0x378 // first pin in parallel port 0x378-0x37f
int value ;
value = outp(port,'c') // c is the number you'll send to LPT
printf("value %c sent to port %d\n", value, port);
return 0 }
send me if you need anything .
Last edited by mezo on 25 Aug 2008 9:45; edited 1 time in total |
|
| Back to top |
|
 |
amol_shah
Joined: 21 Apr 2008 Posts: 97 Helped: 12 Location: Nasik, Mumbai
|
|
| Back to top |
|
 |