2 pins..
Serial data is one possibility.. software out on any pin and then in on the other picīs HW rx pin.
Or
Pullup in pin A and pin B on the 628A
PinA is set to low.
wait for the other pic to reply "redy to receive" that it will signal with pin B going low.
Pulseout (x ms) depending what sound you play in the 628A
Pulsein for the other pic to read the sound value as a pulse time
Release Pin A so say you are done
pic 2 releases pin B also
if you dont want to use pulse time you can send 1 pulse for sound 1 and 16 pulses for sound 16. and then just count rising or falling edges in PIC2
OR
If you have CCP1 still avaliable you can use that and a double RC network to create an analogue voltage that has 16 different voltage levels. Then you only need one pin and an AD pin on PIC2.
Bookmarks