keypad interfacing with PIC18F4520 and LCD

MrChips

Joined Oct 2, 2009
34,828
sadly my university wants it in assembly its a nightmare
Nothing wrong with learning to use assembly. This is where you really learn.

1) Take all those NOP out of your code. Looks nasty.
2) Learn to print a string of characters to your display. What you have is painful to see.
 

Thread Starter

issaR

Joined Jan 2, 2021
8
Nothing wrong with learning to use assembly. This is where you really learn.

1) Take all those NOP out of your code. Looks nasty.
2) Learn to print a string of characters to your display. What you have is painful to see.
1)Yes it feels bad to know that u can do all this with C language which is easier
2) the nop thing is just to create delay bcz LCD slower than mcu
3)printing string isn't the problem but printing numbers is causing me the problem (keypad)
4)my portB pins are digital inputs (config pbaden = off) i sent low to keypad rows and got low on the column i pressed on but idk why its not displayed on lcd screen
5) I just give up i need to submit my code within 1 hour
 

MrChips

Joined Oct 2, 2009
34,828
1)Yes it feels bad to know that u can do all this with C language which is easier
2) the nop thing is just to create delay bcz LCD slower than mcu
3)printing string isn't the problem but printing numbers is causing me the problem (keypad)
4)my portB pins are digital inputs (config pbaden = off) i sent low to keypad rows and got low on the column i pressed on but idk why its not displayed on lcd screen
5) I just give up i need to submit my code within 1 hour
Too bad. There is so much you can learn.
Why give up now? You can use this knowledge and learned skill sometime later.
 

Ian Rogers

Joined Dec 12, 2012
1,136
MrChips... The keypad isn't using interrupts. This will work if he just sets RA bits low each phase of the keypad.. He is only doing it once " LATA4 = 1" but its already high, it needs to be low... each column as needed..
 
Top