care with spiout
Thanks BCJ for the info.
I am using SPI to communicate with a digital pot (MCP42xxx)
It turns out that I had several problems all compounding.
It is important to ensure that MODE is set correctly : I was using mode 1 (msbfirst-l; low)and probably needed mode 5! mode 5 is MSBFirst_h.
Also I had this app working with a BS2 and "migrated" the code to the picaxe.
A note of caution if someone else does this is that the BS2 sends the commands in the opposite order using shiftout (dataout,clock,mode,data). The Picaxe uses spiout clock, dataout, mode, (data). I had not reset the parameters to be in the proper order which meant the dataout and clock were connected to wrong pins!
Finally I was trying to send a WORD as the data using word/16 as the data!
I have broken these into the bytes separated by a comma.
I'll try these fixes and see if this corrects the problem.
If this works I'll post a bit more info on the code and app.