Hi all
I've recently bought a PICKit 2 programmer and I am still learning the basics.
I have managed to program a couple of flashing patterns to the 18f690 on the dev board using GCBasicIDE. I'm a novice so please take it easy on me as I don't a grate deal on knowledge, I do how ever understand electronics to a degree.
So this brings me to my questions.
Multiplexing? This is where you would use a "group" of "share" output with individual Commons. Like when using 7 segment LED, you can use several segments all saring the same inputs but using individual grounds, the grounds are triggered in sync with the relivent segment signals....?
Ok so heres my problem, I busy with a project that has over 30 LEDs, 20x 2 way switches (with off in the middle), 7x 5 position rotory switches and 7x 7segment LEDs.......
My idea thought
Basically, the rotary switches are for controlling the speed of some motors via the PWM outputs, there is one 7seg per rotary switch, showing its position, Eg 1,2,3,4,5,0. I though of using a analog input per switch using the method I've seen on a 4x4 botton keypad, using resistors across the switch outputs to create a different voltage per position, changing the code to change the PWM output.... can this be done?
The next big user of I/O pins will be the 20 switches (on-off-on) for the "auto" (where the MCU will do the controlling), off, and "manual" where the output will be activated (override). Normally you would just push your signal from the MCU through the one pole of the switch to the divice and use the other pole to drive directly -thereby choosing the Auto or Man input - hope that make sence? - but there are 2 status LED for each switch, 1 shows Auto mode and other Man. mode.
So the only way I can think of doing this is multiplexing the LEDs so to use only 14 (10x4) pins and not 40.....?
I have not yet decided on the PIC chip, any ideas?, but would have to be at least a 40 pin PIC? could I not use 2 DIP PICs apposed to a TQFP mount as this is a home made DIY project................
Please help with any advise.
I've recently bought a PICKit 2 programmer and I am still learning the basics.
I have managed to program a couple of flashing patterns to the 18f690 on the dev board using GCBasicIDE. I'm a novice so please take it easy on me as I don't a grate deal on knowledge, I do how ever understand electronics to a degree.
So this brings me to my questions.
Multiplexing? This is where you would use a "group" of "share" output with individual Commons. Like when using 7 segment LED, you can use several segments all saring the same inputs but using individual grounds, the grounds are triggered in sync with the relivent segment signals....?
Ok so heres my problem, I busy with a project that has over 30 LEDs, 20x 2 way switches (with off in the middle), 7x 5 position rotory switches and 7x 7segment LEDs.......
My idea thought
Basically, the rotary switches are for controlling the speed of some motors via the PWM outputs, there is one 7seg per rotary switch, showing its position, Eg 1,2,3,4,5,0. I though of using a analog input per switch using the method I've seen on a 4x4 botton keypad, using resistors across the switch outputs to create a different voltage per position, changing the code to change the PWM output.... can this be done?
The next big user of I/O pins will be the 20 switches (on-off-on) for the "auto" (where the MCU will do the controlling), off, and "manual" where the output will be activated (override). Normally you would just push your signal from the MCU through the one pole of the switch to the divice and use the other pole to drive directly -thereby choosing the Auto or Man input - hope that make sence? - but there are 2 status LED for each switch, 1 shows Auto mode and other Man. mode.
So the only way I can think of doing this is multiplexing the LEDs so to use only 14 (10x4) pins and not 40.....?
I have not yet decided on the PIC chip, any ideas?, but would have to be at least a 40 pin PIC? could I not use 2 DIP PICs apposed to a TQFP mount as this is a home made DIY project................
Please help with any advise.