Page 1 of 1

Keypadpassword

Posted: Wed Jul 22, 2009 10:34 am
by bodexchrist
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.

Re: Keypadpassword

Posted: Wed Jul 22, 2009 1:46 pm
by Steve
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

Re: Keypadpassword

Posted: Wed Jul 22, 2009 2:08 pm
by bodexchrist
Hi Steve,

I have checked the problem again and it still did not work. Please check it for me

Regards.

Re: Keypadpassword

Posted: Wed Jul 22, 2009 2:19 pm
by Steve
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.

Re: Keypadpassword

Posted: Wed Jul 22, 2009 2:34 pm
by bodexchrist
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.

Re: Keypadpassword

Posted: Wed Jul 22, 2009 2:38 pm
by Steve
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.

Re: Keypadpassword

Posted: Wed Jul 22, 2009 2:42 pm
by bodexchrist
Thanx for your prompt responses ,i will have to try to sort it out myself.

Re: Keypadpassword

Posted: Thu Jul 23, 2009 10:45 pm
by stubbornbull
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

Re: Keypadpassword

Posted: Fri Jul 24, 2009 10:46 am
by bodexchrist
Ok. i will be expecting your post.

Re: Keypadpassword

Posted: Thu Jul 30, 2009 8:08 pm
by stubbornbull
bodexchrist wrote:Ok. i will be expecting your post.
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 idea

Re: Keypadpassword

Posted: Fri Jul 31, 2009 10:00 am
by bodexchrist
"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.

Re: Keypadpassword

Posted: Fri Jul 31, 2009 10:21 am
by Benj
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.

Re: Keypadpassword

Posted: Sat Aug 01, 2009 2:00 am
by bodexchrist
Very clear to me now.


stubbornbull still expecting ur finished version .


Thanks