CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Keypad Scanning with PIC MCU

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
muahaha



Joined: 11 Oct 2005
Posts: 4

View user's profile Send private message

Keypad Scanning with PIC MCU
PostPosted: Wed Oct 12, 2005 5:33 am     Reply with quote

How can i scan a keypad only using two pins of MCU and what is the best values of resistors and capacitor used for a keypad which has got 12 keys. Maybe somebody send a chart for this circuit. Also i have problems on C programming part. Please help me! Thanks for your interest...
Ttelmah
Guest







PostPosted: Wed Oct 12, 2005 6:24 am     Reply with quote

Is there an ADC available on one or both pins?. If so is it being used for anything else?. If not, are the inputs schmidt trigger types or normal logic types?. How often do you need to 'scan' the keys?. What timer resources are available?. Could one of the inputs connect to a interrupt, or CTC input?.

Best Wishes
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

View user's profile Send private message Visit poster's website

PostPosted: Wed Oct 12, 2005 7:58 am     Reply with quote

Google search. "one pin keypad"


analog
http://www.elecdesign.com/Articles/Index.cfm?ArticleID=3560
freq
http://www.elecdesign.com/Articles/ArticleID/1869/1869.html


Last edited by treitmey on Wed Oct 12, 2005 8:11 am; edited 2 times in total
Ttelmah
Guest







PostPosted: Wed Oct 12, 2005 8:08 am     Reply with quote

This is what I suspect he is thinking about. Which is why I asked if an ADC is available on the pins. However there are some major 'caveats', because of the charge time of the ADC (which shoots through the roof as the source impedance rises, if accuracy is to be maintained), if the ADC is being used for anything else (second question I asked), this could cause problems. If an ADC is not available, there is a way to do it, by generating a crude 'time reading' based on the discharge of a capacitor, being charged by one pin, and read by the other. Hence the questions about timing resources, and inputs.

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group