Keypadpassword
-
- Posts: 19
- Joined: Fri Jul 17, 2009 10:40 pm
Keypadpassword
Hello Benj,
I am trying to write a password code program using the keypad and lcd display.My program takes four numbers from the keypad and compare it with the set password,if it matches the " welcome" string will be displayed on the lcd else it displays "invalid code". The problem is that it works well with the simulator but it does not work the development board i donΒ΄t know the reason.Can you help me check it pleaseeeee. I have the code for your perusal.
Thanks.
I am trying to write a password code program using the keypad and lcd display.My program takes four numbers from the keypad and compare it with the set password,if it matches the " welcome" string will be displayed on the lcd else it displays "invalid code". The problem is that it works well with the simulator but it does not work the development board i donΒ΄t know the reason.Can you help me check it pleaseeeee. I have the code for your perusal.
Thanks.
- Attachments
-
- Flowcode6.fcf
- This is the password program
- (11.49 KiB) Downloaded 394 times
- Steve
- Matrix Staff
- Posts: 3431
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
Re: Keypadpassword
There are many reasons why the simulation does not behave the same way as on the chip itself. Here's a few of the more common reasons:
- inappropriate configurations word settings for your hardware
- wrong clock speed and/or settings
- not using the "start" macro to initialise the LCD
-
- Posts: 19
- Joined: Fri Jul 17, 2009 10:40 pm
Re: Keypadpassword
Hi Steve,
I have checked the problem again and it still did not work. Please check it for me
Regards.
I have checked the problem again and it still did not work. Please check it for me
Regards.
- Steve
- Matrix Staff
- Posts: 3431
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
Re: Keypadpassword
According to your file, the oscillator in your hardware is a 19.6608MHz crystal. If this is not the case, you will need to change the clock speed setting and maybe the configuration data in the Flowcode file.
Apart from that, perhaps the hardware is not connected correctly. I can see nothing particularly wrong with the program.
You should create a simple "led flasher" type program to make sure that the clock and other hardware setttings are correct for your program. Once you have a simple program running, add small pieces of functionality to your program and repeat the test. Eventually you will find the reason why there is a discrepancy between the hardware and the simulation.
Apart from that, perhaps the hardware is not connected correctly. I can see nothing particularly wrong with the program.
You should create a simple "led flasher" type program to make sure that the clock and other hardware setttings are correct for your program. Once you have a simple program running, add small pieces of functionality to your program and repeat the test. Eventually you will find the reason why there is a discrepancy between the hardware and the simulation.
-
- Posts: 19
- Joined: Fri Jul 17, 2009 10:40 pm
Re: Keypadpassword
I have tested the hardware with a couple of simple programs and it works well including the led flasher program you talked about.The major problem now is that when i press the wrong numbers on the keypad it actually works well but when i press any of correct numbers it does show anything on the lcd display.
I have checked the clock settings it looks ok .Please help me check it again ,this problem looks really strange to me.
I have checked the clock settings it looks ok .Please help me check it again ,this problem looks really strange to me.
- Steve
- Matrix Staff
- Posts: 3431
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
Re: Keypadpassword
This is almost impossible for us to check because we do not have access to your hardware.
Also, you originally said it did not work. I took this to mean that the program was totally not working. Now I find out that it is working, apart from something to do with the keypad. If you do have a problem, can you please be a bit more specific as this will enable us to help you much quicker.
Your problem still points to an error with the hardware setup. You should create simple programs using the keypad to try to solve this problem.
Also, you originally said it did not work. I took this to mean that the program was totally not working. Now I find out that it is working, apart from something to do with the keypad. If you do have a problem, can you please be a bit more specific as this will enable us to help you much quicker.
Your problem still points to an error with the hardware setup. You should create simple programs using the keypad to try to solve this problem.
-
- Posts: 19
- Joined: Fri Jul 17, 2009 10:40 pm
-
- Posts: 6
- Joined: Wed Jul 22, 2009 3:52 am
Re: Keypadpassword
hey
i followed a tutorial that is somewhat like this, i think its even on youtube. what i'm tryin to do is to make it a four digit code(like yours) but adding the * and # to it...so i guess it would be 5 digit code, * to turn on/reset alarm and the # to turn it off. if i ever get to run right i'll post it, i'm still kind of a greenhorn at this, best of luck to you
i followed a tutorial that is somewhat like this, i think its even on youtube. what i'm tryin to do is to make it a four digit code(like yours) but adding the * and # to it...so i guess it would be 5 digit code, * to turn on/reset alarm and the # to turn it off. if i ever get to run right i'll post it, i'm still kind of a greenhorn at this, best of luck to you
-
- Posts: 19
- Joined: Fri Jul 17, 2009 10:40 pm
-
- Posts: 6
- Joined: Wed Jul 22, 2009 3:52 am
Re: Keypadpassword
pass is 1234 plus * for on/armed, or # for off/disarmedbodexchrist wrote:Ok. i will be expecting your post.
i'm trying to make this back to a four digit code, and by using one code activate/deactivate the alarm, the alarm portion of this is going to be on a 16f88 and the keypad portion is going on a 16f877a. the alarm is also being done using flowcode/eblocks, when i get a better grip on this i'll post everything/pics so you guys got a better idea
- Attachments
-
- KEYPAD1.fcf
- (20.85 KiB) Downloaded 381 times
-
- Posts: 19
- Joined: Fri Jul 17, 2009 10:40 pm
Re: Keypadpassword
"pass is 1234 plus * for on/armed, or # for off/disarmed
i'm trying to make this back to a four digit code, and by using one code activate/deactivate the alarm, the alarm portion of this is going to be on a 16f88 and the keypad portion is going on a 16f877a. the alarm is also being done using flowcode/eblocks, when i get a better grip on this i'll post everything/pics so you guys got a better id"
You have done a good job so far, but i still cannot see the effect of the alarm. I was expecting to see how the alarm component is connected.
i'm trying to make this back to a four digit code, and by using one code activate/deactivate the alarm, the alarm portion of this is going to be on a 16f88 and the keypad portion is going on a 16f877a. the alarm is also being done using flowcode/eblocks, when i get a better grip on this i'll post everything/pics so you guys got a better id"
You have done a good job so far, but i still cannot see the effect of the alarm. I was expecting to see how the alarm component is connected.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Keypadpassword
Hello
This example should help. It contains the normal keypad password code but then if the password is correct you can turn an alarm on or off.
Hope this helps.
This example should help. It contains the normal keypad password code but then if the password is correct you can turn an alarm on or off.
Hope this helps.
- Attachments
-
- Keypad_Alarm_V3.fcf
- (15 KiB) Downloaded 427 times
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 19
- Joined: Fri Jul 17, 2009 10:40 pm