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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/09/12 11:46
Read: 930 times


 
#186531 - Nitgen FIM5360 module
Responding to: Erik Malund's previous message
Thanks Eric,

Ok, I now have my 25 bytes going through the serial port correctly and appearing on Realterm. I now have introduced my fingerprint module as stated in title to the MCU.

I am trying to sent the 25 bytes REQUEST_CONN: DB 7EH,00H,00H,00H,01H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,01H to the module, they are sucessfully transmitting from MCU to module but the module isnt responding by sending its specified 'ack' packet back to MCU.

I have a software package called 'EVTools' which allows me to interact with the module and set up baud rate etc and it works ok with that. I have connected the module and EVTools up to realterm so I can see what is being sent and received over CPU serial and it is exactly the same as what I am sending from my MCU.

Its been proved that the MCU is sending correct packet over serial port and also that the module does respond to this specific packet but only through EVTools and the baud rate is set @ 9600bps. MCU = C8051f020 (silicon labs)

My instructions for writing serial are correct my reading serial is below.

I have read the thread already posted in this forum but it doesnt help in this issue

Anybody with any experience with these modules?

Thanks

REQUEST_CONNECT:
;LOOP5:
			PUSH ACC
			CLR A
			MOV DPTR,#REQUEST_CONN				;MOVE DATA POINTER RQST_CONN TABLE
			MOV R0,#25					;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
			;DJNZ R1,LOOP5	
			MOV R1,#BUF				        ;LET R1 = LOCATION 40
			MOV R2,#25				        ;LET R2 = SIZE OF PACKET TO BE COUNTED (25)
			CLR A
			LCALL READ_TABLE_SERIAL                         ;CALL READ_SERIAL SUBROUTINE TO READ BYTES FROM SBUF1 WHICH ARE STORED IN RAM
			POP ACC
			RET

;=================================================================================================
;THIS SUBROUTINE WILL READ WHATS TRANSMITTED BACK FORM THE SERIAL PORTS (SBUF0) AND MOVE IT TO THE ACCUMULATOR
;=================================================================================================
READ_SERIAL:
TEST_RI:

			MOV A,SCON1
			ANL A,#01H		;TEST RI1 FLAG TO SEE IF A BYTE IS READY TO BE READ FROM PERIPHERAL DEVICE
			JZ TEST_RI
							
			MOV B,SBUF1		;MOVE VALUE IN SBUF TO B-REGISTER TO BE STORED IN RAM
													
			MOV A,SCON1		;CLEAR RI TO RECIEVE NEXT BYTE AND RETURN FROM ROUTINE
			ANL A,#0FEH
			MOV SCON1,A
			CLR A
									
RET
;===================================================================================================
;THIS SUBROUTINE TAKES EACH VALUE READ FROM SERIAL PORT (SBUF) AND STORES IT AT LOCATION SET BY REGISTER R0
;====================================================================================================

READ_TABLE_SERIAL:
NEXT_BYTE2:
		
			LCALL READ_SERIAL	;CALL SUBROUTINE
			MOV @R1,B		;MOVE VALUE IN B REGISTER TO LOCATION OF R1
			MOV B,#00H              ;MAKE B-REGISTER = 0 TO RECEIVE NEXT BYTE FROM SBUF1
			INC R1		        ;INCREMENT R1 TO ADD NEXT RECIEVED BYTE TO MEMORY
			DJNZ R2,NEXT_BYTE2      ;LOOP AROUND UNTIL R2 SO THAT 25 BYTES CAN BE STORED BEFORE ENDING SUBROUTINE
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