View Full Version : What / how is the best / easiest way to transfer data?

- 6th November 2012, 04:24
Hi All!
I have one PIC (16F628A) that is operating a sound module. There are 16 possible sounds. How is the best / easiest way to transfer the number (sound number) from the 16F628A to an input to another PIC so the number can be displayed on an on screen display along with other data?

Thanks, Ed :)

- 6th November 2012, 05:28

If you have 4 pins on the 16F628A that is not used already you can have them as outputs and then binary set these pins to represent 0-15 as sound number. The other pic just have to read 4 of it's inpins that are connected to the output from the 628A.

- 6th November 2012, 15:19
Thanks Jumper!
Great idea and I only have two pins available :frown:


- 7th November 2012, 02:37
2 pins..

Serial data is one possibility.. software out on any pin and then in on the other picīs HW rx pin.


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


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.