Jump to content
Sign in to follow this  

Recommended Posts

Hi, I would like to use the CCP2 and TMR1 modules in PIC16F877 for serial transmission between a 5x3 matrix keypad with the PIC via two lines: - one Signal and one Clock.

The signal line is bi-directional, and is connected to RC1/CCP2.  The free running TIMER 1 will generates 32 clock pulses (31 data clk pulses, and 1 ACK clk pulses).  The PIC will first capture the input signal from the keypad and compare which clock pulse it received the signal to understand which key has been pressed.

So, anyone can please help me or tell me to use the CCP2 and TMR1 in the simplest way with C2C compiler?  Thanks a lot! :)

Share this post

Link to post
Share on other sites
Guest Dave



The CCP module, (capture and compare) is all about:

1) capturing timer values when certain events occur (edges on some pins).

2) comparing timer values with some preset compare values to create PWM (pulse width modulate) outputs.


To me sound like you need to be using Master Synchronous Serial Port (MSSP). ::):




Share this post

Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...