PASSWORD

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
CalculatorX
Posts: 16
Joined: Wed Jul 23, 2014 9:20 am
Has thanked: 8 times
Been thanked: 1 time

PASSWORD

Post by CalculatorX »

hello guys.. i have a questions..
i am currently making a project that will store a password.. i've already done making the lcd and the keypad work,, now how do i go about storing passwords.. for it

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times

Re: PASSWORD

Post by dazz »

Hi
Do a forum search for door lock as Medelec did some very good posts on this explaning the code(password) etc
Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

CalculatorX
Posts: 16
Joined: Wed Jul 23, 2014 9:20 am
Has thanked: 8 times
Been thanked: 1 time

Re: PASSWORD

Post by CalculatorX »

SWEET.. its like everything i needed is there.. i'll just do a bit of a modification for my own goal.. thanks man .. so cool.!!

CalculatorX
Posts: 16
Joined: Wed Jul 23, 2014 9:20 am
Has thanked: 8 times
Been thanked: 1 time

Re: PASSWORD

Post by CalculatorX »

after doing some touch i added a few stuffs on medelecs flowcode for door lock..

i wanted to have a 2 keypad one in the inside and on the outside.. so the door can be lock and unlock inside and out with only keypad..

but my problem is i cant seem to make the second keypad to work..
it never displays anything or after i press one character it floods the lcd with whatever character i press first

or is it having 2 keypad is not even possible??

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: PASSWORD

Post by medelec35 »

hi CalculatorX ,
CalculatorX wrote:it never displays anything or after i press one character it floods the lcd with whatever character i press first
That's sounds like a connection is no being correctly made from the keypad to the target device or the pin of the port in connected as an output, but is an input pin only.
Since the keypad is just sets of switches you could try one set of resistors, but connect the two keypads in parallel.
Perhaps you could post a circuit diagram, and you're modified flowchart.

Martin
Martin

CalculatorX
Posts: 16
Joined: Wed Jul 23, 2014 9:20 am
Has thanked: 8 times
Been thanked: 1 time

Re: PASSWORD

Post by CalculatorX »

Here.. ugh i just added some servo on your original file, i wanted it to have like both can be operate outside and inside the door.. the 2 lcd worked but when i tried to do the same with the keypad it doesnt,,

btw do i really need to put the second lcd in my program or i can just connect it in paraller with the first lcd so the the 2 will show the same. becouse im worried that the program is already exceeding what my PIC16F877A memory can handle..

and yeah so there you go.. lol my programming is actually next to nothing. and flowcode was really helpfull becouse even someone like me can do stuffs like this.. :D
Attachments
hehe.fcf
(30.13 KiB) Downloaded 341 times

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times

Re: PASSWORD

Post by dazz »

Hi
changed your chart, added comments, basically you needed to add component calls to keypad 1 (same as you did for keypad 0 , also changed pins on keypad 0 to same pins as keypad 1 (although i have changed keypad 1 back to port d, try changing it to port b, which will save you pins on your chip. have a fiddle with it
As for the lcd try it it should be ok but you may need a driver circuit as 2 lcd's connected together may exceed the current draw limits of your pic
Regards
Dazz
heh1e.fcf
(31.48 KiB) Downloaded 332 times
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

CalculatorX
Posts: 16
Joined: Wed Jul 23, 2014 9:20 am
Has thanked: 8 times
Been thanked: 1 time

Re: PASSWORD

Post by CalculatorX »

Yush.. after trying it on breadboard.. the keypad actualy work if i just connect it in parallel with the first keypad

now im on the last phase of the project.. my proffesor want it so that i can change the password anytime i want,, without reflashing the flowocode.. the password can be change by the end user provided he has a master passcode to acces the change password menu.

someone told me i should make use of EEPROM but i dont really know how that works..

can you guys give me some pointers and study material on my project..

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: PASSWORD

Post by medelec35 »

This Thread Should help.
It may be best to look at the whole thread as there are a fair few different examples.
From the first post:
medelec35 wrote: With This lock there are two pass codes.
1) Master code
This used for changing the normal pass code (just in case the normal pass code has been changed, then forgotten)
It can only be changed by altering on flowchart (so you can look at flowchart if master pass code is forgotten) then resending to target device. For security reasons this cannot be used for opening the door.

2) Normal pass code.
This is used to open the door. The default is 1234. But if you change this pass code, then the new pass code will be stored in EEPROM.
So it will be remembered in event of a power failure. You can also use this normal pass code to change the current pass code.

To change the current pass code, before entering any digits press Hash key #
Now enter the old pass code or master code. (currently set at 6543)

Note: The hash key is also used as an enter key, after entering four digits.
The star key * is use to remove the last digit entered. so if you want 1234 but enter 234 by mistake, then press *** then enter 1234 finally press #
Martin
Martin

CalculatorX
Posts: 16
Joined: Wed Jul 23, 2014 9:20 am
Has thanked: 8 times
Been thanked: 1 time

Re: PASSWORD

Post by CalculatorX »

That thread was really helpful.. i am now studying every part of it.. and today i actually learnt of how to use that macro call.. it made the program very neat.

i just have a question.. how would i know if my program is already exceeding what my chip can handle i mean,,
my professor told me i should be careful about the program because if its too big you wont be able to compile it in the chip

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: PASSWORD

Post by medelec35 »

CalculatorX wrote:my professor told me i should be careful about the program because if its too big you wont be able to compile it in the chip
Yes he is correct.
Best thing to do is compile to hex then take a look at memory usage;

Code: Select all

Memory Usage Report
===================
RAM available:256 bytes, used:108 bytes (42.2%), free:148 bytes (57.8%), 
Heap size:148 bytes, Heap max single alloc:79 bytes
ROM available:4092 words, used:2550 words (62.4%), free:1542 words (37.6%)
How much free will be totally dependent on target device.
Martin

CalculatorX
Posts: 16
Joined: Wed Jul 23, 2014 9:20 am
Has thanked: 8 times
Been thanked: 1 time

Re: PASSWORD

Post by CalculatorX »

ugh,, hey again.. everything was working fine,, until my prof out of his whim said i have to add gsm on it..

i should be able to unlock and lock it again using gsm..
i tried using the gsm on the flow code but uhm.. i dont know how that works.. i tried doing a flow code but it gets nowhere
so do you guys have some pointers for me or some study materials or perhaps clues on how to get this running..

and uhm how to convert string to integer. i know this process will be use becouse

CalculatorX
Posts: 16
Joined: Wed Jul 23, 2014 9:20 am
Has thanked: 8 times
Been thanked: 1 time

Re: PASSWORD

Post by CalculatorX »

Here is the file i made.. i dont know if this is even working.. as i don't have my gsm module yet..
if the gsm recieve a text it will compare the number to the save number if its the same. then if its the same..
it will check the message then compare it with the save string message.. to either unlock or lock
or it can stop waiting for the gsm message to arrive and the user can go straight the menu and enter the passcode to unlock

id really appreciate it if someone who knows how to can review this flowcode i made for error checking and improvements

take note i havent really tried it on the circuit with the actual gsm becouse i dont have it yet.

anyways thanks people.
Attachments
4 digit lcd lock with gsm.fcf
(51.78 KiB) Downloaded 315 times

CalculatorX
Posts: 16
Joined: Wed Jul 23, 2014 9:20 am
Has thanked: 8 times
Been thanked: 1 time

Re: PASSWORD

Post by CalculatorX »

LOL it's been forever

Post Reply