bsodmike
New Member
Hi
I am looking to control three motors via PWM and have with me a 16F877 as the main PIC. I also have a spare 16F88 so an idea dawned on me.
I can connect the OSC1 pin from the 16F877 to the OSC1 pin on the 16F88, leaving the OSC2 pin open on the 16F88. If mounted close enough, they should run in sync from a single oscillator which is connected to the OSC1 and OSC2 pins of the 16F877.
Since the host (a PC) will be sending commands to the PIC to drive the PWM signal, it is a one way direction of communication, and therefore could tie the RX line of the 16F877 and 16F88 together.
If both of them were to run with an interrupt on the RX receive, but each PIC scans for an 'identification' code within the stream of data - I could potentially be able to utilize the CCP1/CCP2 on the 16F877 to drive two motors and the CCP1 on the 16F88 to drive the third motor.
The alternative would be to dump the 16F88 and run two motors via the CCP1/CCP2 and use a regular I/O and software to control the third motor. However, I would like to run all the PWM using the on-board hardware peripherals if possible.
Does anyone think this is a good or bad idea? Any comments would be extremely appreciated - thanks!
I am looking to control three motors via PWM and have with me a 16F877 as the main PIC. I also have a spare 16F88 so an idea dawned on me.
I can connect the OSC1 pin from the 16F877 to the OSC1 pin on the 16F88, leaving the OSC2 pin open on the 16F88. If mounted close enough, they should run in sync from a single oscillator which is connected to the OSC1 and OSC2 pins of the 16F877.
Since the host (a PC) will be sending commands to the PIC to drive the PWM signal, it is a one way direction of communication, and therefore could tie the RX line of the 16F877 and 16F88 together.
If both of them were to run with an interrupt on the RX receive, but each PIC scans for an 'identification' code within the stream of data - I could potentially be able to utilize the CCP1/CCP2 on the 16F877 to drive two motors and the CCP1 on the 16F88 to drive the third motor.
The alternative would be to dump the 16F88 and run two motors via the CCP1/CCP2 and use a regular I/O and software to control the third motor. However, I would like to run all the PWM using the on-board hardware peripherals if possible.
Does anyone think this is a good or bad idea? Any comments would be extremely appreciated - thanks!
Last edited: