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 CCS Technical Support

Scanning a button array

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



Joined: 19 May 2009
Posts: 60

View user's profile Send private message

Scanning a button array
PostPosted: Thu Feb 24, 2011 2:17 am     Reply with quote

I'm preparing a DJ midi controller project. This will have 15 potmeters, 16 buttons and 2 rotary encoders.
I will place the 16 buttons in a 4x4 array. The potmeters will be connected with 2 analog multiplexers. The rotary encoders will be on an IOC pin.

As this will be a DJ controller latency and so on has to be very good. I'm used to DJ'ing the classic way with vinyl so this has to feel very good.

If my PIC runs at 32 MHz. Will I be able to read the array and buttons all in one loop without missing one button press ? If a value has changed the MIDI command will be sent. That is all the PIC has to do. Or would it be better to put the buttons on INT pins ?
arunb



Joined: 08 Sep 2003
Posts: 492
Location: India

View user's profile Send private message Send e-mail

RE:
PostPosted: Thu Feb 24, 2011 2:29 am     Reply with quote

Interrupts would be faster.

For the Buttons you could use a I/O expander such as the MCP 23106 from Microchip, it can cater to 16 buttons, and has interrupt on change feature, thus freeing the PIC for other tasks.

thanks
a
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