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.
Hello, I need help with the serial communication, when I am sending data from PC (hyper-terminal) through RS232 , RI flag should rise to '1' and its does not happened, what may be the problem?
BTW, when I am programming the same device in the PLCC package the flag is triggered, I am currently use the VQFP package witch I have problem with.
I am using AT89C5130A uC.. I know that the pinout may be different , my pcb pinout schematic fine. when I am sending the data to the PC its work well. I am using the same oscillator (16MHz freq.). maybe I also need to check TI flag ?? again sending from the uC to the PC works well!
thanks for your help!
So, you checked off two of my items - same crystal frequency and correct baudrate to be able to send to the PC.
What about the other items I listed?
Knowing that the two packages have different pinouts isn't the same as having verified that the serial data signal is reaching the correct pin on the processor, and with correct voltage levels and timing. Have you used an oscilloscope and checked?
Yes I verified the connection on the processor. checked with oscilloscope voltage level seems fine 5V..
But, if the serial data is arriving at that pin, you would not just see a 5V voltage, would you?
What, exactly, do you see? Is it valid serial data?
my pcb pinout schematic fine. when I am sending the data to the PC its work well. totally irrelevant, the path for data TO the PC is not the same as data FROM the PC.
Erik
No, not totally irrelevant. If the PC can receive serial data, then its likely (but not certain) that the baudrate setting is correct. And it's likely (but not certain) that the logic levels used by the processor is compatible with the logic levels used by the RS232 tranceiver.
It is always good to measure the bit lengths with an oscilloscope and not just settle for "it receives". Having an 11.xxx crystal but having software computing the baudrate for a 12MHz crystal would mean that there is a baudrate error, but that both sides may manage to communicate anyway. Different UART allows more or less baudrate errors depending on how many samples they take during a bit, and how many low or high samples they require before deciding if they received a zero or a one.