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.

[PIC] Two or More Digits Keyboard PIC16f877 with CCS Compiler

Status
Not open for further replies.
N

Nexting

Guest
Hi To All

i´am trying to build a counter 00-99 two displays and keyboard whit pic 16f877 everything is fine whit the 0 to 9 number however i can get the 10 to 99 i read many post here about build a var to store data but i don´t get results. i´am using a 4x3 keyboard and kbd.c.

Code C - [expand]
1
2
3
4
5
6
7
8
if((k=='1'))
 {        
         output_low(pin_c0);
         output_low(pin_c1);
         output_b(01);
         delay_ms(20);
 
 }



i´m using this for number one.

Any advice very appreciatted.

thanks in advance
 
Last edited by a moderator:

You will need to give us a lot more information than you have before we can help you.
For a start you will need to tel us how the displays are connected to the MCU. Can you show us a schematic diagram?
What is the display you are using? I assume that you have connected it to PORTB. Are you using the same port to connect to the other
digit display?
What is "k"? Is it the variable that holds the digit that you want to display?
With the MCU you are using, you need to be careful about 'read-modify-write' issues as it does not have LAT registers associated with each PORT. Just looking at your code, if you use sequences such as the two "output_low" function calls in quick succession (and depending on how the code is written) you might be susceptible to this problem.
Susan
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top