| ??? 06/09/00 11:07 Read: times |
#3127 - Serial Communication Simulation solved |
Dear friends,
I was strugling to simulate the serial i/o using DSCOPE i use to get the transmission ok the recieving part was not working at all. I stumbled across a new way to solve this problem SOLUTION: his is for those who are working with microvision1 of keil software. The program org 0000h jmp start org 0023 jmp timer start: mov scon,#50h mov tmod,#20h mov ie,#90h mov scon,#50h jmp $ ; run the timer wait for serial interrupt in infinite loop timer: jb ti,transmit jb ri,recieve reti transmit: clr ti reti recieve: mov a,sbuf clr ri reti this program is basically written for recieving simulation. This program will not accept data mov a,sbuf the value of sbuf will be 0 always. TO SOLVE THIS PROBLEM assemble this program link it to get the hex file. Then go to microvision 2 the C++ version of the assembler. when you want to recieve data type the value in the serial window 1 LO AND BEHOLD!!!! the ri flag is set it goes to the interrupt routine and acquires the data. Please suggest if there are any other ways of achieving the same .I am new to C++ type of assembly. Srikanth |



