Need 4 modes with just 3 switches - need all modes to be selectable QUICKLY!


Results 1 to 40 of 68

Threaded View

  1. #13
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Mike, K8LH View Post
    Hi Hank',

    Got a schematic we could look at? Maybe there's a way to recover an extra pin that you haven't thought of.

    Are you using two pins for that tri-color LED? Or are you using any pins for LED mode indicators?

    How are you sampling and managing your switches? Polling them in a loop or via periodic interrupt?

    Here's the switching part....



    (I know some consider it bad form, but I use the PIC's internal weak pullups, for no other reason than it saves space - and believe me, I need all the space I can get!)

    ...there are a few spare pins Pin on the 16f690, Pin 4 is somewhat restricted in its use, so I stay clear of it, Pin 9 is 'forsaken' so I can use that bit of track/pcb real estate to 'conduit' the +4.1V onwards to the rest of the PCB, Pins 6, 15, 16 & 19 are essentially 'landlocked' from a PCB track routing perspective

    Yes, I'm using two pins (pins 2 & 3) for driving the LED (must remember to order common anode LEDs next time, so I can sink current from the main 9V VCC rail vs the PIC's 4V.1 rail ...puts less demand on the 100mA LDO regulator I've used!)

    Re how am I sampling the switches? - using DT's mighty fine interupt routine.

    There is no room for a fourth switch - likewise no room for illuminated switches - I'm only using 6mm square momentary push switches because they're the only ones I can shoehorn in.

    The problem of course is the more 'modes' I offer (and it would be lovely to offer 6 or 7), is providing the guitarist with meaningful (rememberable) visual indication of the modes with just one LED ...green, amber & red is fine. ....squeezing in a 'flashing LED' for the extra mode is pushing it - any more modes, that it's going to be hell to remember what the LED is telling you! (& there's no room for a lcd, 7 seg display etc)

    To give you some idea of my challenge, the pcb 'real estate' is about 40mm x70mm x 5.5mm high (1.5" x 3" x 0.2" high) - in that space I have to fit 2 x 20SOIC, 1 x 8 SOIC, 1 POT, 4 switches (the fourth switch is not at all related to this circuit), one single coil guitar pickup (that I make myself), one chunky electrolytic....and this is all on single sided pcb (along with a whole heap of 1206 SMD components) - it's crammed!
    Last edited by HankMcSpank; - 6th August 2010 at 14:40.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts