Noobie WROTE:How to modify the product schematic to interface with PC using serial port DB9 instead of passing through UART then UC00A?
ober WROTE:Noobie WROTE:How to modify the product schematic to interface with PC using serial port DB9 instead of passing through UART then UC00A?
You want to bypass using UC00A? In other words, is using conventional method, the RS232 DB9 serial port? Then you need to have a RS232 level shifter. try to search for MAX232 circuit. This might be helpful:
If you look carefully, MAX232 require four connection from microcontroller board: 5V, GnD, TX and RX which you can get it from the standard connector which originally UC00A being connected.
Noobie WROTE:so if i want to modify that part to communicate with PC using RS232-DB9 serial port.
can i just pull the RC0,RC1 to MAX232 pin 11(T1in), 12(R1out)?
or must use the RC6, RC7? what about the connection with the fingerprint module?
require any code modification on programming the PIC16F876A ?
hyng WROTE:Ober has shown you the useful schematic. I'm not sure if it will work when you connect to the software UART pins which is RC0 and RC1. But you can give it a try. No modification on the programming is needed in this case.
char id1[]={"1234567890"},id2[]={"9876543210"};
j=0;
for(i=0;i<=9;i++){
if(rfid[i]==id1[i]) j++;}
//if all 10 digit rfid equal to 10 digit id1, j will equal to 10
if(j==10) user=1;
j=0;
for(i=0;i<=9;i++){
if(rfid[i]==id2[i]) j++;}
//if all 10 digit rfid equal to 10 digit id1, j will equal to 10
if(j==10) user=2;
lcd_goto(20);
send_string("Welcome ");
switch(user){
case 1: {send_string("Sam");break;}
case 2: {send_string("Max");break;}
default: {send_string("Alien");break;}
}
shahrul WROTE:You comparing 10 digit id and change into username
eg:
- CODE: SELECT_ALL_CODE
char id1[]={"1234567890"},id2[]={"9876543210"};
j=0;
for(i=0;i<=9;i++){
if(rfid[i]==id1[i]) j++;}
//if all 10 digit rfid equal to 10 digit id1, j will equal to 10
if(j==10) user=1;
j=0;
for(i=0;i<=9;i++){
if(rfid[i]==id2[i]) j++;}
//if all 10 digit rfid equal to 10 digit id1, j will equal to 10
if(j==10) user=2;
lcd_goto(20);
send_string("Welcome ");
switch(user){
case 1: {send_string("Sam");break;}
case 2: {send_string("Max");break;}
default: {send_string("Alien");break;}
}
Users browsing this forum: No registered users and 2 guests