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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/07/12 20:13
Read: times


 
#186486 - Response
Responding to: ???'s previous message
Hi Robert,

Yes I am using Register 0 to set the count for the 25 bytes, code for where it is implemented in the subroutine is below it also calls WRITE_TABLE_SERIAL, R0 is set there, then decremented until = 0 in WRITE_TABLE_SERIAL

As for the accumulator it will hold the value 50H at the end of WRITE_SERIAL after bit TI is cleared. It doesnt necessarily need to be a specific value at end of WRITE_SERIAL because it will be overwritten once next byte is called (possibly bad practice?). I could maybe tell it to clear acc before it returns from subroutine in order for there to be no errors with the reading the next byte but single stepping didnt show any issues.

Another test, I tried to run it with another PC in my lab incase port was faulty on PC side, but got same results.

Sorry for not displaying all code at start.

Thanks

REQUEST_CONNECT:

			PUSH ACC
			CLR A
			MOV DPTR,#REQUEST_CONN				;MOVE DATA POINTER RQST_CONN TABLE
			MOV R0,#25H										;MOV R0 TO 25H TO ALLOW FOR THE 25 BITS IN TABLE
			LCALL WRITE_TABLE_SERIAL			;CALL WRITE_TABLE_SERIAL TO WRITE THE BYTES TO SBUF	
			MOV R1,#BUF										;LET R1 = LOCATION 40
			MOV R2,#25H										;LET R2 = SIZE OF PACKET TO BE COUNTED (25)
			LCALL READ_TABLE_SERIAL
			POP ACC
			RET

List of 17 messages in thread
TopicAuthorDate
Serial coms, bytes not matching in serial capture            01/01/70 00:00      
   Couple of things at first glance...            01/01/70 00:00      
      Response            01/01/70 00:00      
         OK            01/01/70 00:00      
   what does the instruction spell out            01/01/70 00:00      
      Instruction says            01/01/70 00:00      
         Got it            01/01/70 00:00      
            have a good read            01/01/70 00:00      
               Nitgen FIM5360 module            01/01/70 00:00      
                  Not familiar with the module...            01/01/70 00:00      
                     Boot up time...            01/01/70 00:00      
                     Response            01/01/70 00:00      
                        Isn't boot time always time from reset or time from power-on            01/01/70 00:00      
                           Ok            01/01/70 00:00      
                        SCON1...            01/01/70 00:00      
                           Jumping from RET to Jump Start            01/01/70 00:00      
   Please Ignore last post, issue resolved            01/01/70 00:00      

Back to Subject List