element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Legacy Personal Blogs 6-Button Lock Controller: Introduction and PIC Selection
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Former Member
  • Date Created: 20 Feb 2014 11:09 AM Date Created
  • Views 900 views
  • Likes 0 likes
  • Comments 0 comments
  • x
  • pic12f615
  • 8-bit
  • microchip
  • microprocessor
  • mplab
  • xc-8
  • button
  • interface
Related
Recommended

6-Button Lock Controller: Introduction and PIC Selection

Former Member
Former Member
20 Feb 2014

I found (and bid on) this project on oDesk.com.  I decided it looked like an interesting project, and as I was never awarded the project, I don’t think there are any issues with me posting a solution to it.

 

Here is the original project:

 

------------------------------------------------Job Description-------------------------------------------------

I'm looking for a lock system running on 8bit PIC.

 

Input are 6 buttons, output is a controlling a MOSFET.

Button voltage: OFF state: 0V, ON state: 5V.

Power input for PIC is 5V.

 

Buttons are numbered from 1 to 6. A correct 4 digit code (like a phone PIN)

set's the output to ON and thus turns the MOSFET on. The current that will pass

through the transistor is max 200mA.

There are 4 tries to enter the code (press 4 buttons in the right order), if you

fail, then you have to enter a 9 digit code (let's call it PUK). You have 99

tries to enter the PUK correctly, after that the device locks itself (output is

permanently OFF). PIC has to keep track of the number of tries of PIN and PUK

are entered even if there is a power failure.

 

I need you to identify the right PIC for the job and write the code. If you are

good with electronics, also the schematics and PCB design.

 

Budget depends if you will only write the code or also design the PCB.

------------------------------------------------Job Description-------------------------------------------------

 

I thought this was an interesting project, because I have already done a similar project, with a 4x4 keypad and a PIC24HJ24GP202.  I liked the challenge of the 8-bit limitation, and to make things even more interesting, I chose to use an 8-pin chip on top of the already given restriction of using only an 8-bit chip.

 

That being said, I only had two Microchip 8-bit, 8-pin chips available to me [1]:

1) PIC12F609

2) PIC12F615

 

From the two figures below, we see that the PIC12F615 is the only one of the two that has an ADC module.  So, that is the only chip that meets the requirements of

1) An 8-Bit PIC

2) Limited to an 8-pin DIP package

3) 1 digital I/O output, 1 INT, and 1 ADC module

Figure 1: PIC12F609 Diagram.  Note the lack of ANx values on the pins.[1]image


image

Figure 2: PIC12F615 Diagram. Note that ANx on various GPIO pins.[1]

 

The next step in the project is to develop the hardware and software.  I think it is  important to develop the hardware first, and test to make sure it works.  Following the hardware development, the software will need to be developed and tested. After they are both tested, we can put them together, test them, fix any final problems, and declare the project complete!

 

[1] http://ww1.microchip.com/downloads/en/DeviceDoc/41302A.pdf Pages 2 & 3.

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube