- This topic has 3 replies, 3 voices, and was last updated 11 years, 3 months ago by Mustaqim.
-
AuthorPosts
-
May 28, 2013 at 1:46 pm #2449Joshua SwartwoodParticipant
My group and I have been having trouble getting this to work properly. Unfortunately I only thought to look here last minute but here are the details: We are using Khiel to program and creating a hex at a speed of 11.0895. When putting the program onto the 8051 trainer we are using the only way to get the password to work, was by changing it to the same four digits, and then holding the key down. Otherwise what happens is we get “X_X_” new line “X_X_” and so on, where the “X” is the digit and the “_” is just an open space instead of getting “XXXX” as the resulting input/output. Thus with the standard “3907” password, it just reads “3 9” new line “0 7” and keeps going until it decides to say wrong password. Again, it only works when all four digits are the same and that button is held down. Would anyone know why the code is doing this and if it is something in the code, in the Khiel programming or in the terminal program, OR in the 8051 trainer versus the chip used in the description?
May 28, 2013 at 9:29 pm #9853SagarParticipantplease post your source code and schematic.
May 29, 2013 at 4:11 pm #9864Joshua SwartwoodParticipantIt’s the EXACT source code and schematic used in the project here: http://www.engineersgarage.com/microcontroller/8051projects/interface-keypad-AT89C51-circuit
I suppose I wasn’t clear enough in referencing that.
However, the problem was “mostly” solved and was found to be mainly a timing issue.
void delay(unsigned int msec) //Time delay function
{
int i,j ;
for(i=0;i<msec;i++)
for(j=0;j<1275;j++);
}
In that part of the code, I just changed the “1275” to “6375” and it slowed down the program enough to let it work.
We think our biggest issue is that we were also using a different brand of 8051 such as this one here: http://www.microdigitaled.com/Images/mde_8051.jpg the DS89C430 brand and so there may of been some disparities between the code written for the Atmel and that one. Hopefully this helps anyone else who may end up using a different brand of processor and has a similar issue.
It still has issues with working 100% properly, how ever it works well enough to do for a beginner project.
June 13, 2013 at 11:30 am #9959MustaqimParticipanthi,
i can giv u a code whch i hav done for checking the password, but i hav done it using keyboard. i hav used I2c protocol for interfacing external eeprom ic for storing the password. I hav displayed the output on a 16×2 lcd.
If u want, i can giv u my code.
-
AuthorPosts
- You must be logged in to reply to this topic.