I have some code that operates a solenoid once every minute. The original code and guidance came from this document:
http://carveshop.com/clocks/LazyClockElectronics.pdf
I now wish to add some additional code to activate another solenoid once every second.
The main code to define and run the first solenoid is:
#define Coil (BIT2) // Port 1 Bit 2 is high-active to the base of an NPN coil driver transistor //and later in the sequence P1SEL |= Coil; // turn the coil on
I have used Grace to configure the device using the written guidance supplied with the original code.
To add the second solenoid, can I simply do the following:
#define Coil2 (BIT2)// THIS IS FOR THE SECOND COIL - CHECK WHETHER PORT IS CORRECT P1SEL |= Coil2; // turn the coil on
If I understand this correctly, it will simply use the same pin as the original code and will active the first solenoid, not the second once. However, I am notclear how to set up the second pin for the second coil. This is the Grace screen for the pins, if that helps:
Thank you.
James.