Both passive chip LED and buzzer driver

Users questions: How to achieve a 51 single lit lamp 1 second while allowing passive buzzer sound 1 second, 1 second off the time buzzer goes off 1 second. Then a light-emitting diode P1.0, P2.0 connected passive buzzer. Buzzer buzzer different passive and active, passive buzzer connected directly to the battery does not ring. This process Order I can not think for a long time, do not know how to light the LED chip in the same time to perform a procedure for buzzer sound. Anyone help me think of one? I did not score, ah, not for score to help me.
Experts answer: your passive buzzer model? Some of the buzzer in a square wave with a certain frequency Can be sound, if so. Sound only when needed P1.0 = 1; for (inti = 0; i 1000; i + +) {P2.0 = 1; delay_us (500); P2.0 = 0; delay_us (500);} P1.0 = 0; You need to delay write their own programs based on hardware friends.
  • This information provided by the users.Thanks!