• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

QR Barcode readers with PIC16f877A (Updated)

abdo.medo1000

New Member
Hey all ,
I hope you are doing well and staying safe during this pandemic,

I have posted before that I'm working on a Door Lock system project with RFID module and key pad using Pic16f877a and I want to add QR to my project .
after a saw the answers I did not know actually what to do for that I started to search on internet about how could add QR reading future to my project and i finally got those choses

1.using ESP-32 CAM
-issue : how can I store many of QR codes on it ?

2.Using a QR reader with UART
-issue : but I have already used my UART ports to interface the RFID module is their any way to use the UART ports for 2 modules ?
and in this way how I can store my QR codes ? can I use external memory ?

3. using Zbar library with any Webcam
-issue : I found this open-source library but I do not know how can I use it with my project which is a library to read the QR code with normal web cam
I liked this library and I want to use it may you please guide me about how I can use this library with Pic16f877a or with any another MCU and also how can I store the QR codes in the project .

I attached my circuit diagram which shows the connections with my microcontroller to show you which ports I used and which ports are free.

I write my code on MicroC.


I'm looking forward for your advice

Thanks,
 

Attachments

Pommie

Well-Known Member
Most Helpful Member
The 877 is not really big enough to do what you want but can do it. I think you need a hardware solution. I'd go with the QR reader using a software UART on D6 & D7. To store your codes, use an I²C memory (24C1024 is 131k) on RC3 (SDA) and RC4 (SCL) - move your LEDs to port A. An alternative method is to have the QR code contain a 64 bit number along with other stuff, check the other stuff is correct and then check the 64 bit number against your database - only 8 locations per record required.

Mike.
 

Pommie

Well-Known Member
Most Helpful Member
I would also connect the R/W line of the LCD as this greatly speeds up the LCD routines. I'm not sure that sharing of I/O lines is needed with so many unused pins. Plus, if an I²C memory is decided upon then RC3 & 4 are required for hardware I²C.

Mike.
 

abdo.medo1000

New Member
The 877 is not really big enough to do what you want but can do it. I think you need a hardware solution. I'd go with the QR reader using a software UART on D6 & D7. To store your codes, use an I²C memory (24C1024 is 131k) on RC3 (SDA) and RC4 (SCL) - move your LEDs to port A. An alternative method is to have the QR code contain a 64 bit number along with other stuff, check the other stuff is correct and then check the 64 bit number against your database - only 8 locations per record required.

Mike.
Thank you for your hrlpfull answer,
I started to learn how to read and write on I²C memory as you said but I actually using RFID with The TX RX UART ports but you said that I can connect any QR reader with D6 and D7 , it's possible to send data via D ports ?
If possible which is the cheapest QR reader with UART outputs would you recommended to me ?

Respectfully,
Abdo.
 

abdo.medo1000

New Member
I would also connect the R/W line of the LCD as this greatly speeds up the LCD routines. I'm not sure that sharing of I/O lines is needed with so many unused pins. Plus, if an I²C memory is decided upon then RC3 & 4 are required for hardware I²C.

Mike.
Thank you again I appreciate your effort ot thinking to help me
But I did not understand what you said here
May you explain more clearly (),
Abdo
 

Pommie

Well-Known Member
Most Helpful Member
You have the R/W line of the LCD connected to ground so can't read from the LCD. The LCD has a busy flag that you can read to check if the LCD is ready to accept the next command/data.

Mike.
 

Latest threads

EE World Online Articles

Loading
Top