Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/09/02 20:40
Read: times


 
#19612 - RE: HELP ME........
Marco: I have run your code through my Pinnacle simulator multiple times. As your code stands the simulator crashes after about 5 passes through your program with an error indicating that a RETI has been executed without an interrupt beforehand. This is because your code, without the CLR TI command is single stepping through your interrupt routine as though it were your main, which there isn't any as Peter D. has been telling you. Without a main program to be interrupted from your program will continue to crash after several passes. I made two minor changes which resulted in the program outputting a continuous stream of characters to the UART, beginning with an upper case T.

Your code with the change:
ORG
LJMP MAIN
ORG 0023H
LJMP SPISR
ORG 0030H
MAIN: MOV TMOD,#20H ; TIMER 1 MODE2
MOV TH1,#-3 ; 9600 BAUD RATE
SET TR1
MOV SCON,#42H
MOV A,#054H
MOV IE,#90H
MAIN1: nop ;added do nothing main1 routine
nop
SJMP MAIN1
SPISR: CLR TI ; added clearing of TI
CJNE A,#7FH, SKIP
MOV A,#20H
SKIP : MOV SBUF,A
INC A
RETI

I hope this works out for you. Take strong heed of Craig's suggestions regarding your use of the accumulator.

Hal


List of 68 messages in thread
TopicAuthorDate
HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: I summary            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: I summary            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: In summary            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: In summary            01/01/70 00:00      
RE: In summary            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: In summary            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: MSN / ICQ            01/01/70 00:00      
RE: MSN / ICQ            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
the problem is same            01/01/70 00:00      
more            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: the problem is same            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: I summary            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: I summary            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: I summary            01/01/70 00:00      
What happened with......            01/01/70 00:00      
RE: this is no 50 !            01/01/70 00:00      
RE: this is no 50 !            01/01/70 00:00      
RE: What happened with......            01/01/70 00:00      
RE: What happened with......            01/01/70 00:00      
RE: What happened with......            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
We are keeping going.....            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
need help programming uart and adc in c            01/01/70 00:00      
Hi guys I here again            01/01/70 00:00      
RE: Hi guys I here again            01/01/70 00:00      
RE: HELP ME........            01/01/70 00:00      
It's working guys.........            01/01/70 00:00      

Back to Subject List