??? 03/09/12 18:46 Read: times |
#186531 - Nitgen FIM5360 module Responding to: ???'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 |
Topic | Author | Date |
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 |