PDA

View Full Version : pic basic pro for synthetiseur



f6ggy
- 3rd October 2003, 20:19
( thanks MELANIE for reponse at last thread)
I will want your opinion by looking at the following config, to say to me if SHIFTOUT can be appropriate thank you

please see this two links

http://f6ggy.dyndns.org/temp/img014.gif
http://f6ggy.dyndns.org/temp/img010.gif

Melanie
- 3rd October 2003, 22:01
Yes, you are correct that SHIFTOUT is the PBP command to use.

Example...

DataPin var PortA.0
ClockPin var PortA.1

SW var Byte
N var Word
A var Byte

To output the correct 19-bit sequence you could execute...

ShiftOUT DataPin,ClockPin,1,[SW\2,N\10,A\7]

or use the three individual lines as shown in img010.gif.

Also regarding img010.gif, there's no point in having variables SW and A as words if they're never going to be bigger than 2 and 7 bits each respectively.

Melanie