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.
Hi all, I have two files,as follows...when I simulate the sub routine is never executed. file 1(main.asm)
#include "rs_485.asm" org 0000h ljmp on_reset org 002bh on_reset: mov ie,#00h mov sp,#07h lcall rs_485_init ;initailise the serial communication end
rs_485_init: mov tmod,#20h ;timer 1 in mode2(auto reload) mov th1,#-3 ;reload value for 9600 baud rate mov scon,#50h ;8 bit,1 start,1 stop and REN enabled clr ti ;clear transmit interrupt flag clr ri ;clear receive interrupt flag setb tr1 ;Start timer 1 ret
"I'm posting it here so that It could help some one in future." Excellent! - That's the spirit! :-)