Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIC18f4520 using keypad and work without lib

Status
Not open for further replies.

work people

Newbie
Newbie level 1
Joined
May 17, 2022
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
11
Hi.
I need to do some program from PIC18F4520 to get from keypad 4*4 two number of max 4 element and check they for equal or greter of they and print input values to UART and result of comprasiong number. I can start to work but dont have some of good result. in technical specification my teacher set that i dont use any libriary.
Please help me !
I can see in this forum some examples, but they dont work in my microcontroller
 

No one here will do your homework for you. Think about the steps you need to do to solve the problem. Look for examples for each stage, try to understand them then come back with questions about with you don't understand.
You say you have found examples, translate them to the PIC, it's not hard.
 

Break your task into manageable steps:

1. Write a keypad scanning routine - look for examples of how to implement matrix scanning, you will find it very useful in the future and it isn't hard to do.

2. Scan for a key being pressed. Store its number.

3. Do the same again and store the second number.

4. Compare the numbers.

5. Send a message to the UART announcing the result.

You have not said which language you are coding in and which assembler of compiler you use so we can't be specific about code. In general, you can copy the techniques used in one program into another but you can't just copy chunks of code. That would be like taking the wing off an aircraft, attaching it to a bicycle wheel, adding a boat rudder and train engine to make an all terrain vehicle.

Brian.
 

Hi.
I need to do some program from PIC18F4520 to get from keypad 4*4 two number of max 4 element and check they for equal or greater of they and print input values to UART and result of comprasiong number. I can start to work but don't have some of good result. in technical specification my teacher set that i don't use any library.
Please help me !
I can see in this forum some examples, but they don't work in my microcontroller
This is a sample project that does a lot of what you are asking for https://github.com/dsoze1138/18F2520_LCD_4x4keypad

If you want a custom crafted application for your specific hardware using the PIC18F4520 you need to post all of your classwork assignment in detail.

What you have not shown are:
  • Circuit diagram for real hardware or Proteus simulation
  • Development tool (MPLABX, XC8) versions
  • Date this assignment must be completed
Should this be the first time you are attempting to create code for an embedded controller your experience does not seem up to the task.

It may be impossible for you to complete learning what you need in less than six months of real time.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top