mohamedbasheerkp
Newbie level 3
Hello all,
I am using SM-630 fingerprint module for my project. I have to interface it to PIC18f4550. I am using "mikroc pro for pic" compiler for my development purposes. But the module is not responding. As the datasheet suggested, I am using pullup resistor for tx pin. I interfaced to the computer and analysed using Realterm serial capture program. I tried to read the product id of the module both from PIC and PC. I used "0x4D 0x58 0x10 0x01 0x60 0x16" in order. but the module is not responding. I tried the following code to read the product id to the microcontroller.
I removed the declaration part of the code.
I received datas sending from the microcontroller in pc using RealTerm. But the module is not responding. I used PIC's internal usart module and mikroc library for usart. Also using LCD. In order to reduce code, here, I removed that part also. PIC is working in 20Mhz frequency. Any help is welcomed...
Thanks,
basheer
I am using SM-630 fingerprint module for my project. I have to interface it to PIC18f4550. I am using "mikroc pro for pic" compiler for my development purposes. But the module is not responding. As the datasheet suggested, I am using pullup resistor for tx pin. I interfaced to the computer and analysed using Realterm serial capture program. I tried to read the product id of the module both from PIC and PC. I used "0x4D 0x58 0x10 0x01 0x60 0x16" in order. but the module is not responding. I tried the following code to read the product id to the microcontroller.
I removed the declaration part of the code.
Code:
uart1_init(57600);
delay_ms(100);
uart1_write(0x4D); //packet head
while(!UART1_Tx_Idle());
uart1_write(0x58); //packet head
while(!UART1_Tx_Idle());
uart1_write(0x10); //command flag
while(!UART1_Tx_Idle());
uart1_write(0x01); //packet length
while(!UART1_Tx_Idle());
uart1_write(0x80);
while(!UART1_Tx_Idle());
uart1_write(0x36);
while(!UART1_Tx_Idle());
for(count=6;count>=0;count--)
{ while(!UART1_Data_Ready());
datain = UART1_Read();
}
while(!UART1_Data_Ready());
uart1_read();
while(!UART1_Data_Ready());
uart1_read();
while(!UART1_Data_Ready());
uart1_read();
while(!UART1_Data_Ready());
uart1_read();
while(!UART1_Data_Ready());
uart1_read();
for (count=0;count<=23;count++)
{
while(!UART1_Data_Ready());
id[count]=uart1_read();
}
while(!UART1_Data_Ready());
uart1_read();
I received datas sending from the microcontroller in pc using RealTerm. But the module is not responding. I used PIC's internal usart module and mikroc library for usart. Also using LCD. In order to reduce code, here, I removed that part also. PIC is working in 20Mhz frequency. Any help is welcomed...
Thanks,
basheer