We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I am using MAX232 to communicate with AT89C52 under the control of PC using VB programming. The problems are: 1. How I can check if MAX232 is working or not, (by checking LED, I know the serial receiving interrupt of AT89C52 was working). 2. Why the data received by MCU are all the same? 3. Does this mean MAX232 is not working? Would you give me some suggestions? Thank you for your help. .
ad 1.: with an oscilloscope ad 2.: because your MCU software is wrong, most likely --- but it's hard to tell if you don't say what the constantly received data actually is. ad 3.: no. If the MAX232 weren't working at all, you would most likely receive nothing at all.
"How I can check if MAX232 is working or not" If your 89C52 is socketed, try removing it from the socket and linking the Tx & Rx pins. You can then do a loopback test from your PC to confirm that the MAX232 is working.
"Why the data received by MCU are all the same?" Have you remembered to clear the RI interrupt flag in your ISR?