Close or Esc Key

Arduino Projects   |   Raspberry Pi   |   Electronic Circuits   |   AVR   |   PIC   |   8051   |   Electronic Projects

How to interface computer's Serial Port (RS232) with 8051 microcontroller (AT89C51) Error.,, Help !!

21 posts / 0 new
Last post
Mikel
Mikel's picture
Offline
Last seen: 3 years 7 months ago
Joined: 06/05/2011 - 05:37
How to interface computer's Serial Port (RS232) with 8051 microcontroller (AT89C51) Error.,, Help !!

Hello, I am using a 8051 Microcontroller development board in which has a 40 Pin P89V51RD2 Microcontroller in it , 4 LEDs connected to its Port 1 , and 4 switches connected to Potr0.

I saw the program "How to interface computer's Serial Port (RS232) with 8051 microcontroller (AT89C51) " in this website, and I burnt the hex file of the above program to my MC. The program worked right with Hyper Terminal Software, but the problem is now I cant erase or re-program my Microcontroller with another program. i.e When I try to burn an another program's hex file, the MC is not responding properly. It throws me an error message as "Unable connect", or "Unable recieve/Send" or sometimes "failled to read device signature". Everytime I tried to burn a new hex file only the 4 LEDs turns On/Off , Even if press the Reset Key nothing happens. I tried lot of ways , but I am not able burn a new hex file.

Please someone help me with this problem.   The image of the Dev board I am using is below:

<I am using "Keil u-Vision" for programming, and "Flash Magic" to burn the hex file.[[wysiwyg_imageupload:5157:]]>

Amrith
Amrith's picture
Offline
Last seen: 4 years 6 months ago
Joined: 23/04/2012 - 16:57
Hi mikel,I faced the same

Hi mikel,

I faced the same issue once. Here is the solution 

1. Power up the board & press RESET switch for 30 seconds & release it.

2.Now try to program your controller.

3. If you find the same problem then see the oscillator value in the tools setting, the value shouls match external oscillator value used.

Kindly let me know which tool are you using for dumping the hex file in controller. Furthe quries please share.

Mikel
Mikel's picture
Offline
Last seen: 3 years 7 months ago
Joined: 06/05/2011 - 05:37
Thanks Amrith for your

Thanks Amrith for your suggestions, but I had tried it earlier it didn't work. I found out the solution for this problm i.e :

 

1. Switch OFF the MC kit , connect it to the PC with serial cable .

2. (I am using "Flash magic" software to burn/dump hex file). Run the Flash magic software and Press start button to start burning the hex file.

3.When the software asks for "Reset the Device into ISP mode" , just Switch ON the MC kit.

4. This will flash/re-program the Mc kit , and Mc will start to work again normally.

 

And 1 more thing is that I had made some adjustments in the Flash magic Soft i.e : in Options - Advanced Options- Misc- I had tick marked "Disable signature Checking" and "Erase all Flash using Pages" buttons. I un-marked them after my Mc started working properly.

 

:)

Amrith
Amrith's picture
Offline
Last seen: 4 years 6 months ago
Joined: 23/04/2012 - 16:57
Hi Mikel,Thanks for the

Hi Mikel,

Thanks for the description of the solution. This may help others, really appreciate your work.

Lui Yat Ming
Lui Yat Ming's picture
Offline
Last seen: 4 years 2 months ago
Joined: 20/09/2011 - 08:09
 I also saw the program "How

 I also saw the program "How to interface computer's Serial Port (RS232) with 8051 microcontroller (AT89C51) " in this website,  and  IIIiIIIIIIIII   

I use the Keil C emulator to run the C progran on 8051 board which is connecting to PC through UC232A ( a device of rs232 (9 pin device) to USB (insert to PC)).

When I type the Keyboard on PC, There is no any 'char' shown on the Hyperterminal.

But I change the program which is download from ]]>http://www.keil.com/forum/933]]> , I can see the result on Hyperterminal.

By the way , I am not fully understand some sentance in C program such as P1=value & P2=P1-32 for what function and I could not see P1 & P2 port connection in the circuit.

Thanks for help!

Lui Yat Ming
Lui Yat Ming's picture
Offline
Last seen: 4 years 2 months ago
Joined: 20/09/2011 - 08:09
 I also saw the program "How

 I also saw the program "How to interface computer's Serial Port (RS232) with 8051 microcontroller (AT89C51) " in this website. But I try this experiment as follows: but I am fail.

I use a Keil C emulator to run the C prohram mentioned in about paper on 8051 board which is connected to PC through a device UC232A ( RS232 to UAB cable). when I type the Keyboard of PC, there is nothing to see on Hyperterminal.

I change the C peogram which dowdload from ]]>http://www.keil.com/forum/933]]> and run the program. I got the result as expectation.

Also I do not understand that some sentance such as P1=value and P2=P1-32 in C code.

Please help !

YM Lui 

Lui Yat Ming
Lui Yat Ming's picture
Offline
Last seen: 4 years 2 months ago
Joined: 20/09/2011 - 08:09
Dear Mr.Amrith, I have some

Dear Mr.Amrith,

I have some questions on your paper,  But I can not reach you by this website. my email address: ymlui@hotmail.com. if available, Please contact me.

Thanks

YM Lui

Lui Yat Ming
Lui Yat Ming's picture
Offline
Last seen: 4 years 2 months ago
Joined: 20/09/2011 - 08:09
  Dear Mr.Amrith, I have

 

Dear Mr.Amrith,

I have some questions on your paper,  But I can not reach you by this website. my email address: ymlui@hotmail.com. if available, Please contact me.

Thanks

YM Lui

Amrith
Amrith's picture
Offline
Last seen: 4 years 6 months ago
Joined: 23/04/2012 - 16:57
Hi YM Lui, Sorry for any

Hi YM Lui,

 

Sorry for any inconvenience caused. I was on holiday for some time.

Kindly post your quries, i will try to solve your doubts & issues.

Lui Yat Ming
Lui Yat Ming's picture
Offline
Last seen: 4 years 2 months ago
Joined: 20/09/2011 - 08:09
Thanks for your reply

Thanks for your reply first!

My problem has describled in reply many replies and write down my email address to you. ymlui@hotmail.com.

Please check Forum.

Lui Yat Ming
Lui Yat Ming's picture
Offline
Last seen: 4 years 2 months ago
Joined: 20/09/2011 - 08:09
Hi Amrith, Please see the

Hi Amrith,

Please see the Forum dated on 31/07/2012 & 01/08/2012. I have written my questions.

by the way , you may contact me by email: ymlui@hotmail.com

Amrith
Amrith's picture
Offline
Last seen: 4 years 6 months ago
Joined: 23/04/2012 - 16:57
Hi Lui..when you use

Hi Lui..

when you use any microcontroller there should be an proper C or assembly code to run it. Without C code you cannot generate your output.kindly refer "The 8051 Microcontroller And Embedded Systems Using Assembly And C" for learning C codes. 

 

Lui Yat Ming
Lui Yat Ming's picture
Offline
Last seen: 4 years 2 months ago
Joined: 20/09/2011 - 08:09
Hi Amrith, Thanks for your

Hi Amrith,

Thanks for your reply. My problem is follow your setting on Hypertermial, then you do not to run any program, you could see what your type char on PC display.

 

Also I do not understand that some sentance such as P1=value and P2=P1-32 in C code.

 

 

Amrith
Amrith's picture
Offline
Last seen: 4 years 6 months ago
Joined: 23/04/2012 - 16:57
Hi Lui,Follow below steps to

Hi Lui,

Follow below steps to get characters on hyperterminalwhen you type from key board

1. After selecting com port your are using & set the baudrate value to 9600(as mentioned in code), set the flow contolas none.

2. Go to file--> click on properties

[[wysiwyg_imageupload:5762:height=378,width=586]]

 

Step2:

[[wysiwyg_imageupload:5764:height=359,width=585]]

Step 3:

[[wysiwyg_imageupload:5765:height=356,width=582]]Select the tabs as ashow and click OK

Amrith
Amrith's picture
Offline
Last seen: 4 years 6 months ago
Joined: 23/04/2012 - 16:57
Kindly share the link of the

Kindly share the link of the C code your are using.

Lui Yat Ming
Lui Yat Ming's picture
Offline
Last seen: 4 years 2 months ago
Joined: 20/09/2011 - 08:09
Hi Amrith, Thanks again

Hi Amrith,

Thanks again help!

 

I use a Keil C emulator to run the C prohram mentioned in about paper on 8051 board which is connected to PC through a device UC232A ( RS232 to UAB cable). when I type the Keyboard of PC, there is to see the char display on Hyperterminal.

 

I change the C program which is dowdload from ]]>http://www.keil.com/forum/933]]> and run the program. I got the result as expectation.

 

Also I do not understand that some sentance such as P1=value and P2=P1-32 in C code of your paper.

 

May I use email for sent more information to you.

 

my email address: ymlui@hotmail.com.

Amrith
Amrith's picture
Offline
Last seen: 4 years 6 months ago
Joined: 23/04/2012 - 16:57
Hi lui,My mail is

Hi lui,

My mail is amrith.tins@gmail.com

krunal
krunal's picture
Offline
Last seen: 4 years 1 month ago
Joined: 15/02/2013 - 21:35
i am facing the same problem

i am facing the same problem as you have discribe...if your's is solved then please give me the solution...

thanks in advance

Anonymous
Anonymous's picture
p1= value " p1 stores the

p1= value " p1 stores the value what u type in the keyboard in the form of ASCII value "                                                            p2=p1-32  " p2 stores the value what u see in the keyboard i.e "ASCII value of the pressed key -32" ...."

Sanket shedge
Sanket shedge's picture
Offline
Last seen: 2 years 10 months ago
Joined: 22/02/2014 - 17:35
Hello, I am using a 8051

Hello, I am using a 8051 Microcontroller development board in which has a 40 Pin P89V51RD2 Microcontroller in it , 8 LEDs connected to its Port 0 

 

when i tried to dumping program using flash magic with creating hex file its ask for "Press Reset button for ISP mode" at that time my development bord is not Reseted/Responce.

 

And some time ask failed to read the device signature Unable to communicate Accessing device using wrong protocol......... Do you want to continue?

 

ple give me solution for this issiue.

 

And How to check my Development board is properly conneted with computer system?

ManiacEa
Anonymous's picture
SEO in London
Hi guys, found nice SEO company in London Thanks