Close or Esc Key

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

8051 Serial Rx Seems Stuck?

2 posts / 0 new
Last post
Ivan's picture
Last seen: 9 months 3 weeks ago
Joined: 12/12/2017 - 23:44
8051 Serial Rx Seems Stuck?


I've been tasked with trying to debug someone's 8051 mcu program. The 8051 interfaces with a max232 serial chip to output and receive values from a keyboard and display messages to a computer monitor. The main problem arises when the program will stop responding to keyboard inputs and the same prompt for user input repeats indefinitely after entering any keyboard value. When I modified the program to output what character it thought it was receiving, I noticed strange results. When the program bugs out, it seems to output the same character even though other keys are being pressed. I'm new to the forums and I would like to ask what more information would help paint a clearer picture of my issue? I'm not so sure where the problem may lie. I've thought that it might be a max232 chip issue, or a buffer that gets "stuck". Could it be a stack overflow issue? I added a counter that increments at the beginning of of each function and decrements at the end of a function to track exactly how deep I am calling functions. It never goes above 3, yet the problem persists. Thanks in advance for any replies.

Hari Prasaath K
Hari Prasaath K's picture
Last seen: 1 week 6 days ago
Joined: 20/01/2015 - 23:56
8051 Keyboard


Whether you have interfaced keyboard to the microcontroller using ps2 port or whether you are performing the normal serial interfacing operation. 

Check the below link for further info