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 13:13
Read: 605 times


 
#186486 - Response
Responding to: Robert Revens'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      Dave McNamara      03/07/12 10:22      
   Couple of things at first glance...      Robert Revens      03/07/12 12:52      
      Response      Dave McNamara      03/07/12 13:13      
         OK      Robert Revens      03/07/12 14:09      
   what does the instruction spell out      Erik Malund      03/07/12 13:46      
      Instruction says      Dave McNamara      03/07/12 14:17      
         Got it      Dave McNamara      03/07/12 14:29      
            have a good read      Erik Malund      03/08/12 07:16      
               Nitgen FIM5360 module      Dave McNamara      03/09/12 11:46      
                  Not familiar with the module...      Robert Revens      03/09/12 14:03      
                     Boot up time...      Robert Revens      03/09/12 14:15      
                     Response      Dave McNamara      03/09/12 14:55      
                        Isn't boot time always time from reset or time from power-on      Per Westermark      03/09/12 15:10      
                           Ok      Dave McNamara      03/09/12 15:18      
                        SCON1...      Robert Revens      03/10/12 05:24      
                           Jumping from RET to Jump Start      Dave McNamara      03/10/12 07:43      
   Please Ignore last post, issue resolved      Dave McNamara      03/10/12 10:30      

Back to Subject List